小编yuc*_*ang的帖子

为什么 SparkSession.sql("set hive.support.quoted.identifiers=None") 不起作用?

我想在 SparkSession.sql 中使用正则表达式,但无论我使用:

SparkSession.builder.enableHiveSupport().config("hive.support.quoted.identifiers", None)

或者

SparkSession.sql("set hive.support.quoted.identifiers=None")

请告诉我该怎么做。

代码:

ss = (pyspark.sql.SparkSession
      .builder
      .enableHiveSupport()          
      .config("hive.support.quoted.identifiers", None)
      .getOrCreate())                                         
#ss.sql("set hive.support.quoted.identifiers=None")
ss.sql("SELECT `(col)?+.+` FROM table")
Run Code Online (Sandbox Code Playgroud)

程序结果:

pyspark.sql.utils.AnalysisException: "cannot resolve '`(col)?+.+`' given input columns: ... ...
Run Code Online (Sandbox Code Playgroud)

hive apache-spark pyspark

2
推荐指数
1
解决办法
2469
查看次数

标签 统计

apache-spark ×1

hive ×1

pyspark ×1