Alex Behm has posted comments on this change. Change subject: IMPALA-3726: Add support for Kudu-specific column options ......................................................................
Patch Set 1: (4 comments) Responding to comments. http://gerrit.cloudera.org:8080/#/c/5026/1/fe/src/main/cup/sql-parser.cup File fe/src/main/cup/sql-parser.cup: Line 1286: comment_val ::= > This was required to resolve conflicts in column options. I'll see if we ca Ahh, makes sense to have it there. I'd say leave it. http://gerrit.cloudera.org:8080/#/c/5026/1/fe/src/main/java/org/apache/impala/analysis/ColumnDef.java File fe/src/main/java/org/apache/impala/analysis/ColumnDef.java: Line 77: // Encoding for this column (used in Kudu); set in the analysis. > Yes, so the parser sets the string val and then during the analysis we conv I missed that, sorry. Line 242: if (defaultValue_.getType().isNull() && ((isNullable_ != null && !isNullable_) > As is today, columns are non-nullable by default but the check here simply Agree. I was thinking of a scenario where Kudu is configured to make columns non-nullable by default. In that case, we should reject a NULL default value even if the isNullable_ is not set. That's why I was thinking it might be easier to just have Kudu deal with it. Line 255: defaultValue_ = LiteralExpr.create(castLiteral, analyzer.getQueryCtx()); > We already guarantee that the type of the default value is castable to the I remember that earlier case (maybe we got it wrong there, too?). LiteralExpr.create() will return whatever minimum type the evaluation results in. Let's way we have an int column and use a 1 + 1 default value. I'm pretty sure that the type of defaultValue_ here will be tinyint and not int. -- To view, visit http://gerrit.cloudera.org:8080/5026 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I727b9ae1b7b2387db752b58081398dd3f3449c02 Gerrit-PatchSet: 1 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Dimitris Tsirogiannis <[email protected]> Gerrit-Reviewer: Alex Behm <[email protected]> Gerrit-Reviewer: Dimitris Tsirogiannis <[email protected]> Gerrit-HasComments: Yes
