You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by jh...@apache.org on 2023/01/25 07:32:44 UTC
[calcite] 03/05: remove premature tests
This is an automated email from the ASF dual-hosted git repository.
jhyde pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/calcite.git
commit ba35438c9d755aaa06dc353b8d9f5164608b36cd
Author: Julian Hyde <jh...@apache.org>
AuthorDate: Tue Jan 24 23:17:22 2023 -0800
remove premature tests
---
.../java/org/apache/calcite/test/IntervalTest.java | 123 ---------------------
1 file changed, 123 deletions(-)
diff --git a/testkit/src/main/java/org/apache/calcite/test/IntervalTest.java b/testkit/src/main/java/org/apache/calcite/test/IntervalTest.java
index 56e8d6976c..1f6d5ed30d 100644
--- a/testkit/src/main/java/org/apache/calcite/test/IntervalTest.java
+++ b/testkit/src/main/java/org/apache/calcite/test/IntervalTest.java
@@ -44,9 +44,6 @@ public class IntervalTest {
subTestIntervalMinutePositive();
subTestIntervalMinuteToSecondPositive();
subTestIntervalSecondPositive();
- subTestIntervalWeekPositive();
- subTestIntervalQuarterPositive();
- subTestIntervalPlural();
// Tests that should pass parser but fail validator
subTestIntervalYearNegative();
@@ -963,126 +960,6 @@ public class IntervalTest {
+ "INTERVAL YEAR\\(0\\) TO MONTH");
}
-
- /**
- * Runs tests for INTERVAL... WEEK that should pass both parser and
- * validator. A substantially identical set of tests exists in
- * SqlValidatorTest, and any changes here should be synchronized there.
- * Similarly, any changes to tests here should be echoed appropriately to
- * each of the other 12 subTestIntervalXXXPositive() tests.
- */
- public void subTestIntervalWeekPositive() {
- // default precision
- f.expr("interval '1' week")
- .columnType("INTERVAL '1' WEEK");
- f.expr("interval '99' week")
- .columnType("INTERVAL '99' WEEK");
-
- // explicit precision equal to default
- f.expr("interval '1' week(2)")
- .columnType("INTERVAL '1' WEEK(2)");
- f.expr("interval '99' week(2)")
- .columnType("INTERVAL '99' WEEK(2)");
-
- // max precision
- f.expr("interval '2147483647' week(10)")
- .columnType("INTERVAL '2147483647' WEEK(10)");
-
- // min precision
- f.expr("interval '0' week(1)")
- .columnType("INTERVAL '0' WEEK(1)");
-
- // alternate precision
- f.expr("interval '1234' week(4)")
- .columnType("INTERVAL '1234' WEEK(4)");
-
- // sign
- f.expr("interval '+1' week")
- .columnType("INTERVAL '+1' WEEK");
- f.expr("interval '-1' week")
- .columnType("INTERVAL '-1' WEEK");
- f.expr("interval +'1' week")
- .columnType("INTERVAL '1' WEEK");
- f.expr("interval +'+1' week")
- .columnType("INTERVAL '+1' WEEK");
- f.expr("interval +'-1' week")
- .columnType("INTERVAL '-1' WEEK");
- f.expr("interval -'1' week")
- .columnType("INTERVAL -'1' WEEK");
- f.expr("interval -'+1' week")
- .columnType("INTERVAL -'+1' WEEK");
- f.expr("interval -'-1' week")
- .columnType("INTERVAL -'-1' WEEK");
- }
-
- /**
- * Runs tests for INTERVAL... QUARTER that should pass both parser and
- * validator. A substantially identical set of tests exists in
- * SqlValidatorTest, and any changes here should be synchronized there.
- * Similarly, any changes to tests here should be echoed appropriately to
- * each of the other 12 subTestIntervalXXXPositive() tests.
- */
- public void subTestIntervalQuarterPositive() {
- // default precision
- f.expr("interval '1' quarter")
- .columnType("INTERVAL '1' QUARTER");
- f.expr("interval '99' quarter")
- .columnType("INTERVAL '99' QUARTER");
-
- // explicit precision equal to default
- f.expr("interval '1' quarter(2)")
- .columnType("INTERVAL '1' QUARTER(2)");
- f.expr("interval '99' quarter(2)")
- .columnType("INTERVAL '99' QUARTER(2)");
-
- // max precision
- f.expr("interval '2147483647' quarter(10)")
- .columnType("INTERVAL '2147483647' QUARTER(10)");
-
- // min precision
- f.expr("interval '0' quarter(1)")
- .columnType("INTERVAL '0' QUARTER(1)");
-
- // alternate precision
- f.expr("interval '1234' quarter(4)")
- .columnType("INTERVAL '1234' QUARTER(4)");
-
- // sign
- f.expr("interval '+1' quarter")
- .columnType("INTERVAL '+1' QUARTER");
- f.expr("interval '-1' quarter")
- .columnType("INTERVAL '-1' QUARTER");
- f.expr("interval +'1' quarter")
- .columnType("INTERVAL '1' QUARTER");
- f.expr("interval +'+1' quarter")
- .columnType("INTERVAL '+1' QUARTER");
- f.expr("interval +'-1' quarter")
- .columnType("INTERVAL '-1' QUARTER");
- f.expr("interval -'1' quarter")
- .columnType("INTERVAL -'1' QUARTER");
- f.expr("interval -'+1' quarter")
- .columnType("INTERVAL -'+1' QUARTER");
- f.expr("interval -'-1' quarter")
- .columnType("INTERVAL -'-1' QUARTER");
- }
-
- public void subTestIntervalPlural() {
- f.expr("interval '+2' seconds")
- .columnType("INTERVAL '+2' SECOND");
- f.expr("interval '+2' hours")
- .columnType("INTERVAL '+2' HOUR");
- f.expr("interval '+2' days")
- .columnType("INTERVAL '+2' DAY");
- f.expr("interval '+2' weeks")
- .columnType("INTERVAL '+2' WEEK");
- f.expr("interval '+2' quarters")
- .columnType("INTERVAL '+2' QUARTER");
- f.expr("interval '+2' months")
- .columnType("INTERVAL '+2' MONTH");
- f.expr("interval '+2' years")
- .columnType("INTERVAL '+2' YEAR");
- }
-
/**
* Runs tests for INTERVAL... MONTH that should pass parser but fail
* validator. A substantially identical set of tests exists in