Address comments

This commit is contained in:
avogar 2023-08-23 13:19:15 +00:00
parent 7e362a2110
commit 68e3af56d4
4 changed files with 4 additions and 10 deletions

View File

@ -75,7 +75,7 @@ private:
std::list<UInt64> include_indices;
BlockMissingValues block_missing_values;
size_t approx_bytes_read_for_chunk;
size_t approx_bytes_read_for_chunk = 0;
const FormatSettings format_settings;
const std::unordered_set<int> & skip_stripes;

View File

@ -645,13 +645,7 @@ Chunk ParquetBlockInputFormat::generate()
return {};
if (need_only_count)
{
auto & row_group_batch = row_group_batches[row_group_batches_completed++];
size_t num_rows = 0;
for (int row_group_index : row_group_batch.row_groups_idxs)
num_rows += metadata->RowGroup(row_group_index)->num_rows();
return getChunkForCount(num_rows);
}
return getChunkForCount(row_group_batches[row_group_batches_completed++].total_rows);
std::unique_lock lock(mutex);

View File

@ -254,7 +254,8 @@ public:
/// because those are internally translated into 'ALTER UDPATE' mutations.
virtual bool supportsDelete() const { return false; }
/// Return true if the trivial count query could be optimized without reading the data at all.
/// Return true if the trivial count query could be optimized without reading the data at all
/// in totalRows() or totalRowsByPartitionPredicate() methods or with optimized reading in read() method.
virtual bool supportsTrivialCountOptimization() const { return false; }
private:

View File

@ -38,7 +38,6 @@
<value>CapnProto</value>
<value>ORC</value>
<value>Parquet</value>
<value>Arrow</value>
</values>
</substitution>
</substitutions>