#!/bin/bash set -euo pipefail # For each files in tests/queries/*, mount that parquet file, run the query, and compare # its output. run_query() { file=${1:?must provide testcase file} parquet_file=${2:?must provide parquet file to load} query=${3:?must provide query to run} basename=$(basename "$file") cat < /dev/null 2> testcase-err.txt; then echo "...FAILED; check testcase-{out,err}.txt" >&2 exit 1 fi diff testcase-out.txt <(echo "$results") done < <(echo "$queries") } main "$@"