zhangfengcdt commented on code in PR #2359: URL: https://github.com/apache/sedona/pull/2359#discussion_r2368784208
########## spark/common/src/main/scala/org/apache/spark/sql/sedona_sql/expressions/transform/TransformNestedUDTForParquet.scala: ########## @@ -0,0 +1,82 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.spark.sql.sedona_sql.expressions.transform + +import org.apache.spark.sql.catalyst.expressions.codegen.{CodegenContext, ExprCode} +import org.apache.spark.sql.catalyst.expressions.{Expression, UnaryExpression} +import org.apache.spark.sql.catalyst.InternalRow +import org.apache.spark.sql.sedona_sql.UDT.GeometryUDT +import org.apache.spark.sql.types._ + +/** + * Expression that transforms nested GeometryUDT to BinaryType to work around SPARK-48942. + * + * This expression recursively transforms the schema of nested structures containing GeometryUDT, + * converting them to BinaryType for compatibility with Spark's vectorized Parquet reader. + */ +case class TransformNestedUDTForParquet(child: Expression) extends UnaryExpression { Review Comment: This one has been renamed/moved under the udt package, I should have removed it from this old package. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
