-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[CALCITE-6764] Field access from a nullable ROW should be nullable #4127
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Mihai Budiu <[email protected]>
Quality Gate passedIssues Measures |
@@ -160,15 +155,7 @@ public int getFailureCount() { | |||
++failCount; | |||
return litmus.fail(null); | |||
} | |||
final RelDataTypeField typeField = refType.getFieldList().get(index); |
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.
In the process of my use, the verification here is indeed effective. If only the nullability value is different, we can add 'RelOptUtil. eqIgnoreNullable'` to replace 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.
Ok, I will add this check back.
@@ -65,6 +67,18 @@ public class RexFieldAccess extends RexNode { | |||
this.expr = expr; |
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.
We can directly use this(expr, field, field.getType());
.
CalciteConnection calciteConnection = connection.unwrap(CalciteConnection.class); | ||
calciteConnection.getRootSchema().add("T", new RowTable()); | ||
Statement statement = calciteConnection.createStatement(); | ||
ResultSet resultSet = statement.executeQuery("SELECT P['a'].K FROM T"); |
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.
Do we need to verify the metadataResultSet#getMetaData
is nullable? I'm not sure if this is possible.
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.
There is no nullability information as far as I know.
No description provided.