Skip to content

Commit

Permalink
[test](parquet)append parquet reader byte_array_decimal and rle_bool …
Browse files Browse the repository at this point in the history
…case (#26751) (#27026)

backport #26751
  • Loading branch information
hubgeter authored Nov 16, 2023
1 parent 8df819e commit 4d24350
Show file tree
Hide file tree
Showing 8 changed files with 118 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1762,6 +1762,20 @@ LOCATION

msck repair table orc_decimal_table;

CREATE TABLE `parquet_decimal_bool`(
decimals decimal(20,3),
bool_rle boolean
)
ROW FORMAT SERDE
'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe'
STORED AS INPUTFORMAT
'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat'
OUTPUTFORMAT
'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'
LOCATION
'/user/doris/preinstalled_data/parquet_table/parquet_decimal_bool';

msck repair table partition_table;

show tables;

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,29 @@ suite("test_hive_basic_type", "p0,external,hive,external_docker,external_docker_
// orc_all_types_t predicate test
order_qt_41 """select * from ${catalog_name}.${ex_db_name}.orc_all_types_t where t_int = 3;"""

//test parquet byte_array_decimal and rle_bool
order_qt_parquet """ select count(*) from ${catalog_name}.${ex_db_name}.parquet_decimal_bool """
order_qt_parquet1 """ select * from ${catalog_name}.${ex_db_name}.parquet_decimal_bool
where decimals is not null and bool_rle is not null order by decimals,bool_rle limit 7 """
order_qt_parquet2 """ select decimals from ${catalog_name}.${ex_db_name}.parquet_decimal_bool
where decimals is not null and decimals > 1 order by decimals limit 7 """
order_qt_parquet3 """ select decimals from ${catalog_name}.${ex_db_name}.parquet_decimal_bool
where decimals = 123.456 order by decimals limit 7 """
order_qt_parquet4 """ select decimals from ${catalog_name}.${ex_db_name}.parquet_decimal_bool
where decimals != -7871.416 and decimals is not null order by decimals limit 7 """

order_qt_parquet5 """ select decimals from ${catalog_name}.${ex_db_name}.parquet_decimal_bool
where decimals is not null and decimals < 0 order by decimals limit 7 """

order_qt_parquet7 """ select bool_rle from ${catalog_name}.${ex_db_name}.parquet_decimal_bool
where bool_rle is not null and bool_rle = 1 limit 7 """
order_qt_parquet8 """ select bool_rle from ${catalog_name}.${ex_db_name}.parquet_decimal_bool
where bool_rle is not null and bool_rle = 1 limit 7 """
order_qt_parquet9 """ select count(bool_rle) from ${catalog_name}.${ex_db_name}.parquet_decimal_bool; """
order_qt_parquet10 """ select count(decimals) from ${catalog_name}.${ex_db_name}.parquet_decimal_bool; """
order_qt_parquet11 """ select decimals from ${catalog_name}.${ex_db_name}.parquet_decimal_bool
where decimals is not null and decimals > 1 order by decimals limit 7 """

//sql """drop catalog if exists ${catalog_name} """
}
}
Expand Down

0 comments on commit 4d24350

Please sign in to comment.