Naresh P R created HIVE-24877: --------------------------------- Summary: Support X'xxxx' syntax for hexadecimal values like spark & mysql Key: HIVE-24877 URL: https://issues.apache.org/jira/browse/HIVE-24877 Project: Hive Issue Type: New Feature Reporter: Naresh P R
Hive is currently not supporting following syntax select x'abc'; {code:java} org.apache.hadoop.hive.ql.parse.ParseException: line 2:8 cannot recognize input near 'x' ''abc'' '<EOF>' in selection target org.apache.hadoop.hive.ql.parse.ParseException: line 2:8 cannot recognize input near 'x' ''31FECCCCCC'' '<EOF>' in selection target at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:125) at org.apache.hadoop.hive.ql.parse.ParseUtils.parse(ParseUtils.java:93) at org.apache.hadoop.hive.ql.parse.ParseUtils.parse(ParseUtils.java:85) at org.apache.hadoop.hive.ql.Compiler.parse(Compiler.java:169) at org.apache.hadoop.hive.ql.Compiler.compile(Compiler.java:102) at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:492) at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:445){code} Though we have same via hex/unhex built-in UDF's, it's better to have {{X'value'}} and x'{{value'}} syntax support for Hive. [https://spark.apache.org/docs/latest/sql-ref-literals.html#binary-literal] [https://dev.mysql.com/doc/refman/8.0/en/string-functions.html#function_hex] https://mariadb.com/kb/en/hexadecimal-literals/ -- This message was sent by Atlassian Jira (v8.3.4#803005)