Skip to content

feat: correct struct column names for arrays_zip return type#20886

Merged
comphead merged 1 commit intoapache:mainfrom
comphead:builtin
Mar 12, 2026
Merged

feat: correct struct column names for arrays_zip return type#20886
comphead merged 1 commit intoapache:mainfrom
comphead:builtin

Conversation

@comphead
Copy link
Contributor

@comphead comphead commented Mar 11, 2026

Which issue does this PR close?

For arrays_zip the return type is slightly different comparing to DuckDB, namely the struct field names are different

DuckDB expects a

struct {
  1: ...., 
  2: ...., 
  3: ...., 
  n: ...... 
}

DF got

struct {
  c0: ...., 
  c1: ...., 
  c2: ...., 
  cn: ...... 
}

Some future work - for Spark the field names are 0 based numeration

struct {
  0: ...., 
  1: ...., 
  2: ...., 
  n: ...... 
}
  • Closes #.

Rationale for this change

What changes are included in this PR?

Rename structure field names for arrays_zip return type

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added sqllogictest SQL Logic Tests (.slt) functions Changes to functions implementation labels Mar 11, 2026
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@comphead comphead added this pull request to the merge queue Mar 12, 2026
Merged via the queue into apache:main with commit 57b275a Mar 12, 2026
55 of 56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

functions Changes to functions implementation sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants