Hive 集成配置单元语句

Hive 集成配置单元语句,hive,Hive,最近,我写了一些配置单元语句,但是当我集成配置单元语句时,我遇到了一些问题,具体情况如下(使用hadoop集群): 当我跑步时: from tmp insert overwrite local directory '/tmp/out/jpg' select count(1) where logdate=0222 and req_uri regexp '\.(jpg|JPG)'; 或 结果是正确的 在“/tmp/out/jpg”或“/tmp/out/jpg_hit”下,只有一个文件,文件

最近,我写了一些配置单元语句,但是当我集成配置单元语句时,我遇到了一些问题,具体情况如下(使用hadoop集群):

当我跑步时:

from tmp
  insert overwrite local directory '/tmp/out/jpg'
  select count(1) where logdate=0222 and req_uri regexp '\.(jpg|JPG)';

结果是正确的 在“/tmp/out/jpg”或“/tmp/out/jpg_hit”下,只有一个文件,文件上的结果(两个结果不相等)

但当我跑步时:

 from tmp
  insert overwrite local directory '/tmp/out/jpg'
  select count(1) where logdate=0222 and req_uri regexp '\.(jpg|JPG)'
  insert overwrite local directory '/tmp/out/jpg_hit'                 
  select count(1) where logdate=0222 and req_uri regexp '\.(jpg|JPG)' and hit_status="hit";
在“/tmp/out/jpg”或“/tmp/out/jpg_hit”下,都有很多文件,当我对每个文件编号求和时,我发现两个结果相等,并且等于大的数字,结果是错误的。
我可以问一下我是如何解决这个问题的吗?

当你计算第二个例子的和时,它是否等于两个单独的from语句的叉积?
 from tmp
  insert overwrite local directory '/tmp/out/jpg'
  select count(1) where logdate=0222 and req_uri regexp '\.(jpg|JPG)'
  insert overwrite local directory '/tmp/out/jpg_hit'                 
  select count(1) where logdate=0222 and req_uri regexp '\.(jpg|JPG)' and hit_status="hit";