Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] [Kernel] New tests for Timestamp_NTZ writes #1

Open
wants to merge 1 commit into
base: tfIntegration
Choose a base branch
from

Conversation

anoopj
Copy link
Owner

@anoopj anoopj commented Feb 25, 2025

This PR builds on top of PR#4159 and adds new unit tests for timestampNtz writes.

Most of the write functionality (e.g. creation, inserts, insert with partition columns)
are already exercised by DeltaTableWritesSuite. This PR adds a few more tests.

## Description

This PR builds on top of PR#4159 and adds new unit tests for timestampNtz writes.

Most of the write functionality (e.g. creation, inserts, insert with partition columns) 
are already exercised by DeltaTableWritesSuite. This PR adds a few more tests.

## How was this patch tested?

New UTs.
@@ -1323,4 +1325,65 @@ class DeltaTableWritesSuite extends DeltaTableWriteSuiteBase with ParquetSuiteBa
assert(meta.get(ColumnMapping.COLUMN_MAPPING_PHYSICAL_NAME_KEY) == expPhyName)
}
}

test("create table TIMESTAMP_NTZ type should auto-enable the reader/writer feature") {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we move these tests to DeltaTableFeaturesSuite?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there are utilities to check if the protocol contains certain features.

}
}

test("create table without TIMESTAMP_NTZ type should use minimum protocol") {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can combine this test and above one with
Seq(
// Test format: isTimestamp enabled, expected protocol
(true, new Protocol(3, 7, Set("timestampNtz"), Set("timetampNtz"),
(false, new Protocol(1, 2, Set.empty, Set.empty)
) {
case (isTimestampEnabled, expProtocol) => {
... test code ...
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants