Skip to content

Commit 565bdd0

Browse files
passing tests
Co-authored-by: Thomas Chow <[email protected]>
1 parent ef6213a commit 565bdd0

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

cloud_gcp/src/main/scala/ai/chronon/integrations/cloud_gcp/DelegatingBigQueryMetastoreCatalog.scala

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,13 @@ class DelegatingBigQueryMetastoreCatalog extends TableCatalog with SupportsNames
118118

119119
override def loadTable(rawIdent: Identifier): Table = {
120120
// Remove the catalog segment. We've already consumed it, now it's time to figure out the namespace.
121-
val identNoCatalog = Identifier.of(rawIdent.namespace.flatMap(_.split("\\.")).toList match {
122-
case catalog :: namespace :: Nil => Array(namespace)
123-
case namespace :: Nil => Array(namespace)
124-
}, rawIdent.name)
121+
val identNoCatalog = Identifier.of(
122+
rawIdent.namespace.flatMap(_.split("\\.")).toList match {
123+
case catalog :: namespace :: Nil => Array(namespace)
124+
case namespace :: Nil => Array(namespace)
125+
},
126+
rawIdent.name
127+
)
125128
Try {
126129
val icebergSparkTable = icebergCatalog.loadTable(identNoCatalog)
127130
DelegatingTable(icebergSparkTable,

spark/src/test/scala/ai/chronon/spark/test/TableUtilsTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import org.junit.Assert.{assertEquals, assertTrue}
2626
import org.scalatest.flatspec.AnyFlatSpec
2727

2828
import ai.chronon.spark.format.FormatProvider
29+
import ai.chronon.spark.format.DefaultFormatProvider
2930
import org.apache.spark.sql.catalyst.parser.ParseException
3031

3132
import scala.util.Try
@@ -644,7 +645,6 @@ class TableUtilsTest extends AnyFlatSpec {
644645
}
645646

646647
it should "test catalog detection" in {
647-
import ai.chronon.spark.format.DefaultFormatProvider
648648
val fp = FormatProvider.from(spark).asInstanceOf[DefaultFormatProvider]
649649
assertEquals("catalogA", fp.getCatalog("catalogA.foo.bar"))
650650
assertEquals("catalogA", fp.getCatalog("`catalogA`.foo.bar"))

0 commit comments

Comments
 (0)