chore(audit): audit BitAndAgg and expand tests#4437
Open
andygrove wants to merge 1 commit into
Open
Conversation
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.
Which issue does this PR close?
N/A. Autonomous audit pass.
Rationale for this change
Audit of the
bit_andexpression (BitAndAgg) against Spark 3.4.3, 3.5.8, and 4.0.1. The Spark source is identical across all three versions, and Comet delegates the aggregate to DataFusion'sbit_and_udaf. Static review found no behavioural divergence and no missinggetIncompatibleReasons/getUnsupportedReasonsoverrides. Existing SQL coverage only exercisedintwith a single nullable row; this audit expands coverage to the remaining integral types and additional edge cases.What changes are included in this PR?
spark_expressions_support.mdfor Spark 3.4.3, 3.5.8, 4.0.1expressions/aggregate/bit_agg.sql: all integral types (tinyint, smallint, int, bigint), all-NULL group, empty input, HAVING clause, DISTINCT, boundary values (Int.MinValue/MaxValue, Long.MinValue/MaxValue), and a literal argumentHow are these changes tested?
./mvnw test -DwildcardSuites=CometSqlFileTestSuite -Dsuites="org.apache.comet.CometSqlFileTestSuite bit_agg" -Dtest=none -Dscalastyle.skip=true(passes locally)Note: the audit also drafted a
bit_and OVER (...)window-form test, but removed it because Comet'sWindowExecis gated behindspark.comet.operator.WindowExec.allowIncompatible=truedue to known correctness issues unrelated tobit_and. That fallback path is not specific to this expression.Scaffolded by the
audit-comet-expression-autonomousskill.