chore: Warn if a parquet file has no sort key (#5368)
parent
ce3e2c3a15
commit
c0fc91c627
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue