[JBoss JIRA] (TEIID-4256) Hive translator - types in IN predicate should be of same type
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-4256?page=com.atlassian.jira.plugin... ]
Ramesh Reddy reopened TEIID-4256:
---------------------------------
[~shawkins] How do interpret the Timestamp here [1], even that does not seem to specify the JDBC escape syntax? Also there is no implicit conversion from string to Timestamp or Date
[1]https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Types#L...
> Hive translator - types in IN predicate should be of same type
> --------------------------------------------------------------
>
> Key: TEIID-4256
> URL: https://issues.jboss.org/browse/TEIID-4256
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.12.x
> Reporter: Juraj Duráni
> Assignee: Ramesh Reddy
> Labels: Final
> Fix For: 9.0, 9.1
>
>
> Teiid seems to not fully translate convert(..., date) expression. The source-specific command contains only string representation of the date. But hive treats this as string, not date.
> *SQL query:*
> {code:sql}
> SELECT BQT1.SmallA.IntKey FROM BQT1.SmallA WHERE BQT1.SmallA.DateValue IN (convert('2000-01-12', date), convert('2000-02-02', date))
> {code}
> *Source-specific command:*
> {code:sql}
> SELECT g_0.intkey AS c_0 FROM smalla g_0 WHERE g_0.datevalue IN ('2000-01-12', '2000-02-02')
> {code}
> *Exception:*
> {code:plain}
> 11:54:54,680 WARN [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue17) TEIID30020 Processing exception for request /2VwN2gwljfj.7 'TEIID30504 Source: 10014 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT g_0.intkey AS c_0 FROM smalla g_0 WHERE g_0.datevalue IN ('2000-01-12', '2000-02-02') LIMIT 100]'. Originally TeiidProcessingException 'org.apache.hadoop.hive.ql.parse.SemanticException:Line 1:61 Wrong arguments ''2000-02-02'': The arguments for IN should be the same type! Types are: {date IN (string, string)}' TypeCheckProcFactory.java:1324.: org.teiid.core.TeiidProcessingException: TEIID30504 Source: 10014 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT g_0.intkey AS c_0 FROM smalla g_0 WHERE g_0.datevalue IN ('2000-01-12', '2000-02-02') LIMIT 100]
> at org.teiid.dqp.internal.process.DataTierTupleSource.exceptionOccurred(DataTierTupleSource.java:401) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.process.DataTierTupleSource.nextTuple(DataTierTupleSource.java:161) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.query.processor.relational.AccessNode.nextBatchDirect(AccessNode.java:391) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:282) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:145) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:472) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:348) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0-internal]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0-internal]
> at java.lang.Thread.run(Thread.java:744) [rt.jar:1.8.0-internal]
> Caused by: org.teiid.translator.jdbc.JDBCExecutionException: 10014 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT g_0.intkey AS c_0 FROM smalla g_0 WHERE g_0.datevalue IN ('2000-01-12', '2000-02-02') LIMIT 100]
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:364) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0-internal]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0-internal]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0-internal]
> at java.lang.reflect.Method.invoke(Method.java:483) [rt.jar:1.8.0-internal]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at com.sun.proxy.$Proxy47.execute(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0-internal]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> ... 6 more
> Caused by: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: SemanticException [Error 10014]: Line 1:61 Wrong arguments ''2000-02-02'': The arguments for IN should be the same type! Types are: {date IN (string, string)}
> at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:258)
> at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:244)
> at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:247)
> at org.apache.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:378)
> at org.apache.hive.jdbc.HivePreparedStatement.executeQuery(HivePreparedStatement.java:109)
> at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:462)
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:123)
> ... 18 more
> Caused by: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: SemanticException [Error 10014]: Line 1:61 Wrong arguments ''2000-02-02'': The arguments for IN should be the same type! Types are: {date IN (string, string)}
> at org.apache.hive.service.cli.operation.Operation.toSQLException(Operation.java:315)
> at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:112)
> at org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:181)
> at org.apache.hive.service.cli.operation.Operation.run(Operation.java:257)
> at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:419)
> at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:406)
> at org.apache.hive.service.cli.CLIService.executeStatementAsync(CLIService.java:274)
> at org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(ThriftCLIService.java:486)
> at org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1317)
> at org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1302)
> at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
> at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
> at org.apache.hive.service.auth.TSetIpAddressProcessor.process(TSetIpAddressProcessor.java:56)
> at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:285)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.8.0-internal]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.8.0-internal]
> ... 1 more
> Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.parse.SemanticException:Line 1:61 Wrong arguments ''2000-02-02'': The arguments for IN should be the same type! Types are: {date IN (string, string)}
> at org.apache.hadoop.hive.ql.parse.TypeCheckProcFactory$DefaultExprProcessor.process(TypeCheckProcFactory.java:1324)
> at org.apache.hadoop.hive.ql.lib.DefaultRuleDispatcher.dispatch(DefaultRuleDispatcher.java:90)
> at org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.dispatchAndReturn(DefaultGraphWalker.java:95)
> at org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.dispatch(DefaultGraphWalker.java:79)
> at org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.walk(DefaultGraphWalker.java:133)
> at org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.startWalking(DefaultGraphWalker.java:110)
> at org.apache.hadoop.hive.ql.parse.TypeCheckProcFactory.genExprNode(TypeCheckProcFactory.java:213)
> at org.apache.hadoop.hive.ql.parse.TypeCheckProcFactory.genExprNode(TypeCheckProcFactory.java:157)
> at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genAllExprNodeDesc(SemanticAnalyzer.java:10507)
> at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genExprNodeDesc(SemanticAnalyzer.java:10463)
> at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genExprNodeDesc(SemanticAnalyzer.java:10431)
> at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genFilterPlan(SemanticAnalyzer.java:2818)
> at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genFilterPlan(SemanticAnalyzer.java:2799)
> at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genBodyPlan(SemanticAnalyzer.java:8848)
> at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:9743)
> at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:9636)
> at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genOPTree(SemanticAnalyzer.java:10109)
> at org.apache.hadoop.hive.ql.parse.CalcitePlanner.genOPTree(CalcitePlanner.java:329)
> at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:10120)
> at org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:211)
> at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:227)
> at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:456)
> at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:316)
> at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1181)
> at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1175)
> at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:110)
> ... 15 more
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIID-4256) Hive translator - types in IN predicate should be of same type
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4256?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-4256:
---------------------------------------
Even when binding is turned on, we'll only bind values that are computed. If the value comes directly from a literal in the engine, then the source query will just use the literal.
> Hive translator - types in IN predicate should be of same type
> --------------------------------------------------------------
>
> Key: TEIID-4256
> URL: https://issues.jboss.org/browse/TEIID-4256
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.12.x
> Reporter: Juraj Duráni
> Assignee: Ramesh Reddy
> Labels: Final
> Fix For: 9.0, 9.1
>
>
> Teiid seems to not fully translate convert(..., date) expression. The source-specific command contains only string representation of the date. But hive treats this as string, not date.
> *SQL query:*
> {code:sql}
> SELECT BQT1.SmallA.IntKey FROM BQT1.SmallA WHERE BQT1.SmallA.DateValue IN (convert('2000-01-12', date), convert('2000-02-02', date))
> {code}
> *Source-specific command:*
> {code:sql}
> SELECT g_0.intkey AS c_0 FROM smalla g_0 WHERE g_0.datevalue IN ('2000-01-12', '2000-02-02')
> {code}
> *Exception:*
> {code:plain}
> 11:54:54,680 WARN [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue17) TEIID30020 Processing exception for request /2VwN2gwljfj.7 'TEIID30504 Source: 10014 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT g_0.intkey AS c_0 FROM smalla g_0 WHERE g_0.datevalue IN ('2000-01-12', '2000-02-02') LIMIT 100]'. Originally TeiidProcessingException 'org.apache.hadoop.hive.ql.parse.SemanticException:Line 1:61 Wrong arguments ''2000-02-02'': The arguments for IN should be the same type! Types are: {date IN (string, string)}' TypeCheckProcFactory.java:1324.: org.teiid.core.TeiidProcessingException: TEIID30504 Source: 10014 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT g_0.intkey AS c_0 FROM smalla g_0 WHERE g_0.datevalue IN ('2000-01-12', '2000-02-02') LIMIT 100]
> at org.teiid.dqp.internal.process.DataTierTupleSource.exceptionOccurred(DataTierTupleSource.java:401) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.process.DataTierTupleSource.nextTuple(DataTierTupleSource.java:161) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.query.processor.relational.AccessNode.nextBatchDirect(AccessNode.java:391) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:282) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:145) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:472) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:348) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0-internal]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0-internal]
> at java.lang.Thread.run(Thread.java:744) [rt.jar:1.8.0-internal]
> Caused by: org.teiid.translator.jdbc.JDBCExecutionException: 10014 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT g_0.intkey AS c_0 FROM smalla g_0 WHERE g_0.datevalue IN ('2000-01-12', '2000-02-02') LIMIT 100]
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:364) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0-internal]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0-internal]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0-internal]
> at java.lang.reflect.Method.invoke(Method.java:483) [rt.jar:1.8.0-internal]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at com.sun.proxy.$Proxy47.execute(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0-internal]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> ... 6 more
> Caused by: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: SemanticException [Error 10014]: Line 1:61 Wrong arguments ''2000-02-02'': The arguments for IN should be the same type! Types are: {date IN (string, string)}
> at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:258)
> at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:244)
> at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:247)
> at org.apache.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:378)
> at org.apache.hive.jdbc.HivePreparedStatement.executeQuery(HivePreparedStatement.java:109)
> at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:462)
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:123)
> ... 18 more
> Caused by: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: SemanticException [Error 10014]: Line 1:61 Wrong arguments ''2000-02-02'': The arguments for IN should be the same type! Types are: {date IN (string, string)}
> at org.apache.hive.service.cli.operation.Operation.toSQLException(Operation.java:315)
> at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:112)
> at org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:181)
> at org.apache.hive.service.cli.operation.Operation.run(Operation.java:257)
> at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:419)
> at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:406)
> at org.apache.hive.service.cli.CLIService.executeStatementAsync(CLIService.java:274)
> at org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(ThriftCLIService.java:486)
> at org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1317)
> at org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1302)
> at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
> at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
> at org.apache.hive.service.auth.TSetIpAddressProcessor.process(TSetIpAddressProcessor.java:56)
> at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:285)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.8.0-internal]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.8.0-internal]
> ... 1 more
> Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.parse.SemanticException:Line 1:61 Wrong arguments ''2000-02-02'': The arguments for IN should be the same type! Types are: {date IN (string, string)}
> at org.apache.hadoop.hive.ql.parse.TypeCheckProcFactory$DefaultExprProcessor.process(TypeCheckProcFactory.java:1324)
> at org.apache.hadoop.hive.ql.lib.DefaultRuleDispatcher.dispatch(DefaultRuleDispatcher.java:90)
> at org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.dispatchAndReturn(DefaultGraphWalker.java:95)
> at org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.dispatch(DefaultGraphWalker.java:79)
> at org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.walk(DefaultGraphWalker.java:133)
> at org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.startWalking(DefaultGraphWalker.java:110)
> at org.apache.hadoop.hive.ql.parse.TypeCheckProcFactory.genExprNode(TypeCheckProcFactory.java:213)
> at org.apache.hadoop.hive.ql.parse.TypeCheckProcFactory.genExprNode(TypeCheckProcFactory.java:157)
> at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genAllExprNodeDesc(SemanticAnalyzer.java:10507)
> at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genExprNodeDesc(SemanticAnalyzer.java:10463)
> at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genExprNodeDesc(SemanticAnalyzer.java:10431)
> at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genFilterPlan(SemanticAnalyzer.java:2818)
> at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genFilterPlan(SemanticAnalyzer.java:2799)
> at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genBodyPlan(SemanticAnalyzer.java:8848)
> at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:9743)
> at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:9636)
> at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genOPTree(SemanticAnalyzer.java:10109)
> at org.apache.hadoop.hive.ql.parse.CalcitePlanner.genOPTree(CalcitePlanner.java:329)
> at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:10120)
> at org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:211)
> at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:227)
> at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:456)
> at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:316)
> at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1181)
> at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1175)
> at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:110)
> ... 15 more
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIID-4263) StringToTimestamp in convert fails during DST transition hour
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4263?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-4263:
----------------------------------
Fix Version/s: 9.1
The intent of the check is to filter invalid timestamps that are allowed by the linent Java parsing, such as 2011-09-07 24:00:00 or 2011-02-29 00:03:00. Unfortunately this catches the transition times as well.
Workarounds include using the parseTimestamp function or having the server in a non-DST timezone. And this will only be an issue on sources where the timestamp value is stored as a string - if the database is using/returning a Timestamp this will not occur as described with just a select *
> StringToTimestamp in convert fails during DST transition hour
> -------------------------------------------------------------
>
> Key: TEIID-4263
> URL: https://issues.jboss.org/browse/TEIID-4263
> Project: Teiid
> Issue Type: Bug
> Components: Common
> Affects Versions: 8.7.7.6_2
> Reporter: Guy Davis
> Assignee: Steven Hawkins
> Fix For: 9.1
>
> Attachments: ArgentinaTest.java
>
>
> Issue is due to [https://github.com/teiid/teiid/blob/master/common-core/src/main/java/org/... | this line] in StringToTimestampTransform.java. In particular, if you pass in a string date for a timestamp at the beginning of the DST transition hour, the result will be an hour in the future or past, so this string comparison fails, throwing TEIID10060 exception.
> Examples include:
> * America/Edmonton 2016-03-13 02:00:00
> * America/Argentina/Buenos_Aires 1991-10-20 00:00:00
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIID-4256) Hive translator - types in IN predicate should be of same type
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-4256?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-4256:
-------------------------------------
So, when binding is true, this should be fine, however if that is turned off, that can be an issue. I assumed it supports the JDBC escape syntax, but I think it would be good to to ANSI as you suggest, I will re-work it.
> Hive translator - types in IN predicate should be of same type
> --------------------------------------------------------------
>
> Key: TEIID-4256
> URL: https://issues.jboss.org/browse/TEIID-4256
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.12.x
> Reporter: Juraj Duráni
> Assignee: Ramesh Reddy
> Labels: Final
> Fix For: 9.0, 9.1
>
>
> Teiid seems to not fully translate convert(..., date) expression. The source-specific command contains only string representation of the date. But hive treats this as string, not date.
> *SQL query:*
> {code:sql}
> SELECT BQT1.SmallA.IntKey FROM BQT1.SmallA WHERE BQT1.SmallA.DateValue IN (convert('2000-01-12', date), convert('2000-02-02', date))
> {code}
> *Source-specific command:*
> {code:sql}
> SELECT g_0.intkey AS c_0 FROM smalla g_0 WHERE g_0.datevalue IN ('2000-01-12', '2000-02-02')
> {code}
> *Exception:*
> {code:plain}
> 11:54:54,680 WARN [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue17) TEIID30020 Processing exception for request /2VwN2gwljfj.7 'TEIID30504 Source: 10014 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT g_0.intkey AS c_0 FROM smalla g_0 WHERE g_0.datevalue IN ('2000-01-12', '2000-02-02') LIMIT 100]'. Originally TeiidProcessingException 'org.apache.hadoop.hive.ql.parse.SemanticException:Line 1:61 Wrong arguments ''2000-02-02'': The arguments for IN should be the same type! Types are: {date IN (string, string)}' TypeCheckProcFactory.java:1324.: org.teiid.core.TeiidProcessingException: TEIID30504 Source: 10014 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT g_0.intkey AS c_0 FROM smalla g_0 WHERE g_0.datevalue IN ('2000-01-12', '2000-02-02') LIMIT 100]
> at org.teiid.dqp.internal.process.DataTierTupleSource.exceptionOccurred(DataTierTupleSource.java:401) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.process.DataTierTupleSource.nextTuple(DataTierTupleSource.java:161) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.query.processor.relational.AccessNode.nextBatchDirect(AccessNode.java:391) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:282) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:145) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:472) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:348) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0-internal]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0-internal]
> at java.lang.Thread.run(Thread.java:744) [rt.jar:1.8.0-internal]
> Caused by: org.teiid.translator.jdbc.JDBCExecutionException: 10014 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT g_0.intkey AS c_0 FROM smalla g_0 WHERE g_0.datevalue IN ('2000-01-12', '2000-02-02') LIMIT 100]
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:364) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0-internal]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0-internal]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0-internal]
> at java.lang.reflect.Method.invoke(Method.java:483) [rt.jar:1.8.0-internal]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at com.sun.proxy.$Proxy47.execute(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0-internal]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> ... 6 more
> Caused by: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: SemanticException [Error 10014]: Line 1:61 Wrong arguments ''2000-02-02'': The arguments for IN should be the same type! Types are: {date IN (string, string)}
> at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:258)
> at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:244)
> at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:247)
> at org.apache.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:378)
> at org.apache.hive.jdbc.HivePreparedStatement.executeQuery(HivePreparedStatement.java:109)
> at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:462)
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:123)
> ... 18 more
> Caused by: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: SemanticException [Error 10014]: Line 1:61 Wrong arguments ''2000-02-02'': The arguments for IN should be the same type! Types are: {date IN (string, string)}
> at org.apache.hive.service.cli.operation.Operation.toSQLException(Operation.java:315)
> at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:112)
> at org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:181)
> at org.apache.hive.service.cli.operation.Operation.run(Operation.java:257)
> at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:419)
> at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:406)
> at org.apache.hive.service.cli.CLIService.executeStatementAsync(CLIService.java:274)
> at org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(ThriftCLIService.java:486)
> at org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1317)
> at org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1302)
> at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
> at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
> at org.apache.hive.service.auth.TSetIpAddressProcessor.process(TSetIpAddressProcessor.java:56)
> at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:285)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.8.0-internal]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.8.0-internal]
> ... 1 more
> Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.parse.SemanticException:Line 1:61 Wrong arguments ''2000-02-02'': The arguments for IN should be the same type! Types are: {date IN (string, string)}
> at org.apache.hadoop.hive.ql.parse.TypeCheckProcFactory$DefaultExprProcessor.process(TypeCheckProcFactory.java:1324)
> at org.apache.hadoop.hive.ql.lib.DefaultRuleDispatcher.dispatch(DefaultRuleDispatcher.java:90)
> at org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.dispatchAndReturn(DefaultGraphWalker.java:95)
> at org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.dispatch(DefaultGraphWalker.java:79)
> at org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.walk(DefaultGraphWalker.java:133)
> at org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.startWalking(DefaultGraphWalker.java:110)
> at org.apache.hadoop.hive.ql.parse.TypeCheckProcFactory.genExprNode(TypeCheckProcFactory.java:213)
> at org.apache.hadoop.hive.ql.parse.TypeCheckProcFactory.genExprNode(TypeCheckProcFactory.java:157)
> at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genAllExprNodeDesc(SemanticAnalyzer.java:10507)
> at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genExprNodeDesc(SemanticAnalyzer.java:10463)
> at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genExprNodeDesc(SemanticAnalyzer.java:10431)
> at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genFilterPlan(SemanticAnalyzer.java:2818)
> at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genFilterPlan(SemanticAnalyzer.java:2799)
> at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genBodyPlan(SemanticAnalyzer.java:8848)
> at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:9743)
> at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:9636)
> at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genOPTree(SemanticAnalyzer.java:10109)
> at org.apache.hadoop.hive.ql.parse.CalcitePlanner.genOPTree(CalcitePlanner.java:329)
> at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:10120)
> at org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:211)
> at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:227)
> at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:456)
> at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:316)
> at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1181)
> at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1175)
> at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:110)
> ... 15 more
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIID-4262) Wrong result (empty or NULL) running a CTE
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4262?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-4262:
----------------------------------
Priority: Blocker (was: Major)
> Wrong result (empty or NULL) running a CTE
> ------------------------------------------
>
> Key: TEIID-4262
> URL: https://issues.jboss.org/browse/TEIID-4262
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 9.0
> Reporter: Salvatore R
> Assignee: Steven Hawkins
> Priority: Blocker
> Fix For: 9.0
>
>
> The following query returns an empty result instead of 1:
> {code:sql}
> WITH
> alias as (SELECT 1 as a),
> alias2 as (select t2.a as a1, t1.a from alias t1 join (SELECT 1 as a) t2 on t1.a=t2.a),
> alias3 as (select t2.a as a1, t1.a from alias t1 join alias2 t2 on t1.a=t2.a)
> SELECT alias3.a1 FROM alias2 join alias3 on alias3.a=alias2.a or alias3.a>alias2.a
> {code}
> This similar query (using LEFT instead of INNER join) returns NULL instead of 1:
> {code:sql}
> WITH
> alias as (SELECT 1 as a),
> alias2 as (select t2.a as a1, t1.a from alias t1 join (SELECT 1 as a) t2 on t1.a=t2.a),
> alias3 as (select t2.a as a1, t1.a from alias t1 join alias2 t2 on t1.a=t2.a)
> SELECT alias3.a1 FROM alias2 left join alias3 on alias3.a=alias2.a or alias3.a>alias2.a
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIID-4262) Wrong result (empty or NULL) running a CTE
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4262?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-4262:
----------------------------------
Component/s: Query Engine
Fix Version/s: 9.0
Affects Version/s: 9.0
This is another issue related to inlining.
> Wrong result (empty or NULL) running a CTE
> ------------------------------------------
>
> Key: TEIID-4262
> URL: https://issues.jboss.org/browse/TEIID-4262
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 9.0
> Reporter: Salvatore R
> Assignee: Steven Hawkins
> Fix For: 9.0
>
>
> The following query returns an empty result instead of 1:
> {code:sql}
> WITH
> alias as (SELECT 1 as a),
> alias2 as (select t2.a as a1, t1.a from alias t1 join (SELECT 1 as a) t2 on t1.a=t2.a),
> alias3 as (select t2.a as a1, t1.a from alias t1 join alias2 t2 on t1.a=t2.a)
> SELECT alias3.a1 FROM alias2 join alias3 on alias3.a=alias2.a or alias3.a>alias2.a
> {code}
> This similar query (using LEFT instead of INNER join) returns NULL instead of 1:
> {code:sql}
> WITH
> alias as (SELECT 1 as a),
> alias2 as (select t2.a as a1, t1.a from alias t1 join (SELECT 1 as a) t2 on t1.a=t2.a),
> alias3 as (select t2.a as a1, t1.a from alias t1 join alias2 t2 on t1.a=t2.a)
> SELECT alias3.a1 FROM alias2 left join alias3 on alias3.a=alias2.a or alias3.a>alias2.a
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIID-4262) Wrong result (empty or NULL) running a CTE
by Salvatore R (JIRA)
Salvatore R created TEIID-4262:
----------------------------------
Summary: Wrong result (empty or NULL) running a CTE
Key: TEIID-4262
URL: https://issues.jboss.org/browse/TEIID-4262
Project: Teiid
Issue Type: Bug
Reporter: Salvatore R
Assignee: Steven Hawkins
The following query returns an empty result instead of 1:
{code:sql}
WITH
alias as (SELECT 1 as a),
alias2 as (select t2.a as a1, t1.a from alias t1 join (SELECT 1 as a) t2 on t1.a=t2.a),
alias3 as (select t2.a as a1, t1.a from alias t1 join alias2 t2 on t1.a=t2.a)
SELECT alias3.a1 FROM alias2 join alias3 on alias3.a=alias2.a or alias3.a>alias2.a
{code}
This similar query (using LEFT instead of INNER join) returns NULL instead of 1:
{code:sql}
WITH
alias as (SELECT 1 as a),
alias2 as (select t2.a as a1, t1.a from alias t1 join (SELECT 1 as a) t2 on t1.a=t2.a),
alias3 as (select t2.a as a1, t1.a from alias t1 join alias2 t2 on t1.a=t2.a)
SELECT alias3.a1 FROM alias2 left join alias3 on alias3.a=alias2.a or alias3.a>alias2.a
{code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIID-4261) Hive: Add support for array type
by Ramesh Reddy (JIRA)
Ramesh Reddy created TEIID-4261:
-----------------------------------
Summary: Hive: Add support for array type
Key: TEIID-4261
URL: https://issues.jboss.org/browse/TEIID-4261
Project: Teiid
Issue Type: Enhancement
Components: Misc. Connectors
Reporter: Ramesh Reddy
Assignee: Steven Hawkins
Hive 0.14 added support for Array and Map types. Supporting array types to translator will be good.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIID-4256) Hive translator - types in IN predicate should be of same type
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-4256?page=com.atlassian.jira.plugin... ]
Ramesh Reddy resolved TEIID-4256.
---------------------------------
Fix Version/s: 9.0
9.1
Resolution: Done
Labels: Final (was: )
Added support for Date to Hive not to convert to String. Impala still does not support Date
> Hive translator - types in IN predicate should be of same type
> --------------------------------------------------------------
>
> Key: TEIID-4256
> URL: https://issues.jboss.org/browse/TEIID-4256
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.12.x
> Reporter: Juraj Duráni
> Assignee: Ramesh Reddy
> Labels: Final
> Fix For: 9.0, 9.1
>
>
> Teiid seems to not fully translate convert(..., date) expression. The source-specific command contains only string representation of the date. But hive treats this as string, not date.
> *SQL query:*
> {code:sql}
> SELECT BQT1.SmallA.IntKey FROM BQT1.SmallA WHERE BQT1.SmallA.DateValue IN (convert('2000-01-12', date), convert('2000-02-02', date))
> {code}
> *Source-specific command:*
> {code:sql}
> SELECT g_0.intkey AS c_0 FROM smalla g_0 WHERE g_0.datevalue IN ('2000-01-12', '2000-02-02')
> {code}
> *Exception:*
> {code:plain}
> 11:54:54,680 WARN [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue17) TEIID30020 Processing exception for request /2VwN2gwljfj.7 'TEIID30504 Source: 10014 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT g_0.intkey AS c_0 FROM smalla g_0 WHERE g_0.datevalue IN ('2000-01-12', '2000-02-02') LIMIT 100]'. Originally TeiidProcessingException 'org.apache.hadoop.hive.ql.parse.SemanticException:Line 1:61 Wrong arguments ''2000-02-02'': The arguments for IN should be the same type! Types are: {date IN (string, string)}' TypeCheckProcFactory.java:1324.: org.teiid.core.TeiidProcessingException: TEIID30504 Source: 10014 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT g_0.intkey AS c_0 FROM smalla g_0 WHERE g_0.datevalue IN ('2000-01-12', '2000-02-02') LIMIT 100]
> at org.teiid.dqp.internal.process.DataTierTupleSource.exceptionOccurred(DataTierTupleSource.java:401) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.process.DataTierTupleSource.nextTuple(DataTierTupleSource.java:161) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.query.processor.relational.AccessNode.nextBatchDirect(AccessNode.java:391) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:282) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:145) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:472) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:348) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0-internal]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0-internal]
> at java.lang.Thread.run(Thread.java:744) [rt.jar:1.8.0-internal]
> Caused by: org.teiid.translator.jdbc.JDBCExecutionException: 10014 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT g_0.intkey AS c_0 FROM smalla g_0 WHERE g_0.datevalue IN ('2000-01-12', '2000-02-02') LIMIT 100]
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:364) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0-internal]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0-internal]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0-internal]
> at java.lang.reflect.Method.invoke(Method.java:483) [rt.jar:1.8.0-internal]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at com.sun.proxy.$Proxy47.execute(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0-internal]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65) [teiid-engine-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> ... 6 more
> Caused by: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: SemanticException [Error 10014]: Line 1:61 Wrong arguments ''2000-02-02'': The arguments for IN should be the same type! Types are: {date IN (string, string)}
> at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:258)
> at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:244)
> at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:247)
> at org.apache.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:378)
> at org.apache.hive.jdbc.HivePreparedStatement.executeQuery(HivePreparedStatement.java:109)
> at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:462)
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:123)
> ... 18 more
> Caused by: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: SemanticException [Error 10014]: Line 1:61 Wrong arguments ''2000-02-02'': The arguments for IN should be the same type! Types are: {date IN (string, string)}
> at org.apache.hive.service.cli.operation.Operation.toSQLException(Operation.java:315)
> at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:112)
> at org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:181)
> at org.apache.hive.service.cli.operation.Operation.run(Operation.java:257)
> at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:419)
> at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:406)
> at org.apache.hive.service.cli.CLIService.executeStatementAsync(CLIService.java:274)
> at org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(ThriftCLIService.java:486)
> at org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1317)
> at org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1302)
> at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
> at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
> at org.apache.hive.service.auth.TSetIpAddressProcessor.process(TSetIpAddressProcessor.java:56)
> at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:285)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.8.0-internal]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.8.0-internal]
> ... 1 more
> Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.parse.SemanticException:Line 1:61 Wrong arguments ''2000-02-02'': The arguments for IN should be the same type! Types are: {date IN (string, string)}
> at org.apache.hadoop.hive.ql.parse.TypeCheckProcFactory$DefaultExprProcessor.process(TypeCheckProcFactory.java:1324)
> at org.apache.hadoop.hive.ql.lib.DefaultRuleDispatcher.dispatch(DefaultRuleDispatcher.java:90)
> at org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.dispatchAndReturn(DefaultGraphWalker.java:95)
> at org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.dispatch(DefaultGraphWalker.java:79)
> at org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.walk(DefaultGraphWalker.java:133)
> at org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.startWalking(DefaultGraphWalker.java:110)
> at org.apache.hadoop.hive.ql.parse.TypeCheckProcFactory.genExprNode(TypeCheckProcFactory.java:213)
> at org.apache.hadoop.hive.ql.parse.TypeCheckProcFactory.genExprNode(TypeCheckProcFactory.java:157)
> at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genAllExprNodeDesc(SemanticAnalyzer.java:10507)
> at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genExprNodeDesc(SemanticAnalyzer.java:10463)
> at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genExprNodeDesc(SemanticAnalyzer.java:10431)
> at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genFilterPlan(SemanticAnalyzer.java:2818)
> at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genFilterPlan(SemanticAnalyzer.java:2799)
> at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genBodyPlan(SemanticAnalyzer.java:8848)
> at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:9743)
> at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:9636)
> at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genOPTree(SemanticAnalyzer.java:10109)
> at org.apache.hadoop.hive.ql.parse.CalcitePlanner.genOPTree(CalcitePlanner.java:329)
> at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:10120)
> at org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:211)
> at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:227)
> at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:456)
> at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:316)
> at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1181)
> at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1175)
> at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:110)
> ... 15 more
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months