Skip to content
Draft
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ package object licensing {
val Community: LicenseKey = LicenseKey(
id = "community",
licenseType = LicenseType.Community,
features = Set(Feature.MaterializedViews, Feature.JdbcDriver, Feature.FlightSql),
features =
Set(Feature.MaterializedViews, Feature.JdbcDriver, Feature.FlightSql, Feature.Federation),
expiresAt = None,
quota = Some(Quota.Community)
)
Expand All @@ -142,29 +143,33 @@ package object licensing {
maxMaterializedViews: Option[Int], // None = unlimited
maxQueryResults: Option[Int], // None = unlimited
maxConcurrentQueries: Option[Int],
maxClusters: Option[Int] = Some(0) // None = unlimited
maxClusters: Option[Int] = Some(0), // None = unlimited
maxJoins: Option[Int] = Some(0) // None = unlimited
)

object Quota {
val Community: Quota = Quota(
maxMaterializedViews = Some(3),
maxQueryResults = Some(10000),
maxConcurrentQueries = Some(5),
maxClusters = Some(0)
maxClusters = Some(1),
maxJoins = Some(1)
)

val Pro: Quota = Quota(
maxMaterializedViews = Some(50),
maxQueryResults = Some(1000000),
maxConcurrentQueries = Some(50),
maxClusters = Some(5)
maxClusters = Some(5),
maxJoins = Some(5)
)

val Enterprise: Quota = Quota(
maxMaterializedViews = None, // Unlimited
maxQueryResults = None,
maxConcurrentQueries = None,
maxClusters = None
maxClusters = None,
maxJoins = None
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ class LicenseManagerSpec extends AnyFlatSpec with Matchers {
manager.hasFeature(Feature.FlightSql) shouldBe true
}

it should "not include Federation" in {
manager.hasFeature(Feature.Federation) shouldBe false
it should "include Federation" in {
manager.hasFeature(Feature.Federation) shouldBe true
}

it should "not include OdbcDriver" in {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@ import org.scalatest.matchers.should.Matchers

class QuotaSpec extends AnyFlatSpec with Matchers {

"Quota.Community" should "have maxClusters = Some(0)" in {
Quota.Community.maxClusters shouldBe Some(0)
"Quota.Community" should "have maxClusters = Some(1)" in {
Quota.Community.maxClusters shouldBe Some(1)
}

it should "have maxJoins = Some(1)" in {
Quota.Community.maxJoins shouldBe Some(1)
}

it should "have maxMaterializedViews = Some(3)" in {
Expand All @@ -41,6 +45,10 @@ class QuotaSpec extends AnyFlatSpec with Matchers {
Quota.Pro.maxClusters shouldBe Some(5)
}

it should "have maxJoins = Some(5)" in {
Quota.Pro.maxJoins shouldBe Some(5)
}

it should "have maxMaterializedViews = Some(50)" in {
Quota.Pro.maxMaterializedViews shouldBe Some(50)
}
Expand All @@ -57,6 +65,10 @@ class QuotaSpec extends AnyFlatSpec with Matchers {
Quota.Enterprise.maxClusters shouldBe None
}

it should "have maxJoins = None (unlimited)" in {
Quota.Enterprise.maxJoins shouldBe None
}

it should "have maxMaterializedViews = None (unlimited)" in {
Quota.Enterprise.maxMaterializedViews shouldBe None
}
Expand All @@ -76,5 +88,6 @@ class QuotaSpec extends AnyFlatSpec with Matchers {
maxConcurrentQueries = Some(1)
)
quota.maxClusters shouldBe Some(0)
quota.maxJoins shouldBe Some(0)
}
}
Loading