Skip to content

Commit

Permalink
Change method name
Browse files Browse the repository at this point in the history
  • Loading branch information
osopardo1 authored and osopardo1 committed Dec 12, 2023
1 parent ad6e131 commit 61a7468
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/main/scala/io/qbeast/spark/table/IndexedTable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ trait IndexedTable {
* Returns whether the table contains Qbeast metadata
* @return
*/
def containsQbeastMetadata: Boolean
def hasQbeastMetadata: Boolean

/**
* Returns the table id which identifies the table.
Expand Down Expand Up @@ -161,18 +161,20 @@ private[table] class IndexedTableImpl(

override def exists: Boolean = !snapshot.isInitial

override def containsQbeastMetadata: Boolean = try {
override def hasQbeastMetadata: Boolean = try {
snapshot.loadLatestRevision
true
} catch {
case _: Exception => false
}

override def verifyAndMergeProperties(properties: Map[String, String]): Map[String, String] = {
if (!exists) { // IF not exists, we should only check new properties
if (!exists) {
// IF not exists, we should only check new properties
checkQbeastOptions(properties)
properties
} else if (containsQbeastMetadata) { // If exists, we can merge both properties: new and current
} else if (hasQbeastMetadata) {
// IF has qbeast metadata, we can merge both properties: new and current
val currentColumnsIndexed =
latestRevision.columnTransformers.map(_.columnName).mkString(",")
val currentCubeSize = latestRevision.desiredCubeSize.toString
Expand Down

0 comments on commit 61a7468

Please sign in to comment.