Skip to content

Add timestamp support to Pinot connector#14244

Merged
martint merged 1 commit intotrinodb:masterfrom
xiangfu0:timestamp-index
Sep 27, 2022
Merged

Add timestamp support to Pinot connector#14244
martint merged 1 commit intotrinodb:masterfrom
xiangfu0:timestamp-index

Conversation

@xiangfu0
Copy link
Copy Markdown
Contributor

@xiangfu0 xiangfu0 commented Sep 21, 2022

Description

Add support for TIMESTAMP data type in Pinot connector.

Release notes

# Pinot Changes
* Add support for `timestamp` type. (#10199)

@xiangfu0
Copy link
Copy Markdown
Contributor Author

Since #12145 becomes stale, I just took it over and rebased the latest code.
All credit goes to @ddcprg .

@ddcprg
Copy link
Copy Markdown
Member

ddcprg commented Sep 22, 2022

@xiangfu0 apologies for the delay and many thanks for rebasing the code. Unfortunately I don't have my personal laptop where I am but I'm happy to either continue the code review on this PR or rebasing your branch into mine next Monday if Trino developers prefer to continue reviewing that instead

Comment on lines 1556 to 1562
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.

I think we don't need this test doesn't support SUPPORTS_CREATE_TABLE behavior.

Copy link
Copy Markdown
Contributor Author

@xiangfu0 xiangfu0 Sep 22, 2022

Choose a reason for hiding this comment

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

The base class don't have the check for SUPPORTS_CREATE_TABLE, so need o override here.

Copy link
Copy Markdown
Member

@ebyhr ebyhr Sep 27, 2022

Choose a reason for hiding this comment

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

No need to override. The base class has the behavior check.

@Test
public void testCreateTable()
{
if (!hasBehavior(SUPPORTS_CREATE_TABLE)) {
assertQueryFails("CREATE TABLE xxxx (a bigint, b double)", "This connector does not support creating tables");
return;
}

@xiangfu0 xiangfu0 force-pushed the timestamp-index branch 2 times, most recently from 88d9b2b to fee1273 Compare September 22, 2022 08:06
@xiangfu0
Copy link
Copy Markdown
Contributor Author

xiangfu0 commented Sep 22, 2022

@xiangfu0 apologies for the delay and many thanks for rebasing the code. Unfortunately I don't have my personal laptop where I am but I'm happy to either continue the code review on this PR or rebasing your branch into mine next Monday if Trino developers prefer to continue reviewing that instead

Since there are a bunch of refactors happened, I would just go with this PR.

@xiangfu0
Copy link
Copy Markdown
Contributor Author

Hi @Praveen2112 , thanks for your review. Can u do another pass?

@xiangfu0 xiangfu0 force-pushed the timestamp-index branch 3 times, most recently from 3762bd3 to a83f08b Compare September 23, 2022 23:35
Copy link
Copy Markdown
Member

@ddcprg ddcprg left a comment

Choose a reason for hiding this comment

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

thanks for rebasing and reviving the PR

@xiangfu0
Copy link
Copy Markdown
Contributor Author

cc: @ebyhr as well

@martint martint merged commit 5ff14f1 into trinodb:master Sep 27, 2022
@xiangfu0 xiangfu0 deleted the timestamp-index branch September 27, 2022 00:30
@xiangfu0
Copy link
Copy Markdown
Contributor Author

Many thanks @martint !

@github-actions github-actions bot added this to the 398 milestone Sep 27, 2022
Comment on lines +1552 to +1555
public void testPredicatePushdown()
{
assertThat(query("SELECT timestamp_col FROM " + ALL_TYPES_TABLE + " WHERE timestamp_col < TIMESTAMP '1971-01-01 00:00:00.000'"))
.isFullyPushedDown();
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 method name is testPredicatePushdown but the test is specific to timestamp type. Moving to testTimestamp seems better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

5 participants