-
Notifications
You must be signed in to change notification settings - Fork 162
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
Iceberg ITs #219
Iceberg ITs #219
Conversation
@the-other-tim-brown Please take a look. |
@@ -255,14 +280,11 @@ private Object generateRandomValueForType( | |||
return LocalDate.ofEpochDay(randomDay); | |||
case TIME: | |||
long totalMicrosInDay = ChronoUnit.DAYS.getDuration().toMillis() * 1000; | |||
long randomTimeInMicros = ThreadLocalRandom.current().nextLong(totalMicrosInDay); | |||
return randomTimeInMicros; | |||
return ThreadLocalRandom.current().nextLong(totalMicrosInDay); |
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.
Should we just use RANDOM
here instead of ThreadLocalRandom?
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.
It doesn't have method to generate long in range, now moved to generating double and used multiplier.
return icebergDataHelper.getTableSchema().columns().stream() | ||
.map(Types.NestedField::name) | ||
.filter(name -> !name.equals("timestamp_local_micros_nullable_field")) |
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.
can we check if there is a way for Hudi to read this back as the logical type? Do the values read back as timestamps in Delta?
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.
For hudi there is a bug, linked in the comments and it doesn't work for Delta too and I see spark 3.2 has no support for that granularity and coverting to TimestampType doesn't work on the read side (throws errors in parquet read).
Important Read
What is the purpose of the pull request
Brief change log
Verify this pull request
(Please pick either of the following options)
This change added tests and can be verified as follows: