Skip to content

Respect hive.timestamp-precision in Hive views#16258

Merged
findepi merged 1 commit intotrinodb:masterfrom
findinpath:findinpath/respect-hive-timestamp-precision-in-hive-views
Mar 7, 2023
Merged

Respect hive.timestamp-precision in Hive views#16258
findepi merged 1 commit intotrinodb:masterfrom
findinpath:findinpath/respect-hive-timestamp-precision-in-hive-views

Conversation

@findinpath
Copy link
Copy Markdown
Contributor

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:

# Hive
* Respect `hive.timestamp-precision` in Hive views ({issue}`issuenumber`)

@cla-bot cla-bot bot added the cla-signed label Feb 24, 2023
@findinpath findinpath marked this pull request as draft February 24, 2023 13:21
@findinpath findinpath force-pushed the findinpath/respect-hive-timestamp-precision-in-hive-views branch from 6f91c32 to cb82ee3 Compare February 24, 2023 22:22
@findinpath findinpath marked this pull request as ready for review February 24, 2023 22:24
@findinpath findinpath force-pushed the findinpath/respect-hive-timestamp-precision-in-hive-views branch 2 times, most recently from ce121d9 to 7c04438 Compare February 25, 2023 23:12
@findinpath findinpath requested a review from losipiuk February 25, 2023 23:13
@findinpath findinpath force-pushed the findinpath/respect-hive-timestamp-precision-in-hive-views branch from 7c04438 to 5c4a2d8 Compare February 25, 2023 23:16
@findinpath findinpath force-pushed the findinpath/respect-hive-timestamp-precision-in-hive-views branch from 5c4a2d8 to 34da997 Compare March 1, 2023 20:02
@github-actions github-actions bot added the hive Hive connector label Mar 2, 2023
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was the TODO here incorrect?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@findinpath findinpath force-pushed the findinpath/respect-hive-timestamp-precision-in-hive-views branch from 34da997 to 64d51df Compare March 2, 2023 09:28
@findinpath findinpath force-pushed the findinpath/respect-hive-timestamp-precision-in-hive-views branch from 64d51df to 901e714 Compare March 2, 2023 09:29
@findinpath findinpath requested a review from findepi March 2, 2023 09:31
@findepi findepi merged commit 52518b6 into trinodb:master Mar 7, 2023
@github-actions github-actions bot added this to the 410 milestone Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed hive Hive connector

Development

Successfully merging this pull request may close these issues.

Respect hive.timestamp-precision in Hive VIEW

3 participants