Skip to content

Commit b2cd767

Browse files
authored
Fix: don't fail on missing lance for datafusion (#5841)
Signed-off-by: Connor Tsui <[email protected]>
1 parent d67c02c commit b2cd767

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/scripts/run-sql-bench.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,9 @@ fi
7373
# Lance is filtered out of df_formats because it uses a separate binary (lance-bench).
7474
#
7575
# The `|| true` is needed because some benchmarks don't use all engines (e.g., statpopgen only has
76-
# duckdb targets). grep returns exit code 1 when no matches are found.
77-
df_formats=$(echo "$targets" | tr ',' '\n' | (grep '^datafusion:' || true) | grep -v ':lance$' | sed 's/datafusion://' | tr '\n' ',' | sed 's/,$//')
76+
# duckdb targets). grep returns exit code 1 when no matches are found. Both greps must be in the
77+
# subshell so that `|| true` covers the case where grep -v receives empty input.
78+
df_formats=$(echo "$targets" | tr ',' '\n' | (grep '^datafusion:' | grep -v ':lance$' || true) | sed 's/datafusion://' | tr '\n' ',' | sed 's/,$//')
7879
ddb_formats=$(echo "$targets" | tr ',' '\n' | (grep '^duckdb:' || true) | sed 's/duckdb://' | tr '\n' ',' | sed 's/,$//')
7980
has_lance=$(echo "$targets" | grep -q 'datafusion:lance' && echo "true" || echo "false")
8081

0 commit comments

Comments
 (0)