From b165a53e30db89f54b2f1d5ad0f3a03ad24dc94e Mon Sep 17 00:00:00 2001 From: Nikolai Kochetov Date: Wed, 22 Aug 2018 15:47:06 +0300 Subject: [PATCH] Fix reading from partial granule for low cardinality type. #2896 --- dbms/src/DataTypes/DataTypeWithDictionary.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dbms/src/DataTypes/DataTypeWithDictionary.cpp b/dbms/src/DataTypes/DataTypeWithDictionary.cpp index 8877eb820f1..1fcb6caaf68 100644 --- a/dbms/src/DataTypes/DataTypeWithDictionary.cpp +++ b/dbms/src/DataTypes/DataTypeWithDictionary.cpp @@ -669,6 +669,9 @@ void DataTypeWithDictionary::deserializeBinaryBulkWithMultipleStreams( } }; + if (!settings.continuous_reading) + state_with_dictionary->num_pending_rows = 0; + bool first_dictionary = true; while (limit) {