人生的苟且 2016-07-27 02:12 采纳率: 50%
浏览 9592

HIVE中left join on后面不能跟OR吗,有什么办法可以达到同样效果吗?

hive> select a.waybill_no,
> a.orig_cty_code,
> a.dest_cty_code,
> a.product_code,
> b.rule_code
> from test1 a
> left join test2 b
> on a.product_code = b.product_code
> and (b.orig_cty_code is null or a.orig_cty_code = b.orig_cty_code);
FAILED: SemanticException Line 0:-1 OR not supported in JOIN currently 'orig_cty_code'

  • 写回答

0条回答 默认 最新

    报告相同问题?