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
[FLINK-18325] [table-common] Handle null when calling SqlDataTypeSpec#getNullable #13836
Conversation
394a442
to
ef8fb07
Compare
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community Automated ChecksLast check on commit 394a442 (Thu Oct 29 07:22:11 UTC 2020) Warnings:
Mention the bot in a comment to re-run the automated checks. Review Progress
Please see the Pull Request Review Guide for a full explanation of the review process. The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commandsThe @flinkbot bot supports the following commands:
|
Can someone review this PR? |
From the implementation of |
Yes, we always set the flag in Flink so it should be null-safe, but adding an explicit check is better(in case maybe there are some changes in the parser later on). |
Thanks @danny0405 . Then I'm fine with this PR. LGTM. |
…ec#getNullable This closes apache#13836
Build is passed: https://dev.azure.com/imjark/Flink/_build/results?buildId=317&view=results |
What is the purpose of the change
SqlDataTypeSpec#getNullable may return null(by Calcite design, it returns "Boolean" instead "boolean"), so the caller should handle null itself. In Calcite, every place calls this method adds the null judge.
Below is the code from Calcite.
org.apache.calcite.sql.SqlDataTypeSpec
Brief change log
Handle "null" when calling SqlDataTypeSpec#getNullable.
Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: (no)Documentation