You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "zhongyujiang (via GitHub)" <gi...@apache.org> on 2023/02/14 12:45:26 UTC
[GitHub] [iceberg] zhongyujiang opened a new pull request, #6836: Parquet: Optimize dictionary filter evaluation ontIn and notEq
zhongyujiang opened a new pull request, #6836:
URL: https://github.com/apache/iceberg/pull/6836
This moves the null check forward in `notIn` and `notEq` so that we can avoid reading the dictionary when the column might contain null values.
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
[GitHub] [iceberg] zhongyujiang commented on a diff in pull request #6836: Parquet: Optimize dictionary filter evaluation on notIn and notEq
Posted by "zhongyujiang (via GitHub)" <gi...@apache.org>.
zhongyujiang commented on code in PR #6836:
URL: https://github.com/apache/iceberg/pull/6836#discussion_r1107953666
##########
parquet/src/test/java/org/apache/iceberg/parquet/TestDictionaryRowGroupFilter.java:
##########
@@ -1030,7 +1030,7 @@ public void testMissingDictionaryPageForColumn() {
IllegalStateException.class,
"Failed to read required dictionary page for id: 5",
() ->
- new ParquetDictionaryRowGroupFilter(SCHEMA, notEqual("some_nulls", "some"))
+ new ParquetDictionaryRowGroupFilter(SCHEMA, equal("some_nulls", "some"))
Review Comment:
Thanks for reviewing!
I checked the PR #93 that introduced this UT and the relevant [discussion](https://github.com/apache/iceberg/pull/86#discussion_r253802993). Basically it wants to throw an exception when no dict is available to avoid NPE after calling `dict`. But as @rdblue mentioned [here](https://github.com/apache/iceberg/pull/86#discussion_r253943635), all runs of `dict` in `ParquetDictionaryRowGroupFilter` is guaranteed that there must be a dictionary. So under normal circumstances, this exception will not be thrown out I think. The reason why this UT can catch the exception is because it mocked an abnormal [DictionaryPageReadStore](https://github.com/apache/iceberg/blob/49d833aa83f6d4681c6c9f8473080f6e78124a0e/parquet/src/test/java/org/apache/iceberg/parquet/TestDictionaryRowGroupFilter.java#L1034).
Above is the context about this UT. So I think replacing it with `eq` can still serve the original purpose of verification, right? So I think moving null-check is reasonable because the run of `notEq` or `notIn` is guaranteed there will be a dictionary there. Moving it forward can help avoiding the dictionary decoding overhead when the column has nulls.
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Parquet: Optimize dictionary filter evaluation on notIn and notEq [iceberg]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #6836:
URL: https://github.com/apache/iceberg/pull/6836#issuecomment-2323082446
This pull request has been closed due to lack of activity. This is not a judgement on the merit of the PR in any way. It is just a way of keeping the PR queue manageable. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Parquet: Optimize dictionary filter evaluation on notIn and notEq [iceberg]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #6836:
URL: https://github.com/apache/iceberg/pull/6836#issuecomment-2308585090
This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions.
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Parquet: Optimize dictionary filter evaluation on notIn and notEq [iceberg]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #6836: Parquet: Optimize dictionary filter evaluation on notIn and notEq
URL: https://github.com/apache/iceberg/pull/6836
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
[GitHub] [iceberg] szehon-ho commented on a diff in pull request #6836: Parquet: Optimize dictionary filter evaluation on notIn and notEq
Posted by "szehon-ho (via GitHub)" <gi...@apache.org>.
szehon-ho commented on code in PR #6836:
URL: https://github.com/apache/iceberg/pull/6836#discussion_r1107513022
##########
parquet/src/test/java/org/apache/iceberg/parquet/TestDictionaryRowGroupFilter.java:
##########
@@ -1030,7 +1030,7 @@ public void testMissingDictionaryPageForColumn() {
IllegalStateException.class,
"Failed to read required dictionary page for id: 5",
() ->
- new ParquetDictionaryRowGroupFilter(SCHEMA, notEqual("some_nulls", "some"))
+ new ParquetDictionaryRowGroupFilter(SCHEMA, equal("some_nulls", "some"))
Review Comment:
I'm not sure it's expected behavior then. Looks like original expectation to fail if there is no dictionary value, regardless of whether there are nulls or not? I'm not familiar, maybe worth to check with original author @rdblue
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
[GitHub] [iceberg] zhongyujiang commented on a diff in pull request #6836: Parquet: Optimize dictionary filter evaluation ontIn and notEq
Posted by "zhongyujiang (via GitHub)" <gi...@apache.org>.
zhongyujiang commented on code in PR #6836:
URL: https://github.com/apache/iceberg/pull/6836#discussion_r1105779788
##########
parquet/src/test/java/org/apache/iceberg/parquet/TestDictionaryRowGroupFilter.java:
##########
@@ -1030,7 +1030,7 @@ public void testMissingDictionaryPageForColumn() {
IllegalStateException.class,
"Failed to read required dictionary page for id: 5",
() ->
- new ParquetDictionaryRowGroupFilter(SCHEMA, notEqual("some_nulls", "some"))
+ new ParquetDictionaryRowGroupFilter(SCHEMA, equal("some_nulls", "some"))
Review Comment:
The old UT will fail after this change because `notEq` will not try to read the dictionary when there may exist null values. Fixed it by using `eq` as the predicate.
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org