Skip to content

Commit

Permalink
[Kernel] Fix typo in TableFeaturesSuite (#4170)
Browse files Browse the repository at this point in the history
#### Which Delta project/connector is this regarding?
- [ ] Spark
- [ ] Standalone
- [ ] Flink
- [X] Kernel
- [ ] Other (fill in here)

## Description

Fix a minor typo in TableFeaturesSuite

## How was this patch tested?

$ build/sbt kernelGroup/test

## Does this PR introduce _any_ user-facing changes?

No
  • Loading branch information
anoopj authored Feb 20, 2025
1 parent ac54ef7 commit 71cf788
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ class TableFeaturesSuite extends AnyFunSuite {
// Test feature, metadata, expected result
("appendOnly", testMetadata(tblProps = Map("delta.appendOnly" -> "true")), true),
("appendOnly", testMetadata(tblProps = Map("delta.appendOnly" -> "false")), false),
("invariants", testMetadata(includeInvaraint = true), true),
("invariants", testMetadata(includeInvaraint = false), false),
("invariants", testMetadata(includeInvariant = true), true),
("invariants", testMetadata(includeInvariant = false), false),
("checkConstraints", testMetadata(tblProps = Map("delta.constraints.a" -> "a = b")), true),
("checkConstraints", testMetadata(), false),
("generatedColumns", testMetadata(includeGeneratedColumn = true), true),
Expand Down Expand Up @@ -218,7 +218,7 @@ class TableFeaturesSuite extends AnyFunSuite {

Seq(
// Test format: feature, metadata, expected value
("invariants", testMetadata(includeInvaraint = true), false),
("invariants", testMetadata(includeInvariant = true), false),
("checkConstraints", testMetadata(tblProps = Map("delta.constraints.a" -> "a = b")), false),
("generatedColumns", testMetadata(includeGeneratedColumn = true), false),
("identityColumns", testMetadata(includeIdentityColumn = true), false)).foreach({
Expand Down Expand Up @@ -249,13 +249,13 @@ class TableFeaturesSuite extends AnyFunSuite {
test("validateWriteSupported: protocol 2 with invariants") {
checkUnsupported(
createTestProtocol(minWriterVersion = 2),
metadata = testMetadata(includeInvaraint = true))
metadata = testMetadata(includeInvariant = true))
}

test("validateWriteSupported: protocol 2, with appendOnly and invariants") {
checkUnsupported(
createTestProtocol(minWriterVersion = 2),
metadata = testMetadata(includeInvaraint = true))
metadata = testMetadata(includeInvariant = true))
}

Seq(3, 4, 5, 6).foreach { minWriterVersion =>
Expand Down Expand Up @@ -312,7 +312,7 @@ class TableFeaturesSuite extends AnyFunSuite {
test("validateWriteSupported: protocol 7 with invariants, schema contains invariants") {
checkUnsupported(
createTestProtocol(minWriterVersion = 7, "invariants"),
metadata = testMetadata(includeInvaraint = true))
metadata = testMetadata(includeInvariant = true))
}

def checkSupported(
Expand Down Expand Up @@ -340,14 +340,14 @@ class TableFeaturesSuite extends AnyFunSuite {
}

def testMetadata(
includeInvaraint: Boolean = false,
includeInvariant: Boolean = false,
includeTimestampNtzTypeCol: Boolean = false,
includeVariantTypeCol: Boolean = false,
includeGeneratedColumn: Boolean = false,
includeIdentityColumn: Boolean = false,
tblProps: Map[String, String] = Map.empty): Metadata = {
val testSchema = createTestSchema(
includeInvaraint,
includeInvariant,
includeTimestampNtzTypeCol,
includeVariantTypeCol,
includeGeneratedColumn,
Expand Down

0 comments on commit 71cf788

Please sign in to comment.