kasakrisz commented on code in PR #6204:
URL: https://github.com/apache/hive/pull/6204#discussion_r2556125374


##########
parser/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g:
##########
@@ -2363,7 +2363,8 @@ columnConstraintType
     ;
 
 defaultVal
-    : constant
+    : (PLUS | MINUS) unsignedNumericLiterals
+    | constant
     | function
     | castExpression

Review Comment:
   How about extending the grammar to support it?
   It is supported in select clause. And functions too
   ```
   explain ast
   select -cast(22.0 as int), +log2(16);
   ```
   ```
   TOK_QUERY
      TOK_INSERT
         TOK_DESTINATION
            TOK_DIR
               TOK_TMP_FILE
         TOK_SELECT
            TOK_SELEXPR
               -
                  TOK_FUNCTION
                     TOK_INT
                     22.0
            TOK_SELEXPR
               +
                  TOK_FUNCTION
                     log2
                     16
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to