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