[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:
---------------------------------------
Just to make sure, are the JDBC escapes recognized by all relevant versions of the Hive driver? If not it looks like they do support the ansi date literals - DATE '2000-01-01'.
> 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
>
> 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 Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-4256?page=com.atlassian.jira.plugin... ]
Ramesh Reddy reassigned TEIID-4256:
-----------------------------------
Assignee: Ramesh Reddy (was: Steven Hawkins)
> 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
>
> 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-3815) Oracle translator - OFFSET function does not work
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3815?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-3815:
----------------------------------
Fix Version/s: 9.0
8.12.5
8.13.6
(was: 8.13)
(was: 8.12.2)
Marking as a blocker since this returns inappropriate results.
> Oracle translator - OFFSET function does not work
> -------------------------------------------------
>
> Key: TEIID-3815
> URL: https://issues.jboss.org/browse/TEIID-3815
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.7.2.6_2
> Reporter: Juraj Duráni
> Assignee: Steven Hawkins
> Priority: Blocker
> Fix For: 9.0, 8.12.5, 8.13.6
>
>
> Oracle translator translates OFFSET function as:
> {code:sql}
> SELECT c_0 FROM (SELECT VIEW_FOR_LIMIT.*, ROWNUM ROWNUM_ FROM (***Query***) VIEW_FOR_LIMIT WHERE ROWNUM <= -2147483604) WHERE ROWNUM_ > 45
> {code}
> This always returns an empty result because of *ROWNUM <= -2147483604*.
> Example:
> Query:
> {code:sql}
> SELECT INTKEY FROM bqt1.smalla ORDER BY INTKEY OFFSET 45 ROWS
> {code}
> Source-specific command:
> {code:sql}
> SELECT c_0 FROM (SELECT VIEW_FOR_LIMIT.*, ROWNUM ROWNUM_ FROM (SELECT trunc(g_0."INTKEY") AS c_0 FROM "DV"."SMALLA" g_0 ORDER BY c_0) VIEW_FOR_LIMIT WHERE ROWNUM <= -2147483604) WHERE ROWNUM_ > 45
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIID-3815) Oracle translator - OFFSET function does not work
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3815?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-3815:
----------------------------------
Priority: Blocker (was: Major)
> Oracle translator - OFFSET function does not work
> -------------------------------------------------
>
> Key: TEIID-3815
> URL: https://issues.jboss.org/browse/TEIID-3815
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.7.2.6_2
> Reporter: Juraj Duráni
> Assignee: Steven Hawkins
> Priority: Blocker
> Fix For: 8.12.2, 8.13
>
>
> Oracle translator translates OFFSET function as:
> {code:sql}
> SELECT c_0 FROM (SELECT VIEW_FOR_LIMIT.*, ROWNUM ROWNUM_ FROM (***Query***) VIEW_FOR_LIMIT WHERE ROWNUM <= -2147483604) WHERE ROWNUM_ > 45
> {code}
> This always returns an empty result because of *ROWNUM <= -2147483604*.
> Example:
> Query:
> {code:sql}
> SELECT INTKEY FROM bqt1.smalla ORDER BY INTKEY OFFSET 45 ROWS
> {code}
> Source-specific command:
> {code:sql}
> SELECT c_0 FROM (SELECT VIEW_FOR_LIMIT.*, ROWNUM ROWNUM_ FROM (SELECT trunc(g_0."INTKEY") AS c_0 FROM "DV"."SMALLA" g_0 ORDER BY c_0) VIEW_FOR_LIMIT WHERE ROWNUM <= -2147483604) WHERE ROWNUM_ > 45
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIID-3600) DB2 - error getting substring if "from position" is out of range
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3600?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-3600:
----------------------------------
Fix Version/s: 9.1
(was: 9.0)
(was: 8.12.5)
(was: 8.13.5)
> DB2 - error getting substring if "from position" is out of range
> ----------------------------------------------------------------
>
> Key: TEIID-3600
> URL: https://issues.jboss.org/browse/TEIID-3600
> Project: Teiid
> Issue Type: Quality Risk
> Components: Misc. Connectors
> Reporter: Juraj Duráni
> Assignee: Steven Hawkins
> Fix For: 9.1
>
>
> If second argument of a SUBSTRING(x,y,z) function is out of range of first argument an exception is thrown [1]. Source-specific command [2].
> [1]
> Caused by: com.ibm.db2.jcc.am.SqlDataException: DB2 SQL Error: SQLCODE=-138, SQLSTATE=22011, SQLERRMC=null, DRIVER=4.12.55
> at com.ibm.db2.jcc.am.hd.a(hd.java:668)
> at com.ibm.db2.jcc.am.hd.a(hd.java:60)
> ...
> [2]
> SELECT substr(varchar(g_0.TimestampValue), 40, CASE WHEN 0 > (length(varchar(g_0.TimestampValue)) - (40 - 1)) THEN (length(varchar(g_0.TimestampValue)) - (40 - 1)) ELSE 0 END) FROM SmallA AS g_0 WHERE g_0.IntKey = 1
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIID-3600) DB2 - error getting substring if "from position" is out of range
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3600?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-3600:
---------------------------------------
> I believe that this is wrong as (length(varchar(g_0.TIMESTAMPVALUE)) + 1) is obviously greater than length(varchar(g_0.TIMESTAMPVALUE)) which actually causes the exception
With string values the above "worked" to set the from index beyond the end of the string - but I can see that the issue there was that the strings were smaller than the datatype length. Adjusting that index will mean that the length calculation will need to change as it would also have to be 0 in that case otherwise we'll still get the last character in the result.
> DB2 - error getting substring if "from position" is out of range
> ----------------------------------------------------------------
>
> Key: TEIID-3600
> URL: https://issues.jboss.org/browse/TEIID-3600
> Project: Teiid
> Issue Type: Quality Risk
> Components: Misc. Connectors
> Reporter: Juraj Duráni
> Assignee: Steven Hawkins
> Fix For: 9.1
>
>
> If second argument of a SUBSTRING(x,y,z) function is out of range of first argument an exception is thrown [1]. Source-specific command [2].
> [1]
> Caused by: com.ibm.db2.jcc.am.SqlDataException: DB2 SQL Error: SQLCODE=-138, SQLSTATE=22011, SQLERRMC=null, DRIVER=4.12.55
> at com.ibm.db2.jcc.am.hd.a(hd.java:668)
> at com.ibm.db2.jcc.am.hd.a(hd.java:60)
> ...
> [2]
> SELECT substr(varchar(g_0.TimestampValue), 40, CASE WHEN 0 > (length(varchar(g_0.TimestampValue)) - (40 - 1)) THEN (length(varchar(g_0.TimestampValue)) - (40 - 1)) ELSE 0 END) FROM SmallA AS g_0 WHERE g_0.IntKey = 1
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIID-3815) Oracle translator - OFFSET function does not work
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3815?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-3815:
---------------------------------------
This is an unfortunate nuance of rownum - it is counting rows that pass the where clause, so it never reaches the greater than condition. So yes another change is needed here.
> Oracle translator - OFFSET function does not work
> -------------------------------------------------
>
> Key: TEIID-3815
> URL: https://issues.jboss.org/browse/TEIID-3815
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.7.2.6_2
> Reporter: Juraj Duráni
> Assignee: Steven Hawkins
> Fix For: 8.12.2, 8.13
>
>
> Oracle translator translates OFFSET function as:
> {code:sql}
> SELECT c_0 FROM (SELECT VIEW_FOR_LIMIT.*, ROWNUM ROWNUM_ FROM (***Query***) VIEW_FOR_LIMIT WHERE ROWNUM <= -2147483604) WHERE ROWNUM_ > 45
> {code}
> This always returns an empty result because of *ROWNUM <= -2147483604*.
> Example:
> Query:
> {code:sql}
> SELECT INTKEY FROM bqt1.smalla ORDER BY INTKEY OFFSET 45 ROWS
> {code}
> Source-specific command:
> {code:sql}
> SELECT c_0 FROM (SELECT VIEW_FOR_LIMIT.*, ROWNUM ROWNUM_ FROM (SELECT trunc(g_0."INTKEY") AS c_0 FROM "DV"."SMALLA" g_0 ORDER BY c_0) VIEW_FOR_LIMIT WHERE ROWNUM <= -2147483604) WHERE ROWNUM_ > 45
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIID-4199) Redshift fails locate pushdown
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4199?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-4199.
---------------------------------
> Redshift fails locate pushdown
> ------------------------------
>
> Key: TEIID-4199
> URL: https://issues.jboss.org/browse/TEIID-4199
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Connector
> Affects Versions: 8.12
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 9.0, 8.12.5
>
>
> The LOCATE(x,y,z) function translates incorrectly:
> Query: SELECT INTKEY, STRINGKEY FROM Source.SmallA WHERE LOCATE('1', STRINGKEY, 2) IN (1, 2)
> Source-specific command: SELECT g_0.intkey, g_0.stringkey FROM smalla AS g_0 WHERE (position('1' in substr(g_0.stringkey, 2)) + 1) IN (1, 2)
> Root exception message: Caused by: org.postgresql.util.PSQLException: ERROR: function SUBSTR does not exist (Hint: use SUBSTRING instead)
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIID-3600) DB2 - error getting substring if "from position" is out of range
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-3600?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration commented on TEIID-3600:
------------------------------------------------
Juraj Duráni <jdurani(a)redhat.com> changed the Status of [bug 1248489|https://bugzilla.redhat.com/show_bug.cgi?id=1248489] from NEW to ASSIGNED
> DB2 - error getting substring if "from position" is out of range
> ----------------------------------------------------------------
>
> Key: TEIID-3600
> URL: https://issues.jboss.org/browse/TEIID-3600
> Project: Teiid
> Issue Type: Quality Risk
> Components: Misc. Connectors
> Reporter: Juraj Duráni
> Assignee: Steven Hawkins
> Fix For: 9.0, 8.12.5, 8.13.5
>
>
> If second argument of a SUBSTRING(x,y,z) function is out of range of first argument an exception is thrown [1]. Source-specific command [2].
> [1]
> Caused by: com.ibm.db2.jcc.am.SqlDataException: DB2 SQL Error: SQLCODE=-138, SQLSTATE=22011, SQLERRMC=null, DRIVER=4.12.55
> at com.ibm.db2.jcc.am.hd.a(hd.java:668)
> at com.ibm.db2.jcc.am.hd.a(hd.java:60)
> ...
> [2]
> SELECT substr(varchar(g_0.TimestampValue), 40, CASE WHEN 0 > (length(varchar(g_0.TimestampValue)) - (40 - 1)) THEN (length(varchar(g_0.TimestampValue)) - (40 - 1)) ELSE 0 END) FROM SmallA AS g_0 WHERE g_0.IntKey = 1
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months