chore: Warn if a parquet file has no sort key (#5368)

pull/24376/head
Andrew Lamb 2022-08-10 07:56:50 -04:00 committed by GitHub
parent ce3e2c3a15
commit c0fc91c627
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 0 deletions

View File

@ -364,6 +364,18 @@ fn to_queryable_parquet_chunk(
"built parquet chunk from metadata" "built parquet chunk from metadata"
); );
// If there is no sort key on this parquet chunk, the query
// engine will end up resorting it, requiring substantial
// memory. Thus warn if this has happened as it signals a bug in
// the code somewhere.
if sort_key.is_none() {
warn!(parquet_file_id=?file.id,
parquet_file_namespace_id=?file.namespace_id,
parquet_file_object_store_id=?file.object_store_id,
"Parquet file is not sorted."
);
}
QueryableParquetChunk::new( QueryableParquetChunk::new(
table_name, table_name,
file.partition_id, file.partition_id,