Skip to content

Commit

Permalink
Add test for day level granularity
Browse files Browse the repository at this point in the history
  • Loading branch information
chenselena committed Oct 16, 2024
1 parent acd42eb commit 0bfc80f
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,22 @@ public void testReplicationPolicyWithoutProperSyntax() {
"ALTER TABLE openhouse.db.table SET POLICY (REPLICATION = ({cluster: 'aa', interval: '12'}))")
.show());

Assertions.assertThrows(
OpenhouseParseException.class,
() ->
spark
.sql(
"ALTER TABLE openhouse.db.table SET POLICY (REPLICATION = ({cluster: 'aa', interval: '1D'}))")
.show());

Assertions.assertThrows(
OpenhouseParseException.class,
() ->
spark
.sql(
"ALTER TABLE openhouse.db.table SET POLICY (REPLICATION = ({cluster: 'aa', interval: '12d'}))")
.show());

// Missing cluster and interval values
Assertions.assertThrows(
OpenhouseParseException.class,
Expand Down

0 comments on commit 0bfc80f

Please sign in to comment.