maropu commented on a change in pull request #30372:
URL: https://github.com/apache/spark/pull/30372#discussion_r524941488



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala
##########
@@ -1734,15 +1734,17 @@ object CodeGenerator extends Logging {
    * Returns the specialized code to access a value from a column vector for a 
given `DataType`.
    */
   def getValueFromVector(vector: String, dataType: DataType, rowId: String): 
String = {
-    if (dataType.isInstanceOf[StructType]) {
-      // `ColumnVector.getStruct` is different from `InternalRow.getStruct`, 
it only takes an
-      // `ordinal` parameter.
-      s"$vector.getStruct($rowId)"
-    } else {
-      getValue(vector, dataType, rowId)
+    dataType match {
+      case udt: UserDefinedType[_] => getValueFromVector(vector, udt.sqlType, 
rowId)

Review comment:
       Does this issue only happens when using 
`spark-bigquery-with-dependencies`? In the current spark codebase, it seems 
dataType cannot be an user-defined type in this method.




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