-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-54522][SQL][TEST] Variant test suite fixes for shredding configs #53242
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
Conversation
| val keyIterator = (0 until numKeys).iterator | ||
| // We start in long range because the shredded writer writes int64 by default which wouldn't | ||
| // match narrower binaries. | ||
| val keyIterator = (Int.MaxValue + 1L until Int.MaxValue + 1L + numKeys).iterator |
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.
This looks like a regression because it increases the memory requirement heavily, doesn't it, @harshmotw-db ?
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.
@dongjoon-hyun it's still numKeys elements, it just changes the starting value.
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.
Got it. Initially, I worried about the size because numKeys was 128k. After I computed the actual values, I also realized that it doesn't increase effectively.
val numKeys = 128 * 1024
val keyIterator1 = (0 until numKeys).iterator
val keyIterator2 = (Int.MaxValue + 1L until Int.MaxValue + 1L + numKeys).iterator
val entries1 = Array.fill(numKeys)(s"""\"${keyIterator1.next()}\": \"test\"""")
val entries2 = Array.fill(numKeys)(s"""\"${keyIterator2.next()}\": \"test\"""")
val jsonStr1 = s"{${entries1.mkString(", ")}}"
val jsonStr2 = s"{${entries2.mkString(", ")}}"
scala> jsonStr1.length
val res1: Int = 2248186
scala> jsonStr2.length
val res2: Int = 2883584
Thanks.
dongjoon-hyun
left a comment
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.
Instead of adding a regression on the test, can we explicit set the configuration requirement at the beginning of the test case, @harshmotw-db ?
dongjoon-hyun
left a comment
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.
+1, LGTM. Thank you, @harshmotw-db and @cloud-fan .
Merged to master/4.1.
### What changes were proposed in this pull request? This PR makes minor changes to test suites so that they pass with variant shredding-related configs enabled, without hurting the purpose of the tests. ### Why are the changes needed? These changes would help tests pass if shredding configs were enabled by default in the future. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Existing tests. ### Was this patch authored or co-authored using generative AI tooling? No Closes #53242 from harshmotw-db/harshmotw-db/suite_fixes. Authored-by: Harsh Motwani <harsh.motwani@databricks.com> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org> (cherry picked from commit 5b0a667) Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
What changes were proposed in this pull request?
This PR makes minor changes to test suites so that they pass with variant shredding-related configs enabled, without hurting the purpose of the tests.
Why are the changes needed?
These changes would help tests pass if shredding configs were enabled by default in the future.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Existing tests.
Was this patch authored or co-authored using generative AI tooling?
No