test: cover json_array_length routing configurations by peterxcli · Pull Request #5940 · apache/datafusion-comet · GitHub
Skip to content

test: cover json_array_length routing configurations - #5940

Open
peterxcli wants to merge 1 commit into
apache:mainfrom
peterxcli:test/json-array-length-routing
Open

peterxcli wants to merge 1 commit into
apache:mainfrom
peterxcli:test/json-array-length-routing

Conversation

@peterxcli

Copy link
Copy Markdown
Member

Which issue does this PR close?

Part of #4616.

Rationale for this change

The json_array_length fixtures compare results but do not distinguish native execution from JVM codegen dispatch. They also omit fallback coverage when the dispatcher is disabled.

What changes are included in this PR?

Add a routing test covering native opt-in and dispatcher settings, column and literal arguments, NULL, empty arrays, and lenient JSON parsing on the default path. Compare results with Spark and check fallback reasons or the native projection's expression payload. Inspecting the payload also covers Spark 4's StaticInvoke rewrite, which does not preserve the expression's implementation tags.

How are these changes tested?

The targeted CometCodegenSuite test and both existing json_array_length SQL fixtures pass locally on Spark 3.5.9 and 4.1.3 with JDK 17. The new test covers 12 query/configuration combinations. make format (Spark 3.5) and Apache RAT passed.

@github-actions github-actions Bot added enhancement New feature or request test Testing related labels Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request test Testing related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant