Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

fix(weed/query/engine): check for nil pointers (#9114)

Lars Lehtonen66ce0c29cf7a
diff --git a/weed/query/engine/hybrid_message_scanner.go b/weed/query/engine/hybrid_message_scanner.go
index 4df91024b6..e263f781c0 100644
--- a/weed/query/engine/hybrid_message_scanner.go
+++ b/weed/query/engine/hybrid_message_scanner.go
@@ -1156,6 +1156,12 @@ func (h *HybridMessageScanner) ReadParquetStatistics(partitionPath string) ([]*P
// extractParquetFileStats extracts column statistics from a single parquet file
func (h *HybridMessageScanner) extractParquetFileStats(entry *filer_pb.Entry, lookupFileIdFn wdclient.LookupFileIdFunctionType, chunkCache *chunk_cache.ChunkCacheInMemory) (*ParquetFileStats, error) {
+ if entry == nil {
+ return nil, fmt.Errorf("cannot operate on nil entry")
+ }
+ if chunkCache == nil {
+ return nil, fmt.Errorf("cannot operate on nil chunkCache")
+ }
// Create reader for the parquet file
fileSize := filer.FileSize(entry)
visibleIntervals, _ := filer.NonOverlappingVisibleIntervals(context.Background(), lookupFileIdFn, entry.Chunks, 0, int64(fileSize))