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/datafusion that referenced this pull request Aug 20, 2024
Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
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 <jayzhan211@gmail.com>

* add more msg

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* cleanup

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* rm test1

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* nullable for scalar func

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* nullable

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* rm field

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* rm unsafe block and use internal error

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* rm func_name

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* rm nullable option

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* add test

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* add more msg

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* fix test

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* rm row number

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* Update datafusion/expr/src/udaf.rs

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>

* Update datafusion/expr/src/udaf.rs

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>

* fix failed test from #12050

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* cleanup

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* add doc

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

---------

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
wiedld pushed a commit to influxdata/arrow-datafusion that referenced this pull request Oct 4, 2024
…nction, add `AggregateUDFImpl::is_null` (apache#11989)

* schema assertion and fix the mismatch from logical and physical

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* add more msg

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* cleanup

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* rm test1

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* nullable for scalar func

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* nullable

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* rm field

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* rm unsafe block and use internal error

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* rm func_name

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* rm nullable option

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* add test

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* add more msg

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* fix test

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* rm row number

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* Update datafusion/expr/src/udaf.rs

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>

* Update datafusion/expr/src/udaf.rs

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>

* fix failed test from apache#12050

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* cleanup

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* add doc

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

---------

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
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