Hisoka-X commented on code in PR #41187: URL: https://github.com/apache/spark/pull/41187#discussion_r1195962809
########## sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala: ########## @@ -280,6 +280,20 @@ class SQLQuerySuite extends QueryTest with SharedSparkSession with AdaptiveSpark ) } + test("SPARK-43522: Fix creating struct column name with index of array") { + + val data = Seq("a=b,c=d,d=f").toDF.withColumn("key_value", split('value, ",")) + + val df = data.withColumn("map_entry", transform(col("key_value"), x => struct(split(x, "=") Review Comment: The difference are one use alias to struct elements, another one don't use alias. The one use alias will get rigt answer before this PR, another will not. I get it from jira ticket. > I think it would be easier to compare to a DataFrame with the expected result. Just check expected result is good for me. I will change it -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org