HyukjinKwon commented on a change in pull request #30984:
URL: https://github.com/apache/spark/pull/30984#discussion_r553683778
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSourceStrategy.scala
##########
@@ -737,6 +737,10 @@ abstract class PushableColumnBase {
}
case s: GetStructField if nestedPredicatePushdownEnabled =>
helper(s.child).map(_ :+ s.childSchema(s.ordinal).name)
+ case GetJsonObject(col, field) =>
+ val colName = col.toString.split("#")(0)
+ val fieldName = field.toString.split("\\.").last
+ Some(Seq("GetJsonObject(" + col + "," + field + ")"))
Review comment:
@tedyu, it should be backquoted because it contains special characters:
```scala
spark.sql("select `GetJsonObject(phone,'$.code')` from t")
```
I am more asking how the downstream DSv2 implementation should handle the
string `GetJsonObject(phone,'$.code')`. Is it a field name or pushed JSON
expression? This seems ambiguous.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]