Skip to content

Commit

Permalink
Qbeast-io#207 Fixes for the QbeastSparkCorrectnessTest.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeiakimov committed Aug 23, 2023
1 parent 0d39edb commit 1960900
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/scala/io/qbeast/spark/delta/BlocksCodec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ private[delta] object BlocksCodec {
generator.writeStringField("cubeId", block.cubeId.string)
generator.writeStringField("state", block.state)
generator.writeNumberField("minWeight", block.minWeight.value)
generator.writeNumberField("max", block.maxWeight.value)
generator.writeNumberField("maxWeight", block.maxWeight.value)
generator.writeEndObject()
}
generator.writeEndArray()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ case class DeltaQbeastSnapshot(protected override val snapshot: Snapshot)
*/
def loadRevisionBlocks(revisionID: RevisionID): Dataset[AddFile] = {
if (isStaging(revisionID)) loadStagingBlocks()
else snapshot.allFiles.where(TagColumns.revision === lit(revisionID.toString))
else snapshot.allFiles.where(TagColumns.revisionId === lit(revisionID.toString))
}

/**
Expand Down
1 change: 1 addition & 0 deletions src/main/scala/io/qbeast/spark/utils/Params.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ object TagColumns {
final val maxWeight = col("tags.maxWeight")
final val state = col("tags.state")
final val revision = col("tags.revision")
final val revisionId = col("tags.revisionId")
final val elementCount = col("tags.elementCount")
}

Expand Down

0 comments on commit 1960900

Please sign in to comment.