Skip to content

Fix bug in dictionary coercion and allow better coercion#3688

Merged
alamb merged 1 commit intoapache:masterfrom
alamb:alamb/dict_coercion
Oct 4, 2022
Merged

Fix bug in dictionary coercion and allow better coercion#3688
alamb merged 1 commit intoapache:masterfrom
alamb:alamb/dict_coercion

Conversation

@alamb
Copy link
Copy Markdown
Contributor

@alamb alamb commented Oct 3, 2022

Which issue does this PR close?

Fixes #3685

Rationale for this change

see #3685

What changes are included in this PR?

  1. Improve dictionary array coercion to allow the value coercion for all the same
  2. tests for same

Are there any user-facing changes?

Less error

@github-actions github-actions Bot added core Core DataFusion crate logical-expr Logical plan and expressions labels Oct 3, 2022
(
DataType::Dictionary(_lhs_index_type, lhs_value_type),
DataType::Dictionary(_rhs_index_type, rhs_value_type),
) => dictionary_value_coercion(lhs_value_type, rhs_value_type),
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Arrow now supports general purpose casting, so we can just call back into the general comparison coercion code

@alamb alamb requested review from andygrove and liukun4515 October 3, 2022 15:29
Copy link
Copy Markdown
Member

@xudong963 xudong963 left a comment

Choose a reason for hiding this comment

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

LGTM

@alamb
Copy link
Copy Markdown
Contributor Author

alamb commented Oct 4, 2022

Thanks for the review @xudong963

@alamb alamb merged commit d0760f3 into apache:master Oct 4, 2022
@ursabot
Copy link
Copy Markdown

ursabot commented Oct 4, 2022

Benchmark runs are scheduled for baseline = 0111732 and contender = d0760f3. d0760f3 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ec2-t3-xlarge-us-east-2] ec2-t3-xlarge-us-east-2
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on test-mac-arm] test-mac-arm
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ursa-i9-9960x] ursa-i9-9960x
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ursa-thinkcentre-m75q] ursa-thinkcentre-m75q
Buildkite builds:
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

@alamb alamb deleted the alamb/dict_coercion branch August 8, 2023 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core DataFusion crate logical-expr Logical plan and expressions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Internal error when evaluating a predicate = "The type of Dictionary(Int16, Utf8) = Int64 of binary physical should be same"

3 participants