andygrove commented on code in PR #1066:
URL: https://github.com/apache/datafusion-comet/pull/1066#discussion_r1834495363
##########
spark/src/test/scala/org/apache/comet/CometCastSuite.scala:
##########
@@ -850,6 +850,36 @@ class CometCastSuite extends CometTestBase with
AdaptiveSparkPlanHelper {
castTest(generateTimestamps(), DataTypes.DateType)
}
+ // Complex Types
+
+ test("cast StructType to StringType") {
+ Seq(true, false).foreach { dictionaryEnabled =>
+ withTempDir { dir =>
+ val path = new Path(dir.toURI.toString, "test.parquet")
+ makeParquetFileAllTypes(path, dictionaryEnabled = dictionaryEnabled,
10000)
+ withParquetTable(path.toString, "tbl") {
+ // primitives
+ checkSparkAnswerAndOperator(
+ "SELECT CAST(struct(_1, _2, _3, _4, _5, _6, _7, _8) as string)
FROM tbl")
+ // TODO: enable tests for unsigned ints (_9, _10, _11, _12) once
+ // https://github.com/apache/datafusion-comet/issues/1067 is
resolved
+ // checkSparkAnswerAndOperator(
+ // "SELECT CAST(struct(_9, _10, _11, _12) as string) FROM tbl")
+ // decimals (_16 intentionally excluded due to formatting difference
with scientific notation)
Review Comment:
https://github.com/apache/datafusion-comet/issues/1068
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]