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

Add simplification rules for the CONCAT function #3684

Merged
merged 4 commits into from
Oct 11, 2022

Conversation

HaoYang670
Copy link
Contributor

@HaoYang670 HaoYang670 commented Oct 3, 2022

Signed-off-by: remzi [email protected]

Which issue does this PR close?

Closes #3683 .

Rationale for this change

What changes are included in this PR?

  1. cast all scalar values to utf8
  2. drop null values
  3. concatenate contiguous scalar values

Are there any user-facing changes?

Signed-off-by: remzi <[email protected]>
@github-actions github-actions bot added the optimizer Optimizer rules label Oct 3, 2022
@alamb alamb changed the title Simplify the CONCAT function Add simplification rules for the CONCAT function Oct 3, 2022
@HaoYang670 HaoYang670 marked this pull request as draft October 5, 2022 03:44
@HaoYang670
Copy link
Contributor Author

Mark the PR as a draft because the type-coercion rule for concat hasn't been added yet.

@HaoYang670
Copy link
Contributor Author

File #3720 to add type coercion rule.

@HaoYang670 HaoYang670 marked this pull request as ready for review October 9, 2022 09:58
@HaoYang670 HaoYang670 requested a review from alamb October 10, 2022 01:01
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.

This is great -- thanks @HaoYang670

lit(""),
null,
]);
let expected = build_concat_expr(&[col("c0"), lit("hello rust"), col("c1")]);
Copy link
Contributor

Choose a reason for hiding this comment

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

this is very clever

@alamb alamb merged commit ac1631a into apache:master Oct 11, 2022
@ursabot
Copy link

ursabot commented Oct 11, 2022

Benchmark runs are scheduled for baseline = 0cf5630 and contender = ac1631a. ac1631a 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
optimizer Optimizer rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Concatenate contiguous literal arguments of CONCAT during the expression simplification.
3 participants