@@ -27,15 +27,17 @@ suite("test_hdfs_binary_mapping", "p0,external,hive,tvf,external_docker") {
2727 sql " SET enable_file_scanner_v2=true"
2828 for (def file : [[" orc" , " test_hdfs_orc/group6/orc_test_binary_column.orc" ],
2929 [" parquet" , " test_hdfs_parquet/group6/fixed_len_byte_array.parquet" ]]) {
30+ // UUID annotations retain a separate explicit override; compare the ordinary binary leaf.
31+ String projection = file[0 ] == " parquet" ? " decimal_flba, `interval`" : " *"
3032 def expectedSchema = null
3133 def expectedRows = null
3234 for (String option : [" " , ' , "enable_mapping_varbinary"="false"' ,
3335 ' , "enable_mapping_varbinary"="true"' ]) {
3436 String tvf = """ HDFS("uri"="hdfs://${ host} :${ port} /user/doris/tvf_data/${ file[1]} ",
3537 "hadoop.username"="doris", "format"="${ file[0]} " ${ option} )"""
36- def schema = sql(" DESC FUNCTION ${ tvf} " )
38+ def schema = sql(" DESC FUNCTION ${ tvf} " ). findAll { it[ 0 ] != " uuid " }
3739 assertTrue (schema. any { it[1 ]. toString(). toLowerCase(). startsWith(" varbinary" ) })
38- def rows = sql(" SELECT * FROM ${ tvf} LIMIT 5" )
40+ def rows = sql(" SELECT ${ projection } FROM ${ tvf} LIMIT 5" )
3941 // The legacy option must change neither the inferred type nor the bytes returned.
4042 if (expectedSchema == null ) {
4143 expectedSchema = schema
@@ -49,7 +51,7 @@ suite("test_hdfs_binary_mapping", "p0,external,hive,tvf,external_docker") {
4951 test {
5052 sql """ CREATE TABLE ${ target} DUPLICATE KEY(mapping_key)
5153 DISTRIBUTED BY HASH(mapping_key) BUCKETS 1
52- PROPERTIES("replication_num"="1") AS SELECT 1 AS mapping_key, * FROM ${ tvf} LIMIT 5"""
54+ PROPERTIES("replication_num"="1") AS SELECT 1 AS mapping_key, ${ projection } FROM ${ tvf} LIMIT 5"""
5355 exception " doris do not support varbinary create table"
5456 }
5557 }
0 commit comments