-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
HIVE-26373: ClassCastException while inserting Avro data into Hbase table for nested struct with Timestamp #3418
Conversation
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.
Most comments are minor but the incorrect results seems to be a serious one that needs futher investigation.
hbase-handler/src/test/results/positive/hbase_avro_nested_timestamp.q.out
Outdated
Show resolved
Hide resolved
itests/util/src/main/java/org/apache/hadoop/hive/hbase/HBaseTestSetup.java
Outdated
Show resolved
Hide resolved
itests/util/src/main/java/org/apache/hadoop/hive/hbase/HBaseTestSetup.java
Outdated
Show resolved
Hide resolved
Hive has been always converting data from local time zone to UTC when writing and from UTC to local time zone when reading. I updated the way the the timestamp is stored in HBase (fc9bc94) to make it coherent with the way it is read by the query. There are properties and Avro file metadata which can control if we want to perform the conversion or not (e.g., |
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.
LGTM, pending tests!
…le with Avro data (Soumyakanti Das reviewed by Stamatis Zampetakis) Closes apache#3418
…le with Avro data (Soumyakanti Das reviewed by Stamatis Zampetakis) Closes apache#3418
What changes were proposed in this pull request?
isPrimitive
returnstrue
for TimestampWhy are the changes needed?
isPrimitive
was returningfalse
and because of thatTimestamp
type was not getting converted toLazyTimestamp
Does this PR introduce any user-facing change?
No
How was this patch tested?
mvn test -Dtest=TestHBaseCliDriver -Dtest.output.overwrite=true -Dqfile=hbase_avro_nested_timestamp.q