@@ -944,31 +944,26 @@ class CometCastSuite extends CometTestBase with AdaptiveSparkPlanHelper {
944944 // Complex Types
945945
946946 test(" cast StructType to StringType" ) {
947- // TODO test fails if scan is auto
948- // https://github.com/apache/datafusion-comet/issues/2175
949- withSQLConf(CometConf .COMET_NATIVE_SCAN_IMPL .key -> CometConf .SCAN_NATIVE_COMET ) {
950- Seq (true , false ).foreach { dictionaryEnabled =>
951- withTempDir { dir =>
952- val path = new Path (dir.toURI.toString, " test.parquet" )
953- makeParquetFileAllPrimitiveTypes(path, dictionaryEnabled = dictionaryEnabled, 10000 )
954- withParquetTable(path.toString, " tbl" ) {
955- // primitives
956- checkSparkAnswerAndOperator(
957- " SELECT CAST(struct(_1, _2, _3, _4, _5, _6, _7, _8) as string) FROM tbl" )
958- checkSparkAnswerAndOperator(
959- " SELECT CAST(struct(_9, _10, _11, _12) as string) FROM tbl" )
960- // decimals
961- // TODO add _16 when https://github.com/apache/datafusion-comet/issues/1068 is resolved
962- checkSparkAnswerAndOperator(" SELECT CAST(struct(_15, _17) as string) FROM tbl" )
963- // dates & timestamps
964- checkSparkAnswerAndOperator(" SELECT CAST(struct(_18, _19, _20) as string) FROM tbl" )
965- // named struct
966- checkSparkAnswerAndOperator(
967- " SELECT CAST(named_struct('a', _1, 'b', _2) as string) FROM tbl" )
968- // nested struct
969- checkSparkAnswerAndOperator(
970- " SELECT CAST(named_struct('a', named_struct('b', _1, 'c', _2)) as string) FROM tbl" )
971- }
947+ Seq (true , false ).foreach { dictionaryEnabled =>
948+ withTempDir { dir =>
949+ val path = new Path (dir.toURI.toString, " test.parquet" )
950+ makeParquetFileAllPrimitiveTypes(path, dictionaryEnabled = dictionaryEnabled, 10000 )
951+ withParquetTable(path.toString, " tbl" ) {
952+ // primitives
953+ checkSparkAnswerAndOperator(
954+ " SELECT CAST(struct(_1, _2, _3, _4, _5, _6, _7, _8) as string) FROM tbl" )
955+ checkSparkAnswerAndOperator(" SELECT CAST(struct(_11, _12) as string) FROM tbl" )
956+ // decimals
957+ // TODO add _16 when https://github.com/apache/datafusion-comet/issues/1068 is resolved
958+ checkSparkAnswerAndOperator(" SELECT CAST(struct(_15, _17) as string) FROM tbl" )
959+ // dates & timestamps
960+ checkSparkAnswerAndOperator(" SELECT CAST(struct(_18, _19, _20) as string) FROM tbl" )
961+ // named struct
962+ checkSparkAnswerAndOperator(
963+ " SELECT CAST(named_struct('a', _1, 'b', _2) as string) FROM tbl" )
964+ // nested struct
965+ checkSparkAnswerAndOperator(
966+ " SELECT CAST(named_struct('a', named_struct('b', _1, 'c', _2)) as string) FROM tbl" )
972967 }
973968 }
974969 }
0 commit comments