Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(query) the schema provided by _type_ does not match colIDs in the… #1868

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions core/src/main/scala/filodb.core/metadata/Schemas.scala
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,8 @@ final case class Schemas(part: PartitionSchema,
val numSamplesPerChunk = chunkDurationMillis / resolutionMs
// find number of chunks to be scanned. Ceil division needed here
val numChunksPerTs = (queryDurationMs + chunkDurationMillis - 1) / chunkDurationMillis
val bytesPerSample = colIds.map(c => bytesPerSampleSwag((schemaId, c))).sum
// The schema provided does not match existing, give the the sample a weight of histogram.
val bytesPerSample = colIds.map(c => bytesPerSampleSwag.getOrElse((schemaId, c), 20.0)).sum
val estDataSize = bytesPerSample * numTsPartitions * numSamplesPerChunk * numChunksPerTs
estDataSize
}
Expand All @@ -327,7 +328,8 @@ final case class Schemas(part: PartitionSchema,
chunkMethod: ChunkScanMethod
): Double = {
val numSamplesPerChunk = chunkDurationMillis / resolutionMs
val bytesPerSample = colIds.map(c => bytesPerSampleSwag((schemaId, c))).sum
// The schema provided does not match existing, give the the sample a weight of histogram.
val bytesPerSample = colIds.map(c => bytesPerSampleSwag.getOrElse((schemaId, c), 20.0)).sum
var estDataSize = 0d
pkRecs.foreach { pkRec =>
val intersection = Math.min(chunkMethod.endTime, pkRec.endTime) - Math.max(chunkMethod.startTime, pkRec.startTime)
Expand Down
Loading