impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Behm (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-3726: Add support for Kudu-specific column options
Date Thu, 10 Nov 2016 07:09:45 GMT
Alex Behm has posted comments on this change.

Change subject: IMPALA-3726: Add support for Kudu-specific column options

Patch Set 1:


Responding to comments.
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.
File fe/src/main/java/org/apache/impala/analysis/

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 &&
> 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
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: I727b9ae1b7b2387db752b58081398dd3f3449c02
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Dimitris Tsirogiannis <>
Gerrit-Reviewer: Alex Behm <>
Gerrit-Reviewer: Dimitris Tsirogiannis <>
Gerrit-HasComments: Yes

View raw message