CTTY commented on code in PR #9717:
URL: https://github.com/apache/hudi/pull/9717#discussion_r1380916039


##########
hudi-client/hudi-spark-client/src/main/scala/org/apache/spark/sql/DataFrameUtil.scala:
##########
@@ -31,7 +33,7 @@ object DataFrameUtil {
    */
   def createFromInternalRows(sparkSession: SparkSession, schema:
   StructType, rdd: RDD[InternalRow]): DataFrame = {
-    val logicalPlan = LogicalRDD(schema.toAttributes, rdd)(sparkSession)
+    val logicalPlan = 
LogicalRDD(SparkAdapterSupport.sparkAdapter.toAttributes(schema), 
rdd)(sparkSession)

Review Comment:
   StructType.toAttributes was removed in Spark 3.5.0 by 
[SPARK-44353](https://github.com/apache/spark/pull/41925)
   
   Solution is to switch to use DataTypeUtils.toAttributes



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

Reply via email to