hive中正则表达式的使用是比较频繁的,但是比较讨厌的是,正则表达式匹配失败的时候,hive完全不会报错。
原来的写法
SELECT * from ahhs_product_info where product_name NOT RLIKE '([\u4e00-\u9fa5])+' ;
在hive里面正确的写法
SELECT * from ahhs_product_info where product_name NOT RLIKE '([\\u4e00-\\u9fa5])+' ;
Hive使用regexp,RLIKE需要使用转义字符

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-14
  • 2021-08-13
  • 2021-12-19
猜你喜欢
  • 2021-04-25
  • 2021-12-25
  • 2021-06-15
  • 2022-01-17
  • 2021-08-21
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案