HyukjinKwon commented on a change in pull request #30984:
URL: https://github.com/apache/spark/pull/30984#discussion_r550952448



##########
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:
       I know it is rather rare case but how do we distinguish 
`GetJsonObject(col, field)` as a field name vs as the expression pushed down? I 
doubt if this is a general way that we can leverage to push expressions down.




----------------------------------------------------------------
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]

Reply via email to