-
Notifications
You must be signed in to change notification settings - Fork 164
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
chore: Log warning for tests that are not really testing dictionary-encoded Parquet files #752
base: main
Are you sure you want to change the base?
Conversation
…e and does not create any dictionaries
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did a lot of tests not have dictionary encoded data?
If the number is not large, might be better to fix the tests and throw an error here.
if (withDictionary) { | ||
// if the test specified to write dictionary-encoded data, we should check that we actually wrote some | ||
// dictionary-encoded data | ||
val files = file.listFiles(new FilenameFilter { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a nit: I feel this code checks if any column has RLE encoding, however RLE is on row group level? that means every page of the every column may or may not encoded. If lets say column C1 encoded, C2 nope, than no warning shown but we use exactly C2 for testing
Which issue does this PR close?
N/A
Rationale for this change
Many tests use the following pattern to cover testing with dictionary-encoded data.
However, in many cases, including this example, the data does not contain repeated values and therefore does not cause any dictionary-encoded arrays to be created.
What changes are included in this PR?
Log a warning when
withParquetTable
is called withwithDictionary=true
and when the parquet file does not actually contain dictionary-encoded data.I was originally going to add an assertion instead of a log message but it was too disruptive.
Example output from running tests:
How are these changes tested?
No functional change to test. Manually tested that logging appears.