diff --git a/src/functions/delta_scan.cpp b/src/functions/delta_scan.cpp index 5d50c8b..e07c391 100644 --- a/src/functions/delta_scan.cpp +++ b/src/functions/delta_scan.cpp @@ -557,6 +557,9 @@ void DeltaMultiFileReader::FinalizeBind(const MultiFileReaderOptions &file_optio if (!file_metadata->partition_map.empty()) { for (idx_t i = 0; i < global_column_ids.size(); i++) { column_t col_id = global_column_ids[i]; + if (IsRowIdColumnId(col_id)) { + continue; + } auto col_partition_entry = file_metadata->partition_map.find(global_names[col_id]); if (col_partition_entry != file_metadata->partition_map.end()) { // Todo: use https://github.com/delta-io/delta/blob/master/PROTOCOL.md#partition-value-serialization diff --git a/test/sql/dat/all.test b/test/sql/dat/all.test index c25c646..f6332da 100644 --- a/test/sql/dat/all.test +++ b/test/sql/dat/all.test @@ -26,7 +26,6 @@ query I rowsort nested_types SELECT * FROM delta_scan('${DAT_PATH}/out/reader_tests/generated/nested_types/delta') ---- - query I rowsort nested_types SELECT * FROM parquet_scan('${DAT_PATH}/out/reader_tests/generated/nested_types/expected/latest/**/*.parquet') @@ -43,6 +42,16 @@ SELECT * FROM parquet_scan('${DAT_PATH}/out/reader_tests/generated/basic_append/expected/latest/**/*.parquet') ---- +query I rowsort basic_append_count +SELECT count(*) +FROM delta_scan('${DAT_PATH}/out/reader_tests/generated/basic_append/delta') +---- + +query I rowsort basic_append_count +SELECT count(*) +FROM parquet_scan('${DAT_PATH}/out/reader_tests/generated/basic_append/expected/latest/**/*.parquet') +---- + # with_schema_change query I rowsort with_checkpoint SELECT * @@ -54,6 +63,16 @@ SELECT * FROM parquet_scan('${DAT_PATH}/out/reader_tests/generated/with_schema_change/expected/latest/**/*.parquet') ---- +query I rowsort with_checkpoint_count +SELECT count(*) +FROM delta_scan('${DAT_PATH}/out/reader_tests/generated/with_schema_change/delta') +---- + +query I rowsort with_checkpoint_count +SELECT count(*) +FROM parquet_scan('${DAT_PATH}/out/reader_tests/generated/with_schema_change/expected/latest/**/*.parquet') +---- + # basic_partitioned query I rowsort basic_partitioned SELECT * @@ -65,6 +84,16 @@ SELECT * FROM parquet_scan('${DAT_PATH}/out/reader_tests/generated/basic_partitioned/expected/latest/**/*.parquet') ---- +query I rowsort basic_partitioned_count +SELECT count(*) +FROM delta_scan('${DAT_PATH}/out/reader_tests/generated/basic_partitioned/delta') +---- + +query I rowsort basic_partitioned_count +SELECT count(*) +FROM parquet_scan('${DAT_PATH}/out/reader_tests/generated/basic_partitioned/expected/latest/**/*.parquet') +---- + # multi_partitioned query I rowsort multi_partitioned SELECT * @@ -76,6 +105,16 @@ SELECT letter, date, decode(data) as data, number FROM parquet_scan('${DAT_PATH}/out/reader_tests/generated/multi_partitioned/expected/latest/**/*.parquet') ---- +query I rowsort multi_partitioned_count +SELECT count(*) +FROM delta_scan('${DAT_PATH}/out/reader_tests/generated/multi_partitioned/delta') +---- + +query I rowsort multi_partitioned_count +SELECT count(*) +FROM parquet_scan('${DAT_PATH}/out/reader_tests/generated/multi_partitioned/expected/latest/**/*.parquet') +---- + # TODO: fix this require notwindows