This is an automated email from the ASF dual-hosted git repository.
tanner pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/calcite.git
The following commit(s) were added to refs/heads/main by this push:
new 213c137766 Revert "[CALCITE-6092] Skip breaking CAST String to TIME
tests until fixed in Avatica 1.24.0"
213c137766 is described below
commit 213c13776651f83f95dceb9645a15e940ec6dce1
Author: Tanner Clary <[email protected]>
AuthorDate: Tue Nov 7 18:41:05 2023 -0800
Revert "[CALCITE-6092] Skip breaking CAST String to TIME tests until fixed
in Avatica 1.24.0"
This reverts commit 3157408a127de0d5c1d6b440bd2086f96f4f91ba.
---
core/src/main/java/org/apache/calcite/util/Bug.java | 6 ------
testkit/src/main/java/org/apache/calcite/test/SqlOperatorTest.java | 7 ++-----
2 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/core/src/main/java/org/apache/calcite/util/Bug.java
b/core/src/main/java/org/apache/calcite/util/Bug.java
index 90dce754cb..8f36d07eee 100644
--- a/core/src/main/java/org/apache/calcite/util/Bug.java
+++ b/core/src/main/java/org/apache/calcite/util/Bug.java
@@ -200,12 +200,6 @@ public abstract class Bug {
* MILLISECOND and MICROSECOND units in INTERVAL literal</a> is fixed. */
public static final boolean CALCITE_5422_FIXED = false;
- /** Whether
- * <a
href="https://issues.apache.org/jira/browse/CALCITE-6092">[CALCITE-6092]
- * Invalid test cases in CAST String to Time</a> is fixed.
- * Fix to be available with Avatica 1.24.0 [CALCITE-6053] */
- public static final boolean CALCITE_6092_FIXED = false;
-
/**
* Use this to flag temporary code.
*/
diff --git a/testkit/src/main/java/org/apache/calcite/test/SqlOperatorTest.java
b/testkit/src/main/java/org/apache/calcite/test/SqlOperatorTest.java
index 9f4a2da563..e755747681 100644
--- a/testkit/src/main/java/org/apache/calcite/test/SqlOperatorTest.java
+++ b/testkit/src/main/java/org/apache/calcite/test/SqlOperatorTest.java
@@ -1234,11 +1234,8 @@ public class SqlOperatorTest {
} else {
f.checkNull("cast('nottime' as TIME)");
}
-
- if (Bug.CALCITE_6092_FIXED) {
- f.checkFails("cast('1241241' as TIME)", "Invalid TIME value, '1241241'",
true);
- f.checkFails("cast('12:54:78' as TIME)", "Invalid TIME value,
'12:54:78'", true);
- }
+ f.checkScalar("cast('1241241' as TIME)", "72:40:12", "TIME(0) NOT NULL");
+ f.checkScalar("cast('12:54:78' as TIME)", "12:55:18", "TIME(0) NOT NULL");
f.checkScalar("cast('12:34:5' as TIME)", "12:34:05", "TIME(0) NOT NULL");
f.checkScalar("cast('12:3:45' as TIME)", "12:03:45", "TIME(0) NOT NULL");
f.checkScalar("cast('1:23:45' as TIME)", "01:23:45", "TIME(0) NOT NULL");