Respect hive.timestamp-precision in Hive views#16258
Merged
findepi merged 1 commit intotrinodb:masterfrom Mar 7, 2023
Merged
Conversation
6f91c32 to
cb82ee3
Compare
ce121d9 to
7c04438
Compare
7c04438 to
5c4a2d8
Compare
homar
approved these changes
Feb 28, 2023
5c4a2d8 to
34da997
Compare
findepi
reviewed
Mar 2, 2023
Member
There was a problem hiding this comment.
The comment indicated the hive_timestamp_nanos.tpch.xxx view should return ts in nano precision (....14.123456789). Why isn't it the case after the change?
Contributor
Author
There was a problem hiding this comment.
The definition of the Trino view is encoded internally in the JSON saved in the metastore.
{"originalSql":"SELECT *\nFROM\n test1\n","catalog":"hive","schema":"default","columns":[{"name":"ts","type":"timestamp(3)"}],"owner":"marius","runAsInvoker":false}
I think in this case the assumption from the comment was false.
Contributor
Author
There was a problem hiding this comment.
Given that hive.timestamp-precision is set to MILLISECONDS (default value) for the hive catalog, I tend to say that the TODO comment was incorrect.
plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveTimestampPrecisionOnHiveViews.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveMetadata.java
Outdated
Show resolved
Hide resolved
34da997 to
64d51df
Compare
64d51df to
901e714
Compare
findepi
approved these changes
Mar 2, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #6295
Additional context and related issues
Release notes
( ) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
(x) Release notes are required, with the following suggested text: