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 2014/07/10 19:07:43 UTC
git commit: Remove deprecated methods.
Repository: incubator-optiq
Updated Branches:
refs/heads/master 58ddf6bff -> 0db3489f5
Remove deprecated methods.
Project: http://git-wip-us.apache.org/repos/asf/incubator-optiq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-optiq/commit/0db3489f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-optiq/tree/0db3489f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-optiq/diff/0db3489f
Branch: refs/heads/master
Commit: 0db3489f5101efd0caa86c7f728a77cac6330c70
Parents: 58ddf6b
Author: Julian Hyde <jh...@apache.org>
Authored: Wed Jul 9 19:05:09 2014 -0700
Committer: Julian Hyde <jh...@apache.org>
Committed: Wed Jul 9 19:05:09 2014 -0700
----------------------------------------------------------------------
.../eigenbase/reltype/RelDataTypeFactory.java | 15 ------------
.../reltype/RelDataTypeFactoryImpl.java | 7 ------
.../main/java/org/eigenbase/sql/SqlLiteral.java | 25 --------------------
core/src/main/java/org/eigenbase/util/Bug.java | 11 +++++++--
.../org/eigenbase/test/SqlValidatorTest.java | 2 +-
.../optiq/impl/mongodb/MongoRules.java | 2 +-
.../hydromatic/optiq/test/MongoAdapterTest.java | 2 +-
7 files changed, 12 insertions(+), 52 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-optiq/blob/0db3489f/core/src/main/java/org/eigenbase/reltype/RelDataTypeFactory.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/eigenbase/reltype/RelDataTypeFactory.java b/core/src/main/java/org/eigenbase/reltype/RelDataTypeFactory.java
index d113bae..c68940e 100644
--- a/core/src/main/java/org/eigenbase/reltype/RelDataTypeFactory.java
+++ b/core/src/main/java/org/eigenbase/reltype/RelDataTypeFactory.java
@@ -57,21 +57,6 @@ public interface RelDataTypeFactory {
RelDataType createJoinType(RelDataType... types);
/**
- * Creates a type which represents a structured collection of fields.
- *
- * @param types types of the fields
- * @param fieldNames names of the fields
- * @return canonical struct type descriptor
- *
- * @deprecated Use {@link #createStructType(List, List)} or
- * {@link #builder()}; will be removed after 0.6.
- * @see org.eigenbase.util.Bug#upgrade(String) remove after 0.6
- */
- RelDataType createStructType(
- RelDataType[] types,
- String[] fieldNames);
-
- /**
* Creates a type which represents a structured collection of fields, given
* lists of the names and types of the fields.
*
http://git-wip-us.apache.org/repos/asf/incubator-optiq/blob/0db3489f/core/src/main/java/org/eigenbase/reltype/RelDataTypeFactoryImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/eigenbase/reltype/RelDataTypeFactoryImpl.java b/core/src/main/java/org/eigenbase/reltype/RelDataTypeFactoryImpl.java
index f4d186f..9541264 100644
--- a/core/src/main/java/org/eigenbase/reltype/RelDataTypeFactoryImpl.java
+++ b/core/src/main/java/org/eigenbase/reltype/RelDataTypeFactoryImpl.java
@@ -120,13 +120,6 @@ public abstract class RelDataTypeFactoryImpl implements RelDataTypeFactory {
// implement RelDataTypeFactory
public RelDataType createStructType(
- final RelDataType[] types,
- final String[] fieldNames) {
- return canonize(Arrays.asList(fieldNames), Arrays.asList(types));
- }
-
- // implement RelDataTypeFactory
- public RelDataType createStructType(
final List<RelDataType> typeList,
final List<String> fieldNameList) {
assert typeList.size() == fieldNameList.size();
http://git-wip-us.apache.org/repos/asf/incubator-optiq/blob/0db3489f/core/src/main/java/org/eigenbase/sql/SqlLiteral.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/eigenbase/sql/SqlLiteral.java b/core/src/main/java/org/eigenbase/sql/SqlLiteral.java
index 271835a..5bcd6e5 100644
--- a/core/src/main/java/org/eigenbase/sql/SqlLiteral.java
+++ b/core/src/main/java/org/eigenbase/sql/SqlLiteral.java
@@ -241,31 +241,6 @@ public class SqlLiteral extends SqlNode {
}
/**
- * Converts extracts the value from a boolean literal.
- *
- * @throws ClassCastException if the value is not a boolean literal
- *
- * @deprecated Use {@link #booleanValue()}
- */
- public static boolean booleanValue(SqlNode node) {
- Bug.upgrade("remove after 0.6");
- return (Boolean) ((SqlLiteral) node).value;
- }
-
- /**
- * Extracts the enumerated value from a symbol literal.
- *
- * @throws ClassCastException if the value is not a symbol literal
- * @see #createSymbol(SqlSymbol, SqlParserPos)
- *
- * @deprecated Use {@link #symbolValue()}
- */
- public static SqlSymbol symbolValue(SqlNode node) {
- Bug.upgrade("remove after 0.6");
- return (SqlSymbol) ((SqlLiteral) node).value;
- }
-
- /**
* Extracts the {@link SqlSampleSpec} value from a symbol literal.
*
* @throws ClassCastException if the value is not a symbol literal
http://git-wip-us.apache.org/repos/asf/incubator-optiq/blob/0db3489f/core/src/main/java/org/eigenbase/util/Bug.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/eigenbase/util/Bug.java b/core/src/main/java/org/eigenbase/util/Bug.java
index 1e1bdda..9bda405 100644
--- a/core/src/main/java/org/eigenbase/util/Bug.java
+++ b/core/src/main/java/org/eigenbase/util/Bug.java
@@ -156,10 +156,17 @@ public abstract class Bug {
/**
* Whether
- * <a href="https://github.com/julianhyde/optiq/issues/194">OPTIQ-194</a>,
+ * <a href="https://issues.apache.org/jira/browse/OPTIQ-194">OPTIQ-194</a>,
* "Array items in MongoDB adapter" is fixed.
*/
- public static final boolean OPTIQ194_FIXED = false;
+ public static final boolean OPTIQ_194_FIXED = false;
+
+ /**
+ * Whether
+ * <a href="https://issues.apache.org/jira/browse/OPTIQ-319">OPTIQ-319</a>,
+ * "Array items in MongoDB adapter" is fixed.
+ */
+ public static final boolean OPTIQ_319_FIXED = false;
/**
* Use this to flag temporary code.
http://git-wip-us.apache.org/repos/asf/incubator-optiq/blob/0db3489f/core/src/test/java/org/eigenbase/test/SqlValidatorTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/eigenbase/test/SqlValidatorTest.java b/core/src/test/java/org/eigenbase/test/SqlValidatorTest.java
index 99cacef..f3e2819 100644
--- a/core/src/test/java/org/eigenbase/test/SqlValidatorTest.java
+++ b/core/src/test/java/org/eigenbase/test/SqlValidatorTest.java
@@ -6547,7 +6547,7 @@ public class SqlValidatorTest extends SqlValidatorTestCase {
// mysql> select `D`.day from DAYS as `d`, DAYS as `D`;
// ERROR 1066 (42000): Not unique table/alias: 'D'
tester2.checkQuery("select count(*) from dept as [D], dept as [d]");
- if (!Bug.upgrade("fix case sensitivity bug")) {
+ if (!Bug.OPTIQ_319_FIXED) {
return;
}
tester1.checkQueryFails("select count(*) from dept as [D], dept as [d]",
http://git-wip-us.apache.org/repos/asf/incubator-optiq/blob/0db3489f/mongodb/src/main/java/net/hydromatic/optiq/impl/mongodb/MongoRules.java
----------------------------------------------------------------------
diff --git a/mongodb/src/main/java/net/hydromatic/optiq/impl/mongodb/MongoRules.java b/mongodb/src/main/java/net/hydromatic/optiq/impl/mongodb/MongoRules.java
index 671f1a6..a3576f4 100644
--- a/mongodb/src/main/java/net/hydromatic/optiq/impl/mongodb/MongoRules.java
+++ b/mongodb/src/main/java/net/hydromatic/optiq/impl/mongodb/MongoRules.java
@@ -146,7 +146,7 @@ public class MongoRules {
final RexNode op1 = call.operands.get(1);
if (op1 instanceof RexLiteral
&& op1.getType().getSqlTypeName() == SqlTypeName.INTEGER) {
- if (!Bug.OPTIQ194_FIXED) {
+ if (!Bug.OPTIQ_194_FIXED) {
return "'" + stripQuotes(strings.get(0)) + "["
+ ((RexLiteral) op1).getValue2() + "]'";
}
http://git-wip-us.apache.org/repos/asf/incubator-optiq/blob/0db3489f/mongodb/src/test/java/net/hydromatic/optiq/test/MongoAdapterTest.java
----------------------------------------------------------------------
diff --git a/mongodb/src/test/java/net/hydromatic/optiq/test/MongoAdapterTest.java b/mongodb/src/test/java/net/hydromatic/optiq/test/MongoAdapterTest.java
index 4c97474..9d53112 100644
--- a/mongodb/src/test/java/net/hydromatic/optiq/test/MongoAdapterTest.java
+++ b/mongodb/src/test/java/net/hydromatic/optiq/test/MongoAdapterTest.java
@@ -220,7 +220,7 @@ public class MongoAdapterTest {
@Test public void testFilterSort() {
// LONGITUDE and LATITUDE are null because of OPTIQ-194.
- Util.discard(Bug.OPTIQ194_FIXED);
+ Util.discard(Bug.OPTIQ_194_FIXED);
OptiqAssert.that()
.enable(enabled())
.with(ZIPS)