Skip to content

Improve array_prepend signature for null and empty array#8625

Merged
alamb merged 1 commit intoapache:mainfrom
jayzhan211:array-append-sig
Dec 31, 2023
Merged

Improve array_prepend signature for null and empty array#8625
alamb merged 1 commit intoapache:mainfrom
jayzhan211:array-append-sig

Conversation

@jayzhan211
Copy link
Contributor

@jayzhan211 jayzhan211 commented Dec 22, 2023

Which issue does this PR close?

Closes #.
Part of #7142

Rationale for this change

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
@github-actions github-actions bot added logical-expr Logical plan and expressions sqllogictest SQL Logic Tests (.slt) labels Dec 22, 2023

# DuckDB: [[]]
# ClickHouse: [[]]
# TODO: We may also return [[]]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unsure should we implement this, return value with larger dimension seems weird to me.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree -- let's not implement this until someone asks for it explicitly


# DuckDB: [null]
# ClickHouse: [null]
# TODO: We may also return [null]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same with this one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Both cases are not considered in array_append

Copy link
Member

@Weijun-H Weijun-H left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @jayzhan211 👍
And I could try to test the null for LargeList after #8569 merged.

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.

Thank you @jayzhan211 -- this is looking very nice. 👌


# DuckDB: [[]]
# ClickHouse: [[]]
# TODO: We may also return [[]]
Copy link
Contributor

Choose a reason for hiding this comment

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

I agree -- let's not implement this until someone asks for it explicitly

@alamb alamb merged commit f0af5eb into apache:main Dec 31, 2023
@alamb
Copy link
Contributor

alamb commented Dec 31, 2023

Thank you for the review @Weijun-H

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

Labels

logical-expr Logical plan and expressions sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants