我正在學習 apache-spark。令人困惑的是,
這個命令有效
results = spark.sql("select * from df_sql_view where name LIKE '%i%'")
但這會引發錯誤
results = spark.sql("select * from df_sql_view where name ILIKE '%i%'")
ParseException:
mismatched input 'ILIKE' expecting {<EOF>, ';'}(line 1, pos 37)
== SQL ==
select * from df_sql_view where name ILIKE '%i%'
-------------------------------------^^^
有人可以幫助我理解為什么以及如何解決它。謝謝你。
uj5u.com熱心網友回復:
Spark SQL 僅支持like和rlike. 所以你想rlike用適當的正則運算式來替換ilike
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/345674.html
