From 2fddad664a119aaf045ca650c97f3994dc19e5ec Mon Sep 17 00:00:00 2001 From: Connor Tsui Date: Tue, 30 Dec 2025 13:12:53 +1100 Subject: [PATCH] don't fail on missing lance for datafusion Signed-off-by: Connor Tsui --- .github/scripts/run-sql-bench.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/scripts/run-sql-bench.sh b/.github/scripts/run-sql-bench.sh index 682702a0966..93e96cb89dd 100755 --- a/.github/scripts/run-sql-bench.sh +++ b/.github/scripts/run-sql-bench.sh @@ -73,8 +73,9 @@ fi # Lance is filtered out of df_formats because it uses a separate binary (lance-bench). # # The `|| true` is needed because some benchmarks don't use all engines (e.g., statpopgen only has -# duckdb targets). grep returns exit code 1 when no matches are found. -df_formats=$(echo "$targets" | tr ',' '\n' | (grep '^datafusion:' || true) | grep -v ':lance$' | sed 's/datafusion://' | tr '\n' ',' | sed 's/,$//') +# duckdb targets). grep returns exit code 1 when no matches are found. Both greps must be in the +# subshell so that `|| true` covers the case where grep -v receives empty input. +df_formats=$(echo "$targets" | tr ',' '\n' | (grep '^datafusion:' | grep -v ':lance$' || true) | sed 's/datafusion://' | tr '\n' ',' | sed 's/,$//') ddb_formats=$(echo "$targets" | tr ',' '\n' | (grep '^duckdb:' || true) | sed 's/duckdb://' | tr '\n' ',' | sed 's/,$//') has_lance=$(echo "$targets" | grep -q 'datafusion:lance' && echo "true" || echo "false")