分享

Hive 多个相等条件问题

youngwenhao 发表于 2017-5-18 16:57:47 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 3 16019
hive> select analysistable.name,analysistable.failType,analysistable.subdieX,analysistable.subdieY from analysistable where analysistable.cellID='1081';
Query ID = root_20170518165353_1d7a4f19-8e56-4c95-8213-66c683de2340
Total jobs = 1
Launching Job 1 out of 1
Number of reduce tasks is set to 0 since there's no reduce operator
Starting Job = job_1494812274304_0224, Tracking URL = http://master:8088/proxy/application_1494812274304_0224/
Kill Command = /opt/cloudera/parcels/CDH-5.9.2-1.cdh5.9.2.p0.3/lib/hadoop/bin/hadoop job  -kill job_1494812274304_0224
Hadoop job information for Stage-1: number of mappers: 1; number of reducers: 0
2017-05-18 16:53:17,876 Stage-1 map = 0%,  reduce = 0%
2017-05-18 16:53:25,316 Stage-1 map = 100%,  reduce = 0%, Cumulative CPU 3.49 sec
MapReduce Total cumulative CPU time: 3 seconds 490 msec
Ended Job = job_1494812274304_0224
MapReduce Jobs Launched:
Stage-Stage-1: Map: 1   Cumulative CPU: 3.49 sec   HDFS Read: 6217805 HDFS Write: 478 SUCCESS
Total MapReduce CPU Time Spent: 3 seconds 490 msec
OK
V1LEM1_61_R        OPEN        1        1
V1LEM1_61_LK        SHORT        1        1
V1LEM1_61_R_2        OPEN        1        1
V1LEM1_61_LK_2        SHORT        1        1
V1LEM1_61_R_3        OPEN        1        2
V1LEM1_61_LK_3        SHORT        1        2
V1LEM1_61_R_4        OPEN        1        2
V1LEM1_61_LK_4        SHORT        1        2
V1LEM1_61_R_5        OPEN        2        1
V1LEM1_61_LK_5        SHORT        2        1
V1LEM1_61_R_6        OPEN        2        1
V1LEM1_61_LK_6        SHORT        2        1
V1LEM1_61_R_7        OPEN        2        2
V1LEM1_61_LK_7        SHORT        2        2
V1LEM1_61_R_8        OPEN        2        2
V1LEM1_61_LK_8        SHORT        2        2
V1LEM1_61_R_9        OPEN        3        1
V1LEM1_61_LK_9        SHORT        3        1
V1LEM1_61_R_10        OPEN        3        1
V1LEM1_61_LK_10        SHORT        3        1
Time taken: 19.89 seconds, Fetched: 20 row(s)
hive

单表筛选没有问题,如上,
但是我使用如下语句就报错:FAILED: SemanticException [Error 10002]: Line 1:40 Invalid column reference 'failType'
select analysistable.name,analysistable.failType,analysistable.subdieX,analysistable.subdieY FROM etestplan JOIN analysistable ON (etestplan.itemID=analysistable.ID) JOIN wafer ON (etestplan.waferID=wafer.ID) JOIN lot ON (wafer.lotID=lot.ID) JOIN celltable ON (analysistable.cellID=celltable.ID) WHERE lot.lotName IN ('EL4220') AND wafer.waferName IN ('EL4220_W01','EL4220_W02','EL4220_W03') AND wafer.etestData=1 AND celltable.designType='M1CC' GROUP BY analysistable.name;
但是如果我只保留analysistable.name就能得到结果,可是就是无法识别failType,subdieX,subdieY等几个column。
请问是不是我后面Join的部分写的有问题,请指导下,谢谢!!

已有(3)人评论

跳转到指定楼层
youngwenhao 发表于 2017-5-18 17:12:48
我找到原因了参照了:
http://www.aboutyun.com/thread-14942-1-1.html
谢谢关注!
回复

使用道具 举报

langke93 发表于 2017-5-18 17:32:45
youngwenhao 发表于 2017-5-18 17:12
我找到原因了参照了:
http://www.aboutyun.com/thread-14942-1-1.html
谢谢关注!

(⊙o⊙)…找到了就好
回复

使用道具 举报

abc50319 发表于 2017-5-18 17:32:57
不错 给赞  多支持
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条