diff --git a/core/src/test/java/tech/tablesaw/SortTest.java b/core/src/test/java/tech/tablesaw/SortTest.java index 33ff23a2a..2c02e2b70 100644 --- a/core/src/test/java/tech/tablesaw/SortTest.java +++ b/core/src/test/java/tech/tablesaw/SortTest.java @@ -21,7 +21,9 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; +import tech.tablesaw.analytic.AnalyticQuery; import tech.tablesaw.api.DoubleColumn; +import tech.tablesaw.api.IntColumn; import tech.tablesaw.api.Table; import tech.tablesaw.sorting.Sort; @@ -149,4 +151,20 @@ public void createSortInvalidPrefixColumnDoesNotExist() { assertEquals("Unrecognized Column: '>col2'", thrown.getMessage()); } + + @Test + public void testGetOrderAndCreate0() throws Exception { + assertThrows(IllegalStateException.class, () -> { + Table table = Table.create("table1", IntColumn.create(" ales")); + AnalyticQuery.query() + .from(table) + .partitionBy("product", "region") + .orderBy("sales") + .rowsBetween() + .unboundedPreceding() + .andUnBoundedFollowing() + .sum("sales").as("sumSales") + .build(); + }); + } }