-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Add date support to kudu #20086
Add date support to kudu #20086
Conversation
Add support to Kudu update Test to support Date type
Could you confirm CI failure? |
Yes, I do. I'm working on it. |
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.
Please capitalize the commit message and squash commits into one. https://github.com/trinodb/trino/blob/master/.github/DEVELOPMENT.md#format-git-commit-messages
@@ -84,7 +84,7 @@ public static org.apache.kudu.Type toKuduClientType(Type type) | |||
return org.apache.kudu.Type.DECIMAL; | |||
} | |||
if (type == DateType.DATE) { | |||
return org.apache.kudu.Type.STRING; | |||
return org.apache.kudu.Type.DATE; |
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.
Older Kudu versions don't support DATE type, right? What's the EOL of those versions?
We should use the different type mapping based on the server version if this change breaks existing environments.
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.
The trino kudu connector has dependency of kudu version 1.15.0 whitch supporting date. End users do not understand why trino kudu connector does not support what their server support with kudu client 1.15.0.
I don't have EOL for kudu
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.
The internal dependency is unrelated to users. Our official documentation mentions 1.13.0 is the minimum supported version. I would recommend making sure the EOL.
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.
I think Kudu supports date from 1.12.0 https://kudu.apache.org/docs/prior_release_notes.html#rn_1.12.0 so I guess we are good here. WDYT @ebyhr ?
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.
👍
assertUpdate(format("INSERT INTO %s VALUES (DATE '-0001-01-01')", table.getName()), 1); | ||
} | ||
catch (Exception error) { | ||
assertThat(error).hasMessageContaining("is out of range"); |
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.
Please revert and use assertQueryFails
.
plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduConnectorTest.java
Show resolved
Hide resolved
if (type.equals(DateType.DATE)) { | ||
return row.getInt(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.
Is this condition really needed?
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.
yes, it's. Otherwise, anyother type will be picked and that throw and exception. That my guess. isn't it ?
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.
I don't think the method takes DATE type.
@@ -16,6 +16,7 @@ | |||
import com.google.common.collect.ImmutableList; | |||
import io.airlift.slice.Slice; | |||
import io.trino.spi.Page; | |||
import io.trino.spi.TrinoException; |
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.
Please update type mapping section in kudu.md.
@@ -182,7 +182,7 @@ protected MaterializedResult getDescribeOrdersResult() | |||
.row("custkey", "bigint", extra, "") | |||
.row("orderstatus", "varchar", extra, "") | |||
.row("totalprice", "double", extra, "") | |||
.row("orderdate", "varchar", extra, "") | |||
.row("orderdate", "date", extra, "") |
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.
Please update filterDataMappingSmokeTestData
.
Please rebase on master to resolve conflicts. |
This pull request has gone a while without any activity. Tagging the Trino developer relations team: @bitsondatadev @colebow @mosabua |
👋 @pgasp could you please rebase the PR and address any comments so we can proceed with review towards merge. |
This pull request has gone a while without any activity. Tagging the Trino developer relations team: @bitsondatadev @colebow @mosabua |
This pull request has gone a while without any activity. Tagging the Trino developer relations team: @bitsondatadev @colebow @mosabua |
Closing this pull request, as it has been stale for six weeks. Feel free to re-open at any time. |
Superseded by #22497 |
Add support to Kudu
update Test to support Date type
Description
Adding Date Support to Kudu Connector
Test updated accordingly
Additional context and related issues
related to PR : #11009
Release notes
( ) This is not user-visible or is 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: