You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2023/01/20 10:21:28 UTC
[GitHub] [arrow-datafusion] tustvold opened a new pull request, #4999: Add dictionary_expresions feature (#4386)
tustvold opened a new pull request, #4999:
URL: https://github.com/apache/arrow-datafusion/pull/4999
# Which issue does this PR close?
<!--
We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
-->
Closes #4386
# Rationale for this change
<!--
Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.
-->
Release build of datafusion-cli on master
```
________________________________________________________
Executed in 65.44 secs fish external
usr time 17.23 mins 521.00 micros 17.23 mins
sys time 0.48 mins 0.00 micros 0.48 mins
```
With this feature
```
________________________________________________________
Executed in 48.18 secs fish external
usr time 16.46 mins 567.00 micros 16.46 mins
sys time 0.48 mins 0.00 micros 0.48 mins
```
# What changes are included in this PR?
<!--
There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
-->
Adds a `dictionary_expressions` feature that gates `arrow/dyn_cmp_dict` and `arrow/dyn_arith_dict`. I vacillated a bit on the naming and whether this should enable `arrow/dyn_arith_dict` but figured as this is just plumbing features through, and does not alter the actual DataFusion code, downstreams could not use this feature and manually enabled the desired `arrow` features themselves if they so wish.
# Are these changes tested?
<!--
We typically require tests for all PRs in order to:
1. Prevent the code from being accidentally broken by subsequent changes
2. Serve as another way to document the expected behavior of the code
If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
-->
# Are there any user-facing changes?
<!--
If there are user-facing changes then we may require documentation to be updated before approving the PR.
-->
<!--
If there are any breaking changes to public APIs, please add the `api change` label.
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] tustvold commented on a diff in pull request #4999: Add dictionary_expresions feature (#4386)
Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on code in PR #4999:
URL: https://github.com/apache/arrow-datafusion/pull/4999#discussion_r1082911731
##########
datafusion/physical-expr/Cargo.toml:
##########
@@ -35,12 +35,15 @@ path = "src/lib.rs"
[features]
crypto_expressions = ["md-5", "sha2", "blake2", "blake3"]
default = ["crypto_expressions", "regex_expressions", "unicode_expressions"]
Review Comment:
> Clearly IOx uses it
That is the point I'm trying to make, IOx **doesn't** use it, at least not within any of its tests
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] tustvold merged pull request #4999: Add dictionary_expresions feature (#4386)
Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold merged PR #4999:
URL: https://github.com/apache/arrow-datafusion/pull/4999
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] tustvold commented on a diff in pull request #4999: Add dictionary_expresions feature (#4386)
Posted by GitBox <gi...@apache.org>.
tustvold commented on code in PR #4999:
URL: https://github.com/apache/arrow-datafusion/pull/4999#discussion_r1082628665
##########
datafusion/physical-expr/Cargo.toml:
##########
@@ -35,12 +35,15 @@ path = "src/lib.rs"
[features]
crypto_expressions = ["md-5", "sha2", "blake2", "blake3"]
default = ["crypto_expressions", "regex_expressions", "unicode_expressions"]
Review Comment:
I fairly strongly disagree, it is pretty esoteric. As a data point, none of IOx's integration tests require this, and we use dictionaries a LOT :smile:
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #4999: Add dictionary_expresions feature (#4386)
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #4999:
URL: https://github.com/apache/arrow-datafusion/pull/4999#discussion_r1082954021
##########
datafusion/core/tests/path_partition.rs:
##########
@@ -204,7 +204,7 @@ async fn csv_filter_with_file_col() -> Result<()> {
);
let result = ctx
- .sql("SELECT c1, c2 FROM t WHERE date='2021-10-27' and date!=c1 LIMIT 5")
+ .sql("SELECT c1, c2 FROM t WHERE date='2021-10-27' and c1!='2021-10-27' LIMIT 5")
Review Comment:
I think the partitioning columns in a ListingTable are dictionary encoded
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] tustvold commented on a diff in pull request #4999: Add dictionary_expresions feature (#4386)
Posted by GitBox <gi...@apache.org>.
tustvold commented on code in PR #4999:
URL: https://github.com/apache/arrow-datafusion/pull/4999#discussion_r1082628665
##########
datafusion/physical-expr/Cargo.toml:
##########
@@ -35,12 +35,15 @@ path = "src/lib.rs"
[features]
crypto_expressions = ["md-5", "sha2", "blake2", "blake3"]
default = ["crypto_expressions", "regex_expressions", "unicode_expressions"]
Review Comment:
I fairly strongly disagree, it is pretty esoteric. As a data point, none of IOx's integration tests require this, and we use dictionaries a LOT :smile:
It is important to highlight this isn't "dictionary support" but non-scalar, binary dictionary kernels which are pretty unusual in practice
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] ursabot commented on pull request #4999: Add dictionary_expresions feature (#4386)
Posted by "ursabot (via GitHub)" <gi...@apache.org>.
ursabot commented on PR #4999:
URL: https://github.com/apache/arrow-datafusion/pull/4999#issuecomment-1401813136
Benchmark runs are scheduled for baseline = 5d4038a8463a575328bedbc22b32456f5dcd562c and contender = 9f498bbc8ec5bd0326abe30fe2ffa081a199c904. 9f498bbc8ec5bd0326abe30fe2ffa081a199c904 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ec2-t3-xlarge-us-east-2] [ec2-t3-xlarge-us-east-2](https://conbench.ursa.dev/compare/runs/c49f1e81bd834b7d87a7223f5fa0aa8d...e4175de6c50b4f72b9a18be0a6369773/)
[Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on test-mac-arm] [test-mac-arm](https://conbench.ursa.dev/compare/runs/c4e4fe29e3104e598f6b9d7abfec43c0...5656f9a4985e444689b6ed52d1674908/)
[Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ursa-i9-9960x] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/c11704ae60c5467db1185e2a0293c956...18bb94cabc224075b8a817423d8d8f3c/)
[Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ursa-thinkcentre-m75q] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/c184cf3a43294f65aeba6dd04940f66d...2ba80e04738c412a9a23c118a7e4b2e5/)
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
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #4999: Add dictionary_expresions feature (#4386)
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #4999:
URL: https://github.com/apache/arrow-datafusion/pull/4999#discussion_r1082954021
##########
datafusion/core/tests/path_partition.rs:
##########
@@ -204,7 +204,7 @@ async fn csv_filter_with_file_col() -> Result<()> {
);
let result = ctx
- .sql("SELECT c1, c2 FROM t WHERE date='2021-10-27' and date!=c1 LIMIT 5")
+ .sql("SELECT c1, c2 FROM t WHERE date='2021-10-27' and c1!='2021-10-27' LIMIT 5")
Review Comment:
I think the partitioning columns in a ListingTable are dictionary encoded and this test is verifying the encoding. I think we should put the test back (and gate it with a `#cfg` directive)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #4999: Add dictionary_expresions feature (#4386)
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #4999:
URL: https://github.com/apache/arrow-datafusion/pull/4999#discussion_r1082953544
##########
datafusion/physical-expr/Cargo.toml:
##########
@@ -35,12 +35,15 @@ path = "src/lib.rs"
[features]
crypto_expressions = ["md-5", "sha2", "blake2", "blake3"]
default = ["crypto_expressions", "regex_expressions", "unicode_expressions"]
Review Comment:
> at least not within any of its tests.
🤔 when I didn't enable the dyn dictionary kernels in arrow iox tests failed in some past version
We have it enabled here: https://github.com/influxdata/influxdb_iox/blob/6f39ae342e64848bd6555bddbc1d3fa30050f75e/arrow_util/Cargo.toml#L12
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #4999: Add dictionary_expresions feature (#4386)
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #4999:
URL: https://github.com/apache/arrow-datafusion/pull/4999#discussion_r1082910882
##########
datafusion/physical-expr/Cargo.toml:
##########
@@ -35,12 +35,15 @@ path = "src/lib.rs"
[features]
crypto_expressions = ["md-5", "sha2", "blake2", "blake3"]
default = ["crypto_expressions", "regex_expressions", "unicode_expressions"]
Review Comment:
> I fairly strongly disagree, it is pretty esoteric.
I am not sure how to quantify how esoteric the feature is or how commonly it is used. Clearly IOx uses it. I was just thinking that this PR changes the default behavior
But maybe that is ok.
Perhaps some other committers have thoughts.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #4999: Add dictionary_expresions feature (#4386)
Posted by GitBox <gi...@apache.org>.
alamb commented on code in PR #4999:
URL: https://github.com/apache/arrow-datafusion/pull/4999#discussion_r1082625326
##########
datafusion/physical-expr/Cargo.toml:
##########
@@ -35,12 +35,15 @@ path = "src/lib.rs"
[features]
crypto_expressions = ["md-5", "sha2", "blake2", "blake3"]
default = ["crypto_expressions", "regex_expressions", "unicode_expressions"]
Review Comment:
I think we should keep dictionary support as a default, if possible
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] tustvold commented on a diff in pull request #4999: Add dictionary_expresions feature (#4386)
Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on code in PR #4999:
URL: https://github.com/apache/arrow-datafusion/pull/4999#discussion_r1082911731
##########
datafusion/physical-expr/Cargo.toml:
##########
@@ -35,12 +35,15 @@ path = "src/lib.rs"
[features]
crypto_expressions = ["md-5", "sha2", "blake2", "blake3"]
default = ["crypto_expressions", "regex_expressions", "unicode_expressions"]
Review Comment:
> Clearly IOx uses it
That is the point I'm trying to make, IOx **doesn't** use it, at least not within any of its tests. A user theoretically could construct a query that directly compares dictionary columns, in practice there are extremely limited use-cases that come to mind of this.
This feature was only enabled in https://github.com/apache/arrow-datafusion/pull/4168 prior to that it was disabled
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] tustvold commented on a diff in pull request #4999: Add dictionary_expresions feature (#4386)
Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on code in PR #4999:
URL: https://github.com/apache/arrow-datafusion/pull/4999#discussion_r1082911731
##########
datafusion/physical-expr/Cargo.toml:
##########
@@ -35,12 +35,15 @@ path = "src/lib.rs"
[features]
crypto_expressions = ["md-5", "sha2", "blake2", "blake3"]
default = ["crypto_expressions", "regex_expressions", "unicode_expressions"]
Review Comment:
> Clearly IOx uses it
That is the point I'm trying to make, IOx **doesn't** use it, at least not within any of its tests. A user theoretically could construct a query that directly compares dictionary columns, in practice there are extremely limited use-cases that come to mind of this
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] tustvold commented on a diff in pull request #4999: Add dictionary_expresions feature (#4386)
Posted by GitBox <gi...@apache.org>.
tustvold commented on code in PR #4999:
URL: https://github.com/apache/arrow-datafusion/pull/4999#discussion_r1082332500
##########
datafusion/core/tests/path_partition.rs:
##########
@@ -204,7 +204,7 @@ async fn csv_filter_with_file_col() -> Result<()> {
);
let result = ctx
- .sql("SELECT c1, c2 FROM t WHERE date='2021-10-27' and date!=c1 LIMIT 5")
+ .sql("SELECT c1, c2 FROM t WHERE date='2021-10-27' and c1!='2021-10-27' LIMIT 5")
Review Comment:
I couldn't see a compelling reason why this test needed to test comparison of dictionary columns
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] tustvold commented on a diff in pull request #4999: Add dictionary_expresions feature (#4386)
Posted by GitBox <gi...@apache.org>.
tustvold commented on code in PR #4999:
URL: https://github.com/apache/arrow-datafusion/pull/4999#discussion_r1082628665
##########
datafusion/physical-expr/Cargo.toml:
##########
@@ -35,12 +35,15 @@ path = "src/lib.rs"
[features]
crypto_expressions = ["md-5", "sha2", "blake2", "blake3"]
default = ["crypto_expressions", "regex_expressions", "unicode_expressions"]
Review Comment:
I fairly strongly disagree, it is pretty esoteric. As a data point, none of IOx's integration tests require this, and we use dictionaries a LOT :smile:
It is important to highlight this isn't "dictionary support" but non-scalar, binary kernels which are pretty unusual in practice
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] tustvold commented on pull request #4999: Add dictionary_expresions feature (#4386)
Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on PR #4999:
URL: https://github.com/apache/arrow-datafusion/pull/4999#issuecomment-1401945718
It would appear enabling the dyn_arith_dict kernels causes the CI runner to exceed the available disk space :scream:
Not really sure how best to workaround this...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org