CometGenerateExecSuite |
38 |
generator identity preserves exchange reuse: $generator($input), AQE=$adaptive [8 instances: explode/posexplode x s.arr/slice(s.arr, 1, 10) x AQE false/true] |
keep |
|
CometGenerateExecSuite |
100 |
posexplode with a computed array from Parquet |
convert |
array/posexplode.sql |
CometGenerateExecSuite |
114 |
explode with simple array |
convert |
array/explode_local_table_scan.sql (new) |
CometGenerateExecSuite |
125 |
explode with empty array |
convert |
array/explode_local_table_scan.sql (new) |
CometGenerateExecSuite |
136 |
explode with null array |
convert |
array/explode_local_table_scan.sql (new) |
CometGenerateExecSuite |
147 |
explode_outer with simple array |
convert |
array/explode_local_table_scan.sql (new) |
CometGenerateExecSuite |
158 |
explode_outer with empty array |
convert |
array/explode_local_table_scan.sql (new) |
CometGenerateExecSuite |
169 |
explode_outer with null array |
convert |
array/explode_local_table_scan.sql (new) |
CometGenerateExecSuite |
180 |
explode with multiple columns |
convert |
array/explode_local_table_scan.sql (new) |
CometGenerateExecSuite |
191 |
explode with array of strings |
convert |
array/explode_local_table_scan.sql (new) |
CometGenerateExecSuite |
202 |
explode with filter |
convert |
array/explode_local_table_scan.sql (new) |
CometGenerateExecSuite |
214 |
explode fallback when disabled |
convert |
array/explode_disabled.sql (new) |
CometGenerateExecSuite |
227 |
explode with map input falls back |
convert |
array/explode.sql |
CometGenerateExecSuite |
240 |
explode with nullable projected column |
convert |
array/explode_local_table_scan.sql (new) |
CometGenerateExecSuite |
251 |
explode_outer with nullable projected column |
convert |
array/explode_local_table_scan.sql (new) |
CometGenerateExecSuite |
263 |
explode with mixed null, empty, and non-empty arrays |
convert |
array/explode_local_table_scan.sql (new) |
CometGenerateExecSuite |
280 |
explode_outer with mixed null, empty, and non-empty arrays |
convert |
array/explode_local_table_scan.sql (new) |
CometGenerateExecSuite |
297 |
explode with multiple nullable columns |
convert |
array/explode_local_table_scan.sql (new) |
CometGenerateExecSuite |
312 |
posexplode with simple array |
convert |
array/explode_local_table_scan.sql (new) |
CometGenerateExecSuite |
323 |
posexplode with empty array |
convert |
array/explode_local_table_scan.sql (new) |
CometGenerateExecSuite |
334 |
posexplode with null array |
convert |
array/explode_local_table_scan.sql (new) |
CometGenerateExecSuite |
345 |
posexplode_outer with simple array |
convert |
array/explode_local_table_scan.sql (new) |
CometGenerateExecSuite |
356 |
posexplode with array of strings |
convert |
array/explode_local_table_scan.sql (new) |
CometGenerateExecSuite |
367 |
posexplode with nullable elements |
convert |
array/explode_local_table_scan.sql (new) |
CometGenerateExecSuite |
381 |
posexplode with multiple projected columns |
convert |
array/explode_local_table_scan.sql (new) |
CometGenerateExecSuite |
393 |
posexplode with map input falls back |
covered |
array/posexplode.sql |
CometGenerateExecSuite |
406 |
posexplode with array of structs |
convert |
array/explode_local_table_scan.sql (new) |
CometGenerateExecSuite |
421 |
posexplode in lateral view |
convert |
array/explode_local_table_scan.sql (new) |
CometGenerateExecSuite |
436 |
posexplode of literal array |
convert |
array/explode_local_table_scan.sql (new) |
CometGenerateExecSuite |
447 |
posexplode across batch boundary with small batch size |
convert |
array/explode_small_batches.sql (new) |
CometGenerateExecSuite |
465 |
explode_outer across batch boundary with mixed empty/null rows |
convert |
array/explode_small_batches.sql (new) |
CometGenerateExecSuite |
488 |
posexplode_outer across batch boundary with mixed empty/null rows |
convert |
array/explode_small_batches.sql (new) |
CometGenerateExecSuite |
523 |
posexplode over limit with offset |
convert |
array/explode_limit_offset.sql (new) |
CometGenerateExecSuite |
539 |
posexplode_outer over limit with offset |
convert |
array/explode_limit_offset.sql (new) |
CometGenerateExecSuite |
561 |
explode over limit with offset |
convert |
array/explode_limit_offset.sql (new) |
CometGenerateExecSuite |
580 |
explode_outer over limit with offset |
convert |
array/explode_limit_offset.sql (new) |
CometGenerateExecSuite |
613 |
posexplode single row exceeds batch size |
convert |
array/explode_small_batches.sql (new) |
CometGenerateExecSuite |
629 |
posexplode_outer single row exceeds batch size |
convert |
array/explode_small_batches.sql (new) |
CometGenerateExecSuite |
646 |
explode single row exceeds batch size |
convert |
array/explode_small_batches.sql (new) |
CometGenerateExecSuite |
691 |
$generator of structs keeps boolean fields past the first output batch [instances: explode, explode_outer, posexplode, posexplode_outer] |
convert |
array/explode_boolean_struct.sql (new) |
CometGenerateExecSuite |
700 |
explode of structs keeps boolean fields when one row exceeds the batch size |
convert |
array/explode_boolean_struct_batch_100.sql (new) |
CometGenerateExecSuite |
710 |
named_struct over an exploded boolean keeps its values |
convert |
array/explode_boolean_struct.sql (new) |
CometGenerateExecSuite |
717 |
boolean ScalaUDF over an exploded boolean keeps its values |
keep |
|
Part of #6615.
What / Why
This issue moves the generator coverage in
exec/CometGenerateExecSuiteto Comet SQL tests:explode,explode_outer,posexplode,posexplode_outer, over arrays and struct arrays, across batch boundaries, and underLIMIT ... OFFSET. Fixtures go undersql-tests/expressions/array/, next toexplode.sqlandposexplode.sql. Static analysis onmainat 3bc2faa found the following:CometGenerateExecSuiteNearly everything converts. The plan-shape test and the ScalaUDF test stay.
Work
Line numbers refer to
CometGenerateExecSuite.explode_local_table_scan.sql(new), covering the 24Seq.toDFtests from L114 to L436 except L214, L227 and L393-- Config: spark.comet.exec.localTableScan.enabled=truewith inlineVALUES.explode.sql/posexplode.sqlover Parquet. What this file adds is the source: Parquet always reads arrays back withcontainsNull=true, whileSeq.toDFgives non-null elements, which is the bug: array/map kernels crash on non-null child field via CometLocalTableScanExec #4789 hazard.ConvertToLocalRelationfolds only Project, Filter and Limit, so a Generate overVALUESstill reaches the native explode.NULL, becauseCAST(NULL AS ARRAY<INT>)makes the elements nullable again.explode_disabled.sql(new, L214): setspark.comet.exec.explode.enabled=falseand assert the fallback reason.explode.sql(L227): add theexplode(m)fallback.rand()query out into its own file. The whole file is gatedMinSparkVersion: 3.5for that one query, so today it is skipped entirely on Spark 3.4.posexplode.sql(L100): addposexplode(split(s, 'x')).explode_small_batches.sql(new): L447, L465, L488, L613, L629, L646, using-- ConfigMatrix: spark.comet.batchSize=4,8and single-file tables.explode_limit_offset.sql(new): L523, L539, L561, L580, using single-file tables withLIMIT 4 OFFSET 1(ListPositionsExpr panics on sliced list input, breaking native posexplode over LIMIT with OFFSET #5224).explode_boolean_struct.sql(new): L691 (four instances) and L710, using a 3000-row table generated withhash()(Native explode returns wrong booleans for arrays of structs after the first batch of output #6464).explode_boolean_struct_batch_100.sql(new): L700, withspark.comet.batchSize=100.Use
INSERT INTO t SELECT /*+ COALESCE(1) */ ...orrange(0, n, 1, 1)for every batch-boundary fixture.INSERT ... VALUESwrites one file per row and would never put two rows in one batch.Stays in Scala
CometExplodeExeccanonicalization (outer and non-outer must differ, identical generators must match) and aReusedExchangeExecover the generator with AQE on. That is plan shape.Notes on the Scala tests
InferFiltersFromGenerateadds a non-NULL, non-empty filter, andConvertToLocalRelationapplies it to theSeqdata at plan time. The fixtures keep the queries, but the coverage that matters is in the_outervariants.-0.0.explode.sql:142,156andposexplode.sql:131writecast(-0.0 as float/double), which is+0.0. Usefloat('-0.0')/double('-0.0').Done when
.github/workflows/pr_build_linux.ymlandpr_build_macos.yml.run-all-spark-profiles, because pull requests run only the default profile.Every Scala test in scope, with its verdict and target fixture
CometGenerateExecSuiteCometGenerateExecSuiteCometGenerateExecSuiteCometGenerateExecSuiteCometGenerateExecSuiteCometGenerateExecSuiteCometGenerateExecSuiteCometGenerateExecSuiteCometGenerateExecSuiteCometGenerateExecSuiteCometGenerateExecSuiteCometGenerateExecSuiteCometGenerateExecSuiteCometGenerateExecSuiteCometGenerateExecSuiteCometGenerateExecSuiteCometGenerateExecSuiteCometGenerateExecSuiteCometGenerateExecSuiteCometGenerateExecSuiteCometGenerateExecSuiteCometGenerateExecSuiteCometGenerateExecSuiteCometGenerateExecSuiteCometGenerateExecSuiteCometGenerateExecSuiteCometGenerateExecSuiteCometGenerateExecSuiteCometGenerateExecSuiteCometGenerateExecSuiteCometGenerateExecSuiteCometGenerateExecSuiteCometGenerateExecSuiteCometGenerateExecSuiteCometGenerateExecSuiteCometGenerateExecSuiteCometGenerateExecSuiteCometGenerateExecSuiteCometGenerateExecSuiteCometGenerateExecSuiteCometGenerateExecSuiteCometGenerateExecSuiteCometGenerateExecSuite