Skip to content

Commit

Permalink
use new createTable() in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
clettieri committed Sep 20, 2023
1 parent 9a62170 commit a886a6a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,7 @@ public void testAddHoursPartition() {

@Test
public void testAddYearPartition() {
sql(
"CREATE TABLE %s (id bigint NOT NULL, category string, ts timestamp, data string) USING iceberg",
tableName);
createTable("id bigint NOT NULL, category string, ts timestamp, data string");
Table table = validationCatalog.loadTable(tableIdent);

Assertions.assertThat(table.spec().isUnpartitioned())
Expand All @@ -205,9 +203,7 @@ public void testAddYearPartition() {

@Test
public void testAddMonthPartition() {
sql(
"CREATE TABLE %s (id bigint NOT NULL, category string, ts timestamp, data string) USING iceberg",
tableName);
createTable("id bigint NOT NULL, category string, ts timestamp, data string");
Table table = validationCatalog.loadTable(tableIdent);

Assertions.assertThat(table.spec().isUnpartitioned())
Expand All @@ -228,9 +224,7 @@ public void testAddMonthPartition() {

@Test
public void testAddDayPartition() {
sql(
"CREATE TABLE %s (id bigint NOT NULL, category string, ts timestamp, data string) USING iceberg",
tableName);
createTable("id bigint NOT NULL, category string, ts timestamp, data string");
Table table = validationCatalog.loadTable(tableIdent);

Assertions.assertThat(table.spec().isUnpartitioned())
Expand All @@ -251,9 +245,7 @@ public void testAddDayPartition() {

@Test
public void testAddHourPartition() {
sql(
"CREATE TABLE %s (id bigint NOT NULL, category string, ts timestamp, data string) USING iceberg",
tableName);
createTable("id bigint NOT NULL, category string, ts timestamp, data string");
Table table = validationCatalog.loadTable(tableIdent);

Assertions.assertThat(table.spec().isUnpartitioned())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,7 @@ public void testAddHoursPartition() {

@Test
public void testAddYearPartition() {
sql(
"CREATE TABLE %s (id bigint NOT NULL, category string, ts timestamp, data string) USING iceberg",
tableName);
createTable("id bigint NOT NULL, category string, ts timestamp, data string");
Table table = validationCatalog.loadTable(tableIdent);

Assertions.assertThat(table.spec().isUnpartitioned())
Expand All @@ -205,9 +203,7 @@ public void testAddYearPartition() {

@Test
public void testAddMonthPartition() {
sql(
"CREATE TABLE %s (id bigint NOT NULL, category string, ts timestamp, data string) USING iceberg",
tableName);
createTable("id bigint NOT NULL, category string, ts timestamp, data string");
Table table = validationCatalog.loadTable(tableIdent);

Assertions.assertThat(table.spec().isUnpartitioned())
Expand All @@ -228,9 +224,7 @@ public void testAddMonthPartition() {

@Test
public void testAddDayPartition() {
sql(
"CREATE TABLE %s (id bigint NOT NULL, category string, ts timestamp, data string) USING iceberg",
tableName);
createTable("id bigint NOT NULL, category string, ts timestamp, data string");
Table table = validationCatalog.loadTable(tableIdent);

Assertions.assertThat(table.spec().isUnpartitioned())
Expand All @@ -251,9 +245,7 @@ public void testAddDayPartition() {

@Test
public void testAddHourPartition() {
sql(
"CREATE TABLE %s (id bigint NOT NULL, category string, ts timestamp, data string) USING iceberg",
tableName);
createTable("id bigint NOT NULL, category string, ts timestamp, data string");
Table table = validationCatalog.loadTable(tableIdent);

Assertions.assertThat(table.spec().isUnpartitioned())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,7 @@ public void testAddHoursPartition() {

@Test
public void testAddYearPartition() {
sql(
"CREATE TABLE %s (id bigint NOT NULL, category string, ts timestamp, data string) USING iceberg",
tableName);
createTable("id bigint NOT NULL, category string, ts timestamp, data string");
Table table = validationCatalog.loadTable(tableIdent);

Assertions.assertThat(table.spec().isUnpartitioned())
Expand All @@ -205,9 +203,7 @@ public void testAddYearPartition() {

@Test
public void testAddMonthPartition() {
sql(
"CREATE TABLE %s (id bigint NOT NULL, category string, ts timestamp, data string) USING iceberg",
tableName);
createTable("id bigint NOT NULL, category string, ts timestamp, data string");
Table table = validationCatalog.loadTable(tableIdent);

Assertions.assertThat(table.spec().isUnpartitioned())
Expand All @@ -228,9 +224,7 @@ public void testAddMonthPartition() {

@Test
public void testAddDayPartition() {
sql(
"CREATE TABLE %s (id bigint NOT NULL, category string, ts timestamp, data string) USING iceberg",
tableName);
createTable("id bigint NOT NULL, category string, ts timestamp, data string");
Table table = validationCatalog.loadTable(tableIdent);

Assertions.assertThat(table.spec().isUnpartitioned())
Expand All @@ -251,9 +245,7 @@ public void testAddDayPartition() {

@Test
public void testAddHourPartition() {
sql(
"CREATE TABLE %s (id bigint NOT NULL, category string, ts timestamp, data string) USING iceberg",
tableName);
createTable("id bigint NOT NULL, category string, ts timestamp, data string");
Table table = validationCatalog.loadTable(tableIdent);

Assertions.assertThat(table.spec().isUnpartitioned())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,7 @@ public void testAddHoursPartition() {

@Test
public void testAddYearPartition() {
sql(
"CREATE TABLE %s (id bigint NOT NULL, category string, ts timestamp, data string) USING iceberg",
tableName);
createTable("id bigint NOT NULL, category string, ts timestamp, data string");
Table table = validationCatalog.loadTable(tableIdent);

Assertions.assertThat(table.spec().isUnpartitioned())
Expand All @@ -205,9 +203,7 @@ public void testAddYearPartition() {

@Test
public void testAddMonthPartition() {
sql(
"CREATE TABLE %s (id bigint NOT NULL, category string, ts timestamp, data string) USING iceberg",
tableName);
createTable("id bigint NOT NULL, category string, ts timestamp, data string");
Table table = validationCatalog.loadTable(tableIdent);

Assertions.assertThat(table.spec().isUnpartitioned())
Expand All @@ -228,9 +224,7 @@ public void testAddMonthPartition() {

@Test
public void testAddDayPartition() {
sql(
"CREATE TABLE %s (id bigint NOT NULL, category string, ts timestamp, data string) USING iceberg",
tableName);
createTable("id bigint NOT NULL, category string, ts timestamp, data string");
Table table = validationCatalog.loadTable(tableIdent);

Assertions.assertThat(table.spec().isUnpartitioned())
Expand All @@ -251,9 +245,7 @@ public void testAddDayPartition() {

@Test
public void testAddHourPartition() {
sql(
"CREATE TABLE %s (id bigint NOT NULL, category string, ts timestamp, data string) USING iceberg",
tableName);
createTable("id bigint NOT NULL, category string, ts timestamp, data string");
Table table = validationCatalog.loadTable(tableIdent);

Assertions.assertThat(table.spec().isUnpartitioned())
Expand Down

0 comments on commit a886a6a

Please sign in to comment.