gaoyang created TEZ-3541:
----------------------------

             Summary: query form a view join another view happens "No work 
found for tablescan TS"
                 Key: TEZ-3541
                 URL: https://issues.apache.org/jira/browse/TEZ-3541
             Project: Apache Tez
          Issue Type: Bug
    Affects Versions: 0.8.4
         Environment: hive2.1.0
Tez0.8.4
hadoop2.7.2
            Reporter: gaoyang


Here is my sql:
select count(0) from tbllog_level_up b,tbllog_gold a where b.server=a.server 
and b.role_id=a.role_id;
tbllog_level_up and tbllog_gold is view which union by two tables, like this:
create view tbllog_level_up as select * from tbllog_level_up_current union all 
select * tbllog_level_up_bak;
create view tbllog_gold as select * from tbllog_gold_current union all select * 
tbllog_gold_bak;
When i run the sql on hive2.1 with mr engine,it is ok. 
But it throws the following exception with Tez0.8.4 engine:

2016-11-17T13:55:48,623 WARN  [HiveServer2-Handler-Pool: Thread-39]: 
thrift.ThriftCLIService (:()) - Error executing statement: 
org.apache.hive.service.cli.HiveSQLException: Error running query: 
java.lang.AssertionError: No work found for tablescan TS[8]
        at 
org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:218)
        at 
org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:269)
        at 
org.apache.hive.service.cli.operation.Operation.run(Operation.java:324)
        at 
org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:460)
        at 
org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:447)
        at 
org.apache.hive.service.cli.CLIService.executeStatementAsync(CLIService.java:294)
        at 
org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(ThriftCLIService.java:497)
        at 
org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1437)
        at 
org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1422)
        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:286)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.AssertionError: No work found for tablescan TS[8]
        at 
org.apache.hadoop.hive.ql.parse.GenTezUtils.processAppMasterEvent(GenTezUtils.java:398)
        at 
org.apache.hadoop.hive.ql.parse.TezCompiler.generateTaskTree(TezCompiler.java:397)
        at 
org.apache.hadoop.hive.ql.parse.TaskCompiler.compile(TaskCompiler.java:258)
        at 
org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:10857)
        at 
org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:239)
        at 
org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:250)
        at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:437)
        at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:329)
        at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1158)
        at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1145)
        at 
org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:184)
        ... 15 more

In addition,when i change the sql like this:select count(0) from tbllog_gold 
b,tbllog_level_up a where b.server=a.server and b.role_id=a.role_id
It will succeed.
Why???



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to