Repository navigation
[POC] Add Sqlstorm queries to velox-testing - #437
Draft
GregoryKimball wants to merge 8 commits into
Draft
GregoryKimball wants to merge 8 commits into
GregoryKimball wants to merge 8 commits into
Conversation
Add --use-public-images to the start scripts, which pulls the public coordinator and worker images and tags them as the local service images instead of building. Make the native worker launch work with those images: clear the GPU image ENTRYPOINT, mount the profiling wrapper, and skip NUMA pinning when numactl is not installed. Disable the mmap allocator on hosts whose page size is not 4KB.
Convert the SQLStorm v1.0 StackOverflow queries from PostgreSQL to Presto with sqlglot plus semantics-preserving rewrites, check conversion with EXPLAIN on Presto Java, and run them on Java, native CPU, and native GPU with and without CPU fallback. Includes data download, CSV to Parquet conversion, table registration, a resumable per-query runner with GPU worker crash recovery, and a summary of per-engine pass rates.
…, GROUP BY output aliases, more timestamp casts
…est conditions via FILTER, window FILTER, COUNT(t.*), '{}' arrays
The worker opens ~760 file descriptors at idle on a 72-core host and exceeds Docker's default soft limit of 1024 under load, aborting with 'Too many open files'.
Disabling cudf.ast_expression_enabled avoided worker crashes on aarch64 images without the stack trace fix, but cuDF then cannot evaluate most filters and projections, so no query runs with CPU fallback disabled. Keep the workaround available through GPU_EXTRA_WORKER_CONFIG.
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
This was referenced Nov 5, 2026
meta-codesync Bot
pushed a commit
to facebookincubator/velox
that referenced
this pull request
Nov 9, 2026
## Summary Part of rapidsai/velox-testing#437 (SQLStorm GPU coverage), adapted from GregoryKimball/velox@400a0b59. The cuDF AST has no 32-bit cast. `cast(x AS INTEGER)` was lowered to `CAST_TO_INT64`, so comparisons and arithmetic with INTEGER operands failed with "An AST expression was provided non-matching operand types". Casts to INTEGER are now evaluated by `CastFunction`. Tests compare GPU results against the CPU with INTEGER-typed literals. - `isAstExprSupported` and `pushExprToTree` lower only casts to BIGINT to `CAST_TO_INT64`. A cast to INTEGER now runs as a precomputed function instead of a fused AST node. Differential Revision: D130722444 Pull Request resolved: #20194
This was referenced Nov 11, 2026
meta-codesync Bot
pushed a commit
to facebookincubator/velox
that referenced
this pull request
Nov 13, 2026
## Summary Part of rapidsai/velox-testing#437. Adapted from the FILTER-mask support in GregoryKimball/velox@f0336a09. Enable GPU execution of grouped `array_agg(x) FILTER (WHERE m)`, preserving the configured null-handling semantics. When null values are retained, wrap the values in a one-field struct whose validity is the filter mask, so collecting the valid rows drops only the masked ones. When null values are excluded, combine the filter mask with input validity without copying the input values. Groups with no retained elements return NULL, including in partial output. - Support is limited to grouped aggregation; global filtered `array_agg` continues to run on the CPU. Differential Revision: D131841046 Pull Request resolved: #20280
Open
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a sweep that runs the SQLStorm v1.0 StackOverflow queries (18,251 LLM-generated PostgreSQL queries, 1GB dba.stackexchange dataset) against four Presto configurations and reports how many queries complete within a per-query time limit:
cudf.allow_cpu_fallback=false)The no-fallback configuration is a direct measure of GPU operator and expression coverage:
any operator cuDF cannot run fails the query.
Sqlstorm module components
presto/sqlstorm/download_data.sh,sqlstorm/prepare_data.py: fetch the SQLStorm repo and the 1GB CSV dump,convert to Snappy Parquet with lowercase columns, and validate each table's row count against an
independent CSV parse.
sqlstorm/create_tables.py,sqlstorm/schema.py: register the Hive tables.sqlstorm/convert.py: PostgreSQL → Presto translation with sqlglot plus semantics-preservingrewrites for constructs sqlglot leaves in a form Presto rejects (unnest forms,
= ANY(array),subqueries in join conditions,
FILTERclauses,COUNT(t.*), GROUP BY output aliases, timestampcasts, ...). Rewrites that would need an approximation (e.g.
AGE()) are reported as not converted.A query counts as converted if it passes
EXPLAINon Presto Java.sqlstorm/sweep.py,sqlstorm/summarize.py: run queries per engine, record status / Presto errorname / message / elapsed time per query in
run_<engine>.csv, and writesummary.md. Runs areresumable.
run_sqlstorm_sweep.sh: end-to-end orchestration (start cluster, register tables, EXPLAIN on Java,run each engine, stop cluster). GPU engines run one query at a time; a query that kills the GPU
worker is recorded as
crashand only the worker container is restarted (restart_worker.sh).Infrastructure changes outside
presto/sqlstorm/Additional changes for public images
--use-public-imagesfor the Presto start scripts: pullprestodb/presto,prestodb/presto-nativeand the GPU nightly images and tag them as the local service images instead of building.
Public images get their own tag so they never shadow locally built ones.
PRESTO_IMAGE_TAGlets the sweep run locally built images.ENTRYPOINT, which ignores the generated config.Additional changes for GH200
numactlis missing from the image.Velox's
MmapAllocatorcannot start.