-
Notifications
You must be signed in to change notification settings - Fork 191
[FLINK-36303] PostgreSQL timestamp precision 0 not supported #172
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
Conversation
…gresDialect change The expected error message for timestamp precision range needs to match the range in PostgresDialect.
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.
@kgeis Thanks for the quick fix!
LGTM assuming the CI is green.
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.
It's still failed.
Expecting throwable message:
"The precision of field 'f0' is out of the TIMESTAMP precision range [0, 6] supported by CrateDB dialect."
to contain:
"The precision of field 'f0' is out of the TIMESTAMP precision range [1, 6] supported by CrateDB dialect."
Sorry, I didn't realize that change would have impacts elsewhere. Reviewing the code, I question the decision to have the CrateDB dialect extend the PostgreSQL. Just because they talk the same wire protocol doesn't mean their SQL or data types will be the same. For example,
That said, I was able to get the tests running locally (at least through the CrateDB tests), and when I updated the CrateDBDialectTest to follow the PostgreSQLDialectTest, they passed. |
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.
Hi @matriv @eskabetxe , would you mind double checking this PR as well? Thanks in advance.
The background could be found from #142 and FLINK-36303
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'm ok with the change as we are fixing on postgres and not introducing nothing new on CrateDB
We could check after (maybe in another Jira) the CrateDB extension, for timestamp we should fix this, as its only allowed timestmap, the precision should be 3 on min and max.
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.
Thanks @kgeis for the update, and @eskabetxe for the review, merging
Awesome work, congrats on your first merged pull request! |
This is a followup to #142 to make the integration test match the original code change.