[
https://issues.apache.org/jira/browse/DRILL-3136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14611039#comment-14611039
]
Chris Westin commented on DRILL-3136:
-------------------------------------
Does this only happen from the sqlline CLI, or does the API also reject these?
> Binary string literal spaces rejected
> -------------------------------------
>
> Key: DRILL-3136
> URL: https://issues.apache.org/jira/browse/DRILL-3136
> Project: Apache Drill
> Issue Type: Bug
> Reporter: Daniel Barclay (Drill)
>
> Spaces allowed by standard SQL's grammar in binary string literals are
> rejected:
> {noformat}
> 0: jdbc:drill:zk=local> SELECT X'0F 0F' FROM INFORMATION_SCHEMA.CATALOGS;
> May 18, 2015 12:55:21 PM
> org.apache.calcite.sql.validate.SqlValidatorException <init>
> SEVERE: org.apache.calcite.sql.validate.SqlValidatorException: Binary literal
> string must contain only characters '0' - '9', 'A' - 'F'
> May 18, 2015 12:55:21 PM org.apache.calcite.runtime.CalciteException <init>
> SEVERE: org.apache.calcite.runtime.CalciteContextException: From line 1,
> column 8 to line 1, column 15: Binary literal string must contain only
> characters '0' - '9', 'A' - 'F'
> Error: PARSE ERROR: Binary literal string must contain only characters '0' -
> '9', 'A' - 'F'
> [Error Id: 5e09f9b2-2029-4d83-9b3e-048ac5fdcad1 on dev-linux2:31010]
> (state=,code=0)
> 0: jdbc:drill:zk=local>
> {noformat}
> ISO-8075:2011 Part 2's section 5.3 ("<literal>") says:
> {noformat}
> <binary string literal> ::=
> X <quote> [ <space>... ] [ { <hexit> [ <space>... ] <hexit> [ <space>... ]
> }... ] <quote>
> [ { <separator> <quote> [ <space>... ] [ { <hexit> [ <space>... ]
> <hexit> [ <space>... ] }... ] <quote> }... ]
> <hexit> ::=
> <digit> | A | B | C | D | E | F | a | b | c | d | e | f
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)