Signed-off-by: yan zhang <dirtysalt1987@gmail.com> Co-authored-by: yan zhang <dirtysalt1987@gmail.com>
This commit is contained in:
parent
e70b5139dd
commit
898d7a400e
|
|
@ -237,8 +237,9 @@ Status HdfsScanner::get_next(RuntimeState* runtime_state, ChunkPtr* chunk) {
|
|||
// short circuit for min/max optimization.
|
||||
if (_scanner_ctx.can_use_min_max_optimization()) {
|
||||
// 3 means we output 3 values: min, max, and null
|
||||
_scanner_ctx.append_or_update_min_max_column_to_chunk(chunk, 3);
|
||||
size_t row_count = (*chunk)->num_rows();
|
||||
const size_t row_count = 3;
|
||||
(*chunk)->set_num_rows(row_count);
|
||||
_scanner_ctx.append_or_update_min_max_column_to_chunk(chunk, row_count);
|
||||
_scanner_ctx.append_or_update_partition_column_to_chunk(chunk, row_count);
|
||||
_scanner_ctx.append_or_update_extended_column_to_chunk(chunk, row_count);
|
||||
_scanner_ctx.no_more_chunks = true;
|
||||
|
|
|
|||
|
|
@ -324,6 +324,26 @@ None None None None
|
|||
drop table ice_tbl_${uuid1} force;
|
||||
-- result:
|
||||
-- !result
|
||||
create external table ice_tbl_${uuid2}(
|
||||
c_int int,
|
||||
dt datetime
|
||||
) partition by (dt);
|
||||
-- result:
|
||||
-- !result
|
||||
INSERT INTO ice_tbl_${uuid2} (
|
||||
c_int, dt
|
||||
) VALUES
|
||||
(10, '2021-01-01 13:00:00'),
|
||||
(20, '2022-01-01 14:00:00');
|
||||
-- result:
|
||||
-- !result
|
||||
select min(dt), max(dt) from ice_tbl_${uuid2};
|
||||
-- result:
|
||||
2021-01-01 13:00:00 2022-01-01 14:00:00
|
||||
-- !result
|
||||
drop table ice_tbl_${uuid2} force;
|
||||
-- result:
|
||||
-- !result
|
||||
drop database iceberg_sql_test_${uuid0}.iceberg_db_${uuid0};
|
||||
-- result:
|
||||
-- !result
|
||||
|
|
|
|||
|
|
@ -285,6 +285,21 @@ select min(c_int), max(c_int), max(c_bigint), max(c_bigint) from ice_tbl_${uuid1
|
|||
|
||||
drop table ice_tbl_${uuid1} force;
|
||||
|
||||
create external table ice_tbl_${uuid2}(
|
||||
c_int int,
|
||||
dt datetime
|
||||
) partition by (dt);
|
||||
|
||||
INSERT INTO ice_tbl_${uuid2} (
|
||||
c_int, dt
|
||||
) VALUES
|
||||
(10, '2021-01-01 13:00:00'),
|
||||
(20, '2022-01-01 14:00:00');
|
||||
|
||||
select min(dt), max(dt) from ice_tbl_${uuid2};
|
||||
|
||||
drop table ice_tbl_${uuid2} force;
|
||||
|
||||
drop database iceberg_sql_test_${uuid0}.iceberg_db_${uuid0};
|
||||
set catalog default_catalog;
|
||||
drop catalog iceberg_sql_test_${uuid0};
|
||||
|
|
|
|||
Loading…
Reference in New Issue