Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: support min/max for Float16 type #12050

Merged
merged 2 commits into from
Aug 19, 2024
Merged

Conversation

korowa
Copy link
Contributor

@korowa korowa commented Aug 18, 2024

Which issue does this PR close?

Closes #11764.

Rationale for this change

Float16 type support is missing in min/max groups and regular accumulators.

What changes are included in this PR?

Float16 type added to min/max accumulators.

minor: uncommented arrow_casts sqllogictests for float16

Are these changes tested?

Added sqllogictests

Are there any user-facing changes?

@github-actions github-actions bot added sqllogictest SQL Logic Tests (.slt) functions labels Aug 18, 2024
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 -- thank you @korowa

@@ -147,15 +146,14 @@ create table foo as select
arrow_cast(1, 'UInt16') as col_u16,
arrow_cast(1, 'UInt32') as col_u32,
arrow_cast(1, 'UInt64') as col_u64,
-- can't seem to cast to Float16 for some reason
-- arrow_cast(1.0, 'Float16') as col_f16,
arrow_cast(1.0, 'Float16') as col_f16,
Copy link
Contributor

Choose a reason for hiding this comment

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

🎉

@alamb alamb merged commit 7c5a8eb into apache:main Aug 19, 2024
26 checks passed
@alamb
Copy link
Contributor

alamb commented Aug 19, 2024

Thanks again @korowa

jayzhan211 added a commit to jayzhan211/arrow-datafusion that referenced this pull request Aug 20, 2024
jayzhan211 added a commit that referenced this pull request Aug 21, 2024
…nction, add `AggregateUDFImpl::is_null` (#11989)

* schema assertion and fix the mismatch from logical and physical

Signed-off-by: jayzhan211 <[email protected]>

* add more msg

Signed-off-by: jayzhan211 <[email protected]>

* cleanup

Signed-off-by: jayzhan211 <[email protected]>

* rm test1

Signed-off-by: jayzhan211 <[email protected]>

* nullable for scalar func

Signed-off-by: jayzhan211 <[email protected]>

* nullable

Signed-off-by: jayzhan211 <[email protected]>

* rm field

Signed-off-by: jayzhan211 <[email protected]>

* rm unsafe block and use internal error

Signed-off-by: jayzhan211 <[email protected]>

* rm func_name

Signed-off-by: jayzhan211 <[email protected]>

* rm nullable option

Signed-off-by: jayzhan211 <[email protected]>

* add test

Signed-off-by: jayzhan211 <[email protected]>

* add more msg

Signed-off-by: jayzhan211 <[email protected]>

* fix test

Signed-off-by: jayzhan211 <[email protected]>

* rm row number

Signed-off-by: jayzhan211 <[email protected]>

* Update datafusion/expr/src/udaf.rs

Co-authored-by: Andrew Lamb <[email protected]>

* Update datafusion/expr/src/udaf.rs

Co-authored-by: Andrew Lamb <[email protected]>

* fix failed test from #12050

Signed-off-by: jayzhan211 <[email protected]>

* cleanup

Signed-off-by: jayzhan211 <[email protected]>

* add doc

Signed-off-by: jayzhan211 <[email protected]>

---------

Signed-off-by: jayzhan211 <[email protected]>
Co-authored-by: Andrew Lamb <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
functions sqllogictest SQL Logic Tests (.slt)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Min/Max accumulator not implemented for type Float16
2 participants