You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Laurent Goujon (JIRA)" <ji...@apache.org> on 2017/03/15 04:23:41 UTC

[jira] [Commented] (DRILL-5136) Some SQL statements fail due to PreparedStatement

    [ https://issues.apache.org/jira/browse/DRILL-5136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15925492#comment-15925492 ] 

Laurent Goujon commented on DRILL-5136:
---------------------------------------

I might not be the best person to answer this issue unfortunately, as I don't know in details how SQL parsing is done in Drill, if there's a way to identify the type of queries submitted to the engine. My guess is that depending on the type of queries, one could return a predetermined schema vs running a limit 0 query if schema has to be discovered. Maybe this could be an extension of each SQLHandler?

> Some SQL statements fail due to PreparedStatement
> -------------------------------------------------
>
>                 Key: DRILL-5136
>                 URL: https://issues.apache.org/jira/browse/DRILL-5136
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Client - ODBC
>    Affects Versions: 1.9.0
>            Reporter: Robert Hou
>            Assignee: Laurent Goujon
>
> "show schemas" does not work.
> SQL>show schemas
> 1: SQLPrepare = [MapR][Drill] (1040) Drill failed to execute the query: show schemas
> [30029]Query execution error. Details:[
> PARSE ERROR: Encountered "( show" at line 1, column 15.
> Was expecting one of:
>     <IDENTIFIER> ...
>     <QUOTED_IDENTIFIER> ...
>     <BACK_QUOTED_IDENTIFIER> ...
>     <BRACKET_QUOTED_IDENTIFIER> ...
>     <UNICODE_QUOTED_IDENTIFIER> ...
>     "LATERAL" ...
>     "(" "WITH" ...
>     "(" "+" ...
>     "(" "-" ...
>     "(" <UNSIGNED_INTEGER_LITERAL> ...
>     "(" <DECIMAL_NUMERIC_LITERAL> ...
>     "(" <APPROX_NUMERIC (1040) SQLSTATE=HY000
> The query profile shows this SQL statement is being executed:
>    {color:blue} SELECT * FROM {color} (show schemas) {color:blue} LIMIT 0 {color}
>  
> The blue text has been added when displaying schemas
> "use schema" also does not work.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)