adjust / parquet_fdw

Parquet foreign data wrapper for PostgreSQL
PostgreSQL License
352 stars 38 forks source link

parquetAnalyzeForeignTable does not set totalpages #30

Open sdressler opened 3 years ago

sdressler commented 3 years ago

The function parquetAnalyzeForeignTable does not assign a value to totalpages. This is however needed for estimation (most notably in parquetGetForeignRelSize).

Proposed implementation (pseudocode):

total_byte_size = 0;
foreach pq_file in files do
  total_byte_size += SumRowGroupSizes(pq_file);
end
*totalpages = total_byte_size / BLCKSZ;