drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Krystal (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-1316) Drill does not support the "fn" syntax generated from Tableau
Date Tue, 19 Aug 2014 22:37:18 GMT

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

Krystal commented on DRILL-1316:
--------------------------------

Server Error:

org.eigenbase.sql.parser.SqlParseException: Encountered "{fn FLOOR" at line 1, column 8.
Was expecting one of:
    "UNION" ...
    "INTERSECT" ...
    "EXCEPT" ...
    "ORDER" ...
    "LIMIT" ...
    "OFFSET" ...
    "FETCH" ...
    "DISTINCT" ...
    "ALL" ...
    <IDENTIFIER> ...
    <QUOTED_IDENTIFIER> ...
    <BACK_QUOTED_IDENTIFIER> ...
    <BRACKET_QUOTED_IDENTIFIER> ...
    <UNICODE_QUOTED_IDENTIFIER> ...
    "*" ...
    "+" ...
    "-" ...
    <UNSIGNED_INTEGER_LITERAL> ...
    <DECIMAL_NUMERIC_LITERAL> ...
    <APPROX_NUMERIC_LITERAL> ...
    <BINARY_STRING_LITERAL> ...
    <PREFIXED_STRING_LITERAL> ...
    <QUOTED_STRING> ...
    <UNICODE_STRING_LITERAL> ...
    "TRUE" ...
    "FALSE" ...
    "UNKNOWN" ...
    "NULL" ...
    <LBRACE_D> ...
    <LBRACE_T> ...
    <LBRACE_TS> ...
    "DATE" ...
    "TIME" ...
    "TIMESTAMP" ...
    "INTERVAL" ...
    "?" ...
    "CAST" ...
    "EXTRACT" ...
    "POSITION" ...
    "CONVERT" ...
    "TRANSLATE" ...
    "OVERLAY" ...
    "FLOOR" ...
    "CEIL" ...
    "CEILING" ...
    "SUBSTRING" ...
    "TRIM" ...
    <LBRACE_FN> "INSERT" ...
    <LBRACE_FN> "ABS" ...
    <LBRACE_FN> "AVG" ...
    <LBRACE_FN> "CARDINALITY" ...
    <LBRACE_FN> "CHAR_LENGTH" ...
    <LBRACE_FN> "CHARACTER_LENGTH" ...
    <LBRACE_FN> "COALESCE" ...
    <LBRACE_FN> "COLLECT" ...
    <LBRACE_FN> "CUME_DIST" ...
    <LBRACE_FN> "COUNT" ...
    <LBRACE_FN> "CURRENT_DATE" ...
    <LBRACE_FN> "CURRENT_TIME" ...
    <LBRACE_FN> "CURRENT_TIMESTAMP" ...
    <LBRACE_FN> "DENSE_RANK" ...
    <LBRACE_FN> "ELEMENT" ...
    <LBRACE_FN> "EXP" ...
    <LBRACE_FN> "FIRST_VALUE" ...
    <LBRACE_FN> "FUSION" ...
    <LBRACE_FN> "LAST_VALUE" ...
    <LBRACE_FN> "LN" ...
    <LBRACE_FN> "LOCALTIME" ...
    <LBRACE_FN> "LOCALTIMESTAMP" ...
    <LBRACE_FN> "LOWER" ...
    <LBRACE_FN> "MAX" ...
    <LBRACE_FN> "MIN" ...
    <LBRACE_FN> "MOD" ...
    <LBRACE_FN> "NULLIF" ...
    <LBRACE_FN> "OCTET_LENGTH" ...
    <LBRACE_FN> "PERCENT_RANK" ...
    <LBRACE_FN> "POWER" ...
    <LBRACE_FN> "RANK" ...
    <LBRACE_FN> "ROW_NUMBER" ...
    <LBRACE_FN> "SQRT" ...
    <LBRACE_FN> "STDDEV_POP" ...
    <LBRACE_FN> "STDDEV_SAMP" ...
    <LBRACE_FN> "SUM" ...
    <LBRACE_FN> "UPPER" ...
    <LBRACE_FN> "VAR_POP" ...
    <LBRACE_FN> "VAR_SAMP" ...
    <LBRACE_FN> "SUBSTRING" ...
    <LBRACE_FN> <IDENTIFIER> ...
    <LBRACE_FN> <QUOTED_IDENTIFIER> ...
    <LBRACE_FN> <BACK_QUOTED_IDENTIFIER> ...
    <LBRACE_FN> <BRACKET_QUOTED_IDENTIFIER> ...
    <LBRACE_FN> <UNICODE_QUOTED_IDENTIFIER> ...
    "MULTISET" ...
    "ARRAY" ...
    "SPECIFIC" ...
    "ABS" ...
    "AVG" ...
    "CARDINALITY" ...
    "CHAR_LENGTH" ...
    "CHARACTER_LENGTH" ...
    "COALESCE" ...
    "COLLECT" ...
    "CUME_DIST" ...
    "COUNT" ...
    "CURRENT_DATE" ...
    "CURRENT_TIME" ...
    "CURRENT_TIMESTAMP" ...
    "DENSE_RANK" ...
    "ELEMENT" ...
    "EXP" ...
    "FIRST_VALUE" ...
    "FUSION" ...
    "LAST_VALUE" ...
    "LN" ...
    "LOCALTIME" ...
    "LOCALTIMESTAMP" ...
    "LOWER" ...
    "MAX" ...
    "MIN" ...
    "MOD" ...
    "NULLIF" ...
    "OCTET_LENGTH" ...
    "PERCENT_RANK" ...
    "POWER" ...
    "RANK" ...
    "ROW_NUMBER" ...
    "SQRT" ...
    "STDDEV_POP" ...
    "STDDEV_SAMP" ...
    "SUM" ...
    "UPPER" ...
    "VAR_POP" ...
    "VAR_SAMP" ...
    "CURRENT_CATALOG" ...
    "CURRENT_DEFAULT_TRANSFORM_GROUP" ...
    "CURRENT_PATH" ...
    "CURRENT_ROLE" ...
    "CURRENT_SCHEMA" ...
    "CURRENT_USER" ...
    "SESSION_USER" ...
    "SYSTEM_USER" ...
    "USER" ...
    "NEW" ...
    "CASE" ...
    "CURSOR" ...
    "ROW" ...
    "NOT" ...
    "EXISTS" ...
    "(" ...
    
org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.convertException(DrillParserImpl.java:328)
~[drill-java-exec-0.5.0-incubating-SNAPSHOT-rebuffed.jar:0.5.0-incubating-SNAPSHOT]
org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.normalizeException(DrillParserImpl.java:70)
~[drill-java-exec-0.5.0-incubating-SNAPSHOT-rebuffed.jar:0.5.0-incubating-SNAPSHOT]
org.eigenbase.sql.parser.SqlParser.parseStmt(SqlParser.java:150) ~[optiq-core-0.9-20140730.000241-5.jar:na]
net.hydromatic.optiq.prepare.PlannerImpl.parse(PlannerImpl.java:164) ~[optiq-core-0.9-20140730.000241-5.jar:na]
org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:106) ~[drill-java-exec-0.5.0-incubating-SNAPSHOT-rebuffed.jar:0.5.0-incubating-SNAPSHOT]
org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:403) [drill-java-exec-0.5.0-incubating-SNAPSHOT-rebuffed.jar:0.5.0-incubating-SNAPSHOT]
org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:219) [drill-java-exec-0.5.0-incubating-SNAPSHOT-rebuffed.jar:0.5.0-incubating-SNAPSHOT]
org.apache.drill.exec.work.WorkManager$RunnableWrapper.run(WorkManager.java:250) [drill-java-exec-0.5.0-incubating-SNAPSHOT-rebuffed.jar:0.5.0-incubating-SNAPSHOT]
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_45]
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_45]
java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]
Caused by: org.apache.drill.exec.planner.sql.parser.impl.ParseException: Encountered "{fn
FLOOR" at line 1, column 8.
Was expecting one of:
    "UNION" ...
    "INTERSECT" ...
    "EXCEPT" ...
    "ORDER" ...
    "LIMIT" ...
    "OFFSET" ...
    "FETCH" ...
    "DISTINCT" ...
    "ALL" ...
    <IDENTIFIER> ...
    <QUOTED_IDENTIFIER> ...
    <BACK_QUOTED_IDENTIFIER> ...
    <BRACKET_QUOTED_IDENTIFIER> ...
    <UNICODE_QUOTED_IDENTIFIER> ...
    "*" ...
    "+" ...
    "-" ...
    <UNSIGNED_INTEGER_LITERAL> ...
    <DECIMAL_NUMERIC_LITERAL> ...
    <APPROX_NUMERIC_LITERAL> ...
    <BINARY_STRING_LITERAL> ...
    <PREFIXED_STRING_LITERAL> ...
    <QUOTED_STRING> ...
    <UNICODE_STRING_LITERAL> ...
    "TRUE" ...
    "FALSE" ...
    "UNKNOWN" ...
    "NULL" ...
    <LBRACE_D> ...
    <LBRACE_T> ...
    <LBRACE_TS> ...
    "DATE" ...
    "TIME" ...
    "TIMESTAMP" ...
    "INTERVAL" ...
    "?" ...
    "CAST" ...
    "EXTRACT" ...
    "POSITION" ...
    "CONVERT" ...
    "TRANSLATE" ...
    "OVERLAY" ...
    "FLOOR" ...
    "CEIL" ...
    "CEILING" ...
    "SUBSTRING" ...
    "TRIM" ...
    <LBRACE_FN> "INSERT" ...
    <LBRACE_FN> "ABS" ...
    <LBRACE_FN> "AVG" ...
    <LBRACE_FN> "CARDINALITY" ...
    <LBRACE_FN> "CHAR_LENGTH" ...
    <LBRACE_FN> "CHARACTER_LENGTH" ...
    <LBRACE_FN> "COALESCE" ...
    <LBRACE_FN> "COLLECT" ...
    <LBRACE_FN> "CUME_DIST" ...
    <LBRACE_FN> "COUNT" ...
    <LBRACE_FN> "CURRENT_DATE" ...
    <LBRACE_FN> "CURRENT_TIME" ...
    <LBRACE_FN> "CURRENT_TIMESTAMP" ...
    <LBRACE_FN> "DENSE_RANK" ...
    <LBRACE_FN> "ELEMENT" ...
    <LBRACE_FN> "EXP" ...
    <LBRACE_FN> "FIRST_VALUE" ...
    <LBRACE_FN> "FUSION" ...
    <LBRACE_FN> "LAST_VALUE" ...
    <LBRACE_FN> "LN" ...
    <LBRACE_FN> "LOCALTIME" ...
    <LBRACE_FN> "LOCALTIMESTAMP" ...
    <LBRACE_FN> "LOWER" ...
    <LBRACE_FN> "MAX" ...
    <LBRACE_FN> "MIN" ...
    <LBRACE_FN> "MOD" ...
    <LBRACE_FN> "NULLIF" ...
    <LBRACE_FN> "OCTET_LENGTH" ...
    <LBRACE_FN> "PERCENT_RANK" ...
    <LBRACE_FN> "POWER" ...
    <LBRACE_FN> "RANK" ...
    <LBRACE_FN> "ROW_NUMBER" ...
    <LBRACE_FN> "SQRT" ...
    <LBRACE_FN> "STDDEV_POP" ...
    <LBRACE_FN> "STDDEV_SAMP" ...
    <LBRACE_FN> "SUM" ...
    <LBRACE_FN> "UPPER" ...
    <LBRACE_FN> "VAR_POP" ...
    <LBRACE_FN> "VAR_SAMP" ...
    <LBRACE_FN> "SUBSTRING" ...
    <LBRACE_FN> <IDENTIFIER> ...
    <LBRACE_FN> <QUOTED_IDENTIFIER> ...
    <LBRACE_FN> <BACK_QUOTED_IDENTIFIER> ...
    <LBRACE_FN> <BRACKET_QUOTED_IDENTIFIER> ...
    <LBRACE_FN> <UNICODE_QUOTED_IDENTIFIER> ...
    "MULTISET" ...
    "ARRAY" ...
    "SPECIFIC" ...
    "ABS" ...
    "AVG" ...
    "CARDINALITY" ...
    "CHAR_LENGTH" ...
    "CHARACTER_LENGTH" ...
    "COALESCE" ...
    "COLLECT" ...
    "CUME_DIST" ...
    "COUNT" ...
    "CURRENT_DATE" ...
    "CURRENT_TIME" ...
    "CURRENT_TIMESTAMP" ...
    "DENSE_RANK" ...
    "ELEMENT" ...
    "EXP" ...
    "FIRST_VALUE" ...
    "FUSION" ...
    "LAST_VALUE" ...
    "LN" ...
    "LOCALTIME" ...
    "LOCALTIMESTAMP" ...
    "LOWER" ...
    "MAX" ...
    "MIN" ...
    "MOD" ...
    "NULLIF" ...
    "OCTET_LENGTH" ...
    "PERCENT_RANK" ...
    "POWER" ...
    "RANK" ...
    "ROW_NUMBER" ...
    "SQRT" ...
    "STDDEV_POP" ...
    "STDDEV_SAMP" ...
    "SUM" ...
    "UPPER" ...
    "VAR_POP" ...
    "VAR_SAMP" ...
    "CURRENT_CATALOG" ...
    "CURRENT_DEFAULT_TRANSFORM_GROUP" ...
    "CURRENT_PATH" ...
    "CURRENT_ROLE" ...
    "CURRENT_SCHEMA" ...
    "CURRENT_USER" ...
    "SESSION_USER" ...
    "SYSTEM_USER" ...
    "USER" ...
    "NEW" ...
    "CASE" ...
    "CURSOR" ...
    "ROW" ...
    "NOT" ...
    "EXISTS" ...
    "(" ...
    
org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.generateParseException(DrillParserImpl.java:16635)
~[drill-java-exec-0.5.0-incubating-SNAPSHOT-rebuffed.jar:0.5.0-incubating-SNAPSHOT]
org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.jj_consume_token(DrillParserImpl.java:16464)
~[drill-java-exec-0.5.0-incubating-SNAPSHOT-rebuffed.jar:0.5.0-incubating-SNAPSHOT]
org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.SelectExpression(DrillParserImpl.java:1471)
~[drill-java-exec-0.5.0-incubating-SNAPSHOT-rebuffed.jar:0.5.0-incubating-SNAPSHOT]
org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.SelectItem(DrillParserImpl.java:1428)
~[drill-java-exec-0.5.0-incubating-SNAPSHOT-rebuffed.jar:0.5.0-incubating-SNAPSHOT]
org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.SelectList(DrillParserImpl.java:1404)
~[drill-java-exec-0.5.0-incubating-SNAPSHOT-rebuffed.jar:0.5.0-incubating-SNAPSHOT]
org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.SqlSelect(DrillParserImpl.java:993)
~[drill-java-exec-0.5.0-incubating-SNAPSHOT-rebuffed.jar:0.5.0-incubating-SNAPSHOT]
org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.LeafQuery(DrillParserImpl.java:518)
~[drill-java-exec-0.5.0-incubating-SNAPSHOT-rebuffed.jar:0.5.0-incubating-SNAPSHOT]
org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.LeafQueryOrExpr(DrillParserImpl.java:2394)
~[drill-java-exec-0.5.0-incubating-SNAPSHOT-rebuffed.jar:0.5.0-incubating-SNAPSHOT]
org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.QueryOrExpr(DrillParserImpl.java:2313)
~[drill-java-exec-0.5.0-incubating-SNAPSHOT-rebuffed.jar:0.5.0-incubating-SNAPSHOT]
org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.OrderedQueryOrExpr(DrillParserImpl.java:436)
~[drill-java-exec-0.5.0-incubating-SNAPSHOT-rebuffed.jar:0.5.0-incubating-SNAPSHOT]
org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.SqlStmt(DrillParserImpl.java:694)
~[drill-java-exec-0.5.0-incubating-SNAPSHOT-rebuffed.jar:0.5.0-incubating-SNAPSHOT]
org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.SqlStmtEof(DrillParserImpl.java:736)
~[drill-java-exec-0.5.0-incubating-SNAPSHOT-rebuffed.jar:0.5.0-incubating-SNAPSHOT]
org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.parseSqlStmtEof(DrillParserImpl.java:123)
~[drill-java-exec-0.5.0-incubating-SNAPSHOT-rebuffed.jar:0.5.0-incubating-SNAPSHOT]
org.apache.drill.exec.planner.sql.parser.impl.DrillParserWithCompoundIdConverter.parseSqlStmtEof(DrillParserWithCompoundIdConverter.java:50)
~[drill-java-exec-0.5.0-incubating-SNAPSHOT-rebuffed.jar:0.5.0-incubating-SNAPSHOT]
org.eigenbase.sql.parser.SqlParser.parseStmt(SqlParser.java:143) ~[optiq-core-0.9-20140730.000241-5.jar:na]
... 8 more



> Drill does not support the "fn" syntax generated from Tableau
> -------------------------------------------------------------
>
>                 Key: DRILL-1316
>                 URL: https://issues.apache.org/jira/browse/DRILL-1316
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: SQL Parser
>            Reporter: Krystal
>
> git.commit.id.abbrev=654c879
> The following tableau generated query failed in drill:
> 0: jdbc:drill:schema=dfs> SELECT {fn FLOOR({fn EXTRACT(YEAR FROM `hive_voter`.`create_time`)})}
AS `yr_columnB_ok` FROM `hive.default`.`voter_hive` `voter_hive` GROUP BY {fn FLOOR({fn EXTRACT(YEAR
FROM `voter_hive`.`create_time`)})};
> Error: exception while executing query: Failure while trying to get next result batch.
(state=,code=0)
> 0: jdbc:drill:schema=dfs> Query failed: Failure while parsing sql. Encountered "{fn
FLOOR" at line 1, column 8.
> Was expecting one of:
>     "UNION" ...
>     "INTERSECT" ...
>     "EXCEPT" ...
>     "ORDER" ...
>     "LIMIT" ...
>     "OFFSET" ...



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message