Skip to content

tests: add SQL file tests for arrays_zip#3794

Draft
andygrove wants to merge 2 commits intoapache:mainfrom
andygrove:feat-arrays-zip
Draft

tests: add SQL file tests for arrays_zip#3794
andygrove wants to merge 2 commits intoapache:mainfrom
andygrove:feat-arrays-zip

Conversation

@andygrove
Copy link
Copy Markdown
Member

Summary

Adds a SQL file test for arrays_zip at spark/src/test/resources/sql-tests/expressions/array/arrays_zip.sql.

arrays_zip is not yet implemented in Comet (tracked in docs/spark_expressions_support.md), so all queries use spark_answer_only mode. This establishes correct expected behavior and makes it easy to tighten tests to query mode once a native implementation is added.

The test file covers:

  • Two-, three-, and four-array zip with column references
  • Mixed element types: int, bigint, string, boolean, double
  • NULL elements within arrays (produce null fields in output structs)
  • NULL array input (entire result is null)
  • Unequal-length arrays (shorter arrays padded with null)
  • Empty arrays as input
  • Literal arguments
  • Zero-argument call returning empty array
  • Single-argument zip
  • Nested arrays as element type
  • Parquet dictionary encoding on and off via ConfigMatrix

@andygrove
Copy link
Copy Markdown
Member Author

@hsiang-c fyi

@hsiang-c
Copy link
Copy Markdown
Contributor

hsiang-c commented Mar 26, 2026

Thanks Andy, I‘ve added a SQL file at #3643, PR is still in draft, I'll wrap it up soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants