sandeep-katta commented on a change in pull request #32194:
URL: https://github.com/apache/spark/pull/32194#discussion_r614642928
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/SchemaPruning.scala
##########
@@ -61,12 +63,15 @@ object SchemaPruning {
sortLeftFieldsByRight(leftValueType, rightValueType),
containsNull)
case (leftStruct: StructType, rightStruct: StructType) =>
- val filteredRightFieldNames =
rightStruct.fieldNames.filter(leftStruct.fieldNames.contains)
+ val resolver = conf.resolver
+ val filteredRightFieldNames = rightStruct.fieldNames
+ .filter(name => leftStruct.fieldNames.exists(resolver(_, name)))
val sortedLeftFields = filteredRightFieldNames.map { fieldName =>
- val leftFieldType = leftStruct(fieldName).dataType
+ val resolvedLeftStruct = leftStruct.filter(p => resolver(p.name,
fieldName)).head
Review comment:
Done updated, just curious is there any performance difference between
these two
--
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]