Vladimir Sitnikov created CALCITE-3767:
------------------------------------------

             Summary: AssertionError when SqlBinaryStringLiteral appears in 
tablesample substitute
                 Key: CALCITE-3767
                 URL: https://issues.apache.org/jira/browse/CALCITE-3767
             Project: Calcite
          Issue Type: Bug
            Reporter: Vladimir Sitnikov


SQL:
{code:sql}select * from dual tablesample substitute(x'');{code}

Note: I have absolutely no clue what that SQL means :)
However, it might have better error reporting.


{noformat}
!connect jdbc:calcite:fun=spatial,oracle "sa" ""

0: jdbc:calcite:fun=spatial,oracle> select * from dual tablesample 
substitute(x'');
Error: Error while executing SQL "select * from dual tablesample 
substitute(x'')": parse failed: cannot cast  as class java.lang.String 
(state=,code=0)
{noformat}


{noformat}
java.lang.AssertionError: cannot cast  as class java.lang.String
        at org.apache.calcite.sql.SqlLiteral.getValueAs(SqlLiteral.java:351)
        at 
org.javacc.test.calcite.SqlParserImplFuzzyParser.TableRef2(SqlParserImplFuzzyParser.java:2698)
        at 
org.javacc.test.calcite.SqlParserImplFuzzyParser.TableRef(SqlParserImplFuzzyParser.java:2557)
        at 
org.javacc.test.calcite.SqlParserImplFuzzyParser.FromClause(SqlParserImplFuzzyParser.java:2442)
        at 
org.javacc.test.calcite.SqlParserImplFuzzyParser.SqlSelect(SqlParserImplFuzzyParser.java:1552)
...
{noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to