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/11/14 22:32:34 UTC
[26/58] [abbrv] [partial] incubator-calcite git commit: [CALCITE-306]
Standardize code style for "import package.*; "
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/SqlUpdate.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/SqlUpdate.java b/core/src/main/java/org/apache/calcite/sql/SqlUpdate.java
index 173571e..6773aa8 100644
--- a/core/src/main/java/org/apache/calcite/sql/SqlUpdate.java
+++ b/core/src/main/java/org/apache/calcite/sql/SqlUpdate.java
@@ -14,14 +14,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql;
+package org.apache.calcite.sql;
-import java.util.List;
+import org.apache.calcite.sql.parser.SqlParserPos;
+import org.apache.calcite.sql.validate.SqlValidator;
+import org.apache.calcite.sql.validate.SqlValidatorImpl;
+import org.apache.calcite.sql.validate.SqlValidatorScope;
+import org.apache.calcite.util.ImmutableNullableList;
+import org.apache.calcite.util.Pair;
-import org.eigenbase.sql.parser.*;
-import org.eigenbase.sql.validate.*;
-import org.eigenbase.util.ImmutableNullableList;
-import org.eigenbase.util.Pair;
+import java.util.List;
/**
* A <code>SqlUpdate</code> is a node of a parse tree which represents an UPDATE
@@ -72,8 +74,7 @@ public class SqlUpdate extends SqlCall {
sourceExpressionList, condition, sourceSelect, alias);
}
- @Override
- public void setOperand(int i, SqlNode operand) {
+ @Override public void setOperand(int i, SqlNode operand) {
switch (i) {
case 0:
targetTable = (SqlIdentifier) operand;
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/SqlUtil.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/SqlUtil.java b/core/src/main/java/org/apache/calcite/sql/SqlUtil.java
index dadc3a3..e2430e7 100644
--- a/core/src/main/java/org/apache/calcite/sql/SqlUtil.java
+++ b/core/src/main/java/org/apache/calcite/sql/SqlUtil.java
@@ -14,24 +14,36 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql;
-
-import java.nio.charset.*;
-import java.sql.*;
-import java.text.*;
-import java.util.*;
-
-import org.eigenbase.reltype.*;
-import org.eigenbase.resource.Resources;
-import org.eigenbase.sql.fun.*;
-import org.eigenbase.sql.parser.*;
-import org.eigenbase.sql.type.*;
-import org.eigenbase.util.*;
-import org.eigenbase.util14.*;
+package org.apache.calcite.sql;
+
+import org.apache.calcite.rel.type.RelDataType;
+import org.apache.calcite.rel.type.RelDataTypeFactory;
+import org.apache.calcite.rel.type.RelDataTypePrecedenceList;
+import org.apache.calcite.runtime.CalciteContextException;
+import org.apache.calcite.runtime.CalciteException;
+import org.apache.calcite.runtime.Resources;
+import org.apache.calcite.sql.fun.SqlStdOperatorTable;
+import org.apache.calcite.sql.parser.SqlParserPos;
+import org.apache.calcite.sql.type.SqlTypeFamily;
+import org.apache.calcite.sql.type.SqlTypeName;
+import org.apache.calcite.sql.type.SqlTypeUtil;
+import org.apache.calcite.util.BarfingInvocationHandler;
+import org.apache.calcite.util.ConversionUtil;
+import org.apache.calcite.util.NlsString;
+import org.apache.calcite.util.Pair;
+import org.apache.calcite.util.Util;
import com.google.common.collect.Lists;
-import static org.eigenbase.util.Static.RESOURCE;
+import java.nio.charset.Charset;
+import java.sql.DatabaseMetaData;
+import java.sql.SQLException;
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import static org.apache.calcite.util.Static.RESOURCE;
/**
* Contains utility functions related to SQL parsing, all static.
@@ -637,11 +649,11 @@ public abstract class SqlUtil {
/**
* Wraps an exception with context.
*/
- public static EigenbaseException newContextException(
+ public static CalciteException newContextException(
final SqlParserPos pos,
Resources.ExInst<?> e,
String inputText) {
- EigenbaseContextException ex = newContextException(pos, e);
+ CalciteContextException ex = newContextException(pos, e);
ex.setOriginalStatement(inputText);
return ex;
}
@@ -649,7 +661,7 @@ public abstract class SqlUtil {
/**
* Wraps an exception with context.
*/
- public static EigenbaseContextException newContextException(
+ public static CalciteContextException newContextException(
final SqlParserPos pos,
Resources.ExInst<?> e) {
int line = pos.getLineNum();
@@ -662,13 +674,13 @@ public abstract class SqlUtil {
/**
* Wraps an exception with context.
*/
- public static EigenbaseContextException newContextException(
+ public static CalciteContextException newContextException(
int line,
int col,
int endLine,
int endCol,
Resources.ExInst<?> e) {
- EigenbaseContextException contextExcn =
+ CalciteContextException contextExcn =
(line == endLine && col == endCol
? RESOURCE.validatorContextPoint(line, col)
: RESOURCE.validatorContext(line, col, endLine, endCol)).ex(e.ex());
@@ -686,10 +698,11 @@ public abstract class SqlUtil {
}
/**
- * Creates the type of an {@link NlsString}.
+ * Creates the type of an {@link org.apache.calcite.util.NlsString}.
*
- * <p>The type inherits the The NlsString's {@link Charset} and {@link
- * SqlCollation}, if they are set, otherwise it gets the system defaults.
+ * <p>The type inherits the The NlsString's {@link Charset} and
+ * {@link SqlCollation}, if they are set, otherwise it gets the system
+ * defaults.
*
* @param typeFactory Type factory
* @param str String
@@ -755,8 +768,9 @@ public abstract class SqlUtil {
/**
* Handles particular {@link DatabaseMetaData} methods; invocations of other
- * methods will fall through to the base class, {@link
- * BarfingInvocationHandler}, which will throw an error.
+ * methods will fall through to the base class,
+ * {@link org.apache.calcite.util.BarfingInvocationHandler}, which will throw
+ * an error.
*/
public static class DatabaseMetaDataInvocationHandler
extends BarfingInvocationHandler {
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/SqlValuesOperator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/SqlValuesOperator.java b/core/src/main/java/org/apache/calcite/sql/SqlValuesOperator.java
index 3ad8195..ef6ae60 100644
--- a/core/src/main/java/org/apache/calcite/sql/SqlValuesOperator.java
+++ b/core/src/main/java/org/apache/calcite/sql/SqlValuesOperator.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql;
+package org.apache.calcite.sql;
/**
* The <code>VALUES</code> operator.
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/SqlWindow.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/SqlWindow.java b/core/src/main/java/org/apache/calcite/sql/SqlWindow.java
index 42eab28..be9d9fc 100644
--- a/core/src/main/java/org/apache/calcite/sql/SqlWindow.java
+++ b/core/src/main/java/org/apache/calcite/sql/SqlWindow.java
@@ -14,25 +14,29 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql;
-
-import java.util.*;
-
-import org.eigenbase.reltype.RelDataType;
-import org.eigenbase.rex.RexWindowBound;
-import org.eigenbase.sql.parser.*;
-import org.eigenbase.sql.type.ReturnTypes;
-import org.eigenbase.sql.type.SqlTypeFamily;
-import org.eigenbase.sql.util.SqlBasicVisitor;
-import org.eigenbase.sql.util.SqlVisitor;
-import org.eigenbase.sql.validate.*;
-import org.eigenbase.util.*;
-
-import net.hydromatic.linq4j.Ord;
+package org.apache.calcite.sql;
+
+import org.apache.calcite.linq4j.Ord;
+import org.apache.calcite.rel.type.RelDataType;
+import org.apache.calcite.rex.RexWindowBound;
+import org.apache.calcite.sql.parser.SqlParserPos;
+import org.apache.calcite.sql.type.ReturnTypes;
+import org.apache.calcite.sql.type.SqlTypeFamily;
+import org.apache.calcite.sql.util.SqlBasicVisitor;
+import org.apache.calcite.sql.util.SqlVisitor;
+import org.apache.calcite.sql.validate.SqlMoniker;
+import org.apache.calcite.sql.validate.SqlMonotonicity;
+import org.apache.calcite.sql.validate.SqlValidator;
+import org.apache.calcite.sql.validate.SqlValidatorScope;
+import org.apache.calcite.util.ImmutableNullableList;
+import org.apache.calcite.util.Util;
import com.google.common.collect.ImmutableList;
-import static org.eigenbase.util.Static.RESOURCE;
+import java.util.ArrayList;
+import java.util.List;
+
+import static org.apache.calcite.util.Static.RESOURCE;
/**
* SQL window specification.
@@ -218,10 +222,12 @@ public class SqlWindow extends SqlCall {
* Returns if the window is guaranteed to have rows.
* This is useful to refine data type of window aggregates.
* For instance sum(non-nullable) over (empty window) is NULL.
+ *
* @return true when the window is non-empty
- * @see org.eigenbase.rel.WindowRelBase.Window#isAlwaysNonEmpty()
+ *
+ * @see org.apache.calcite.rel.core.Window.Group#isAlwaysNonEmpty()
* @see SqlOperatorBinding#getGroupCount()
- * @see org.eigenbase.sql.validate.SqlValidatorImpl#resolveWindow(SqlNode, org.eigenbase.sql.validate.SqlValidatorScope, boolean)
+ * @see org.apache.calcite.sql.validate.SqlValidatorImpl#resolveWindow(SqlNode, org.apache.calcite.sql.validate.SqlValidatorScope, boolean)
*/
public boolean isAlwaysNonEmpty() {
final SqlWindow tmp;
@@ -517,8 +523,8 @@ public class SqlWindow extends SqlCall {
|| allowPartial.booleanValue();
}
- @Override
- public void validate(SqlValidator validator, SqlValidatorScope scope) {
+ @Override public void validate(SqlValidator validator,
+ SqlValidatorScope scope) {
SqlValidatorScope operandScope = scope; // REVIEW
SqlIdentifier declName = this.declName;
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/SqlWith.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/SqlWith.java b/core/src/main/java/org/apache/calcite/sql/SqlWith.java
index fd4b640..4e772ac 100644
--- a/core/src/main/java/org/apache/calcite/sql/SqlWith.java
+++ b/core/src/main/java/org/apache/calcite/sql/SqlWith.java
@@ -14,16 +14,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql;
+package org.apache.calcite.sql;
-import java.util.List;
-
-import org.eigenbase.sql.parser.SqlParserPos;
-import org.eigenbase.sql.validate.SqlValidator;
-import org.eigenbase.sql.validate.SqlValidatorScope;
+import org.apache.calcite.sql.parser.SqlParserPos;
+import org.apache.calcite.sql.validate.SqlValidator;
+import org.apache.calcite.sql.validate.SqlValidatorScope;
import com.google.common.collect.ImmutableList;
+import java.util.List;
+
/**
* The WITH clause of a query. It wraps a SELECT, UNION, or INTERSECT.
*/
@@ -45,8 +45,7 @@ public class SqlWith extends SqlCall {
return SqlKind.WITH;
}
- @Override
- public SqlOperator getOperator() {
+ @Override public SqlOperator getOperator() {
return SqlWithOperator.INSTANCE;
}
@@ -54,8 +53,8 @@ public class SqlWith extends SqlCall {
return ImmutableList.of(withList, body);
}
- @Override
- public void validate(SqlValidator validator, SqlValidatorScope scope) {
+ @Override public void validate(SqlValidator validator,
+ SqlValidatorScope scope) {
validator.validateWith(this, scope);
}
@@ -92,9 +91,8 @@ public class SqlWith extends SqlCall {
}
- @Override
- public SqlCall createCall(SqlLiteral functionQualifier, SqlParserPos pos,
- SqlNode... operands) {
+ @Override public SqlCall createCall(SqlLiteral functionQualifier,
+ SqlParserPos pos, SqlNode... operands) {
return new SqlWith(pos, (SqlNodeList) operands[0], operands[1]);
}
@@ -107,4 +105,4 @@ public class SqlWith extends SqlCall {
}
}
-// End SqlWithOperator.java
+// End SqlWith.java
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/SqlWithItem.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/SqlWithItem.java b/core/src/main/java/org/apache/calcite/sql/SqlWithItem.java
index 35e74d0..7fe5c62 100644
--- a/core/src/main/java/org/apache/calcite/sql/SqlWithItem.java
+++ b/core/src/main/java/org/apache/calcite/sql/SqlWithItem.java
@@ -14,12 +14,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql;
+package org.apache.calcite.sql;
-import java.util.List;
+import org.apache.calcite.sql.parser.SqlParserPos;
+import org.apache.calcite.util.ImmutableNullableList;
-import org.eigenbase.sql.parser.SqlParserPos;
-import org.eigenbase.util.ImmutableNullableList;
+import java.util.List;
/**
* An item in a WITH clause of a query.
@@ -48,8 +48,7 @@ public class SqlWithItem extends SqlCall {
return ImmutableNullableList.of(name, columnList, query);
}
- @Override
- public void setOperand(int i, SqlNode operand) {
+ @Override public void setOperand(int i, SqlNode operand) {
switch (i) {
case 0:
name = (SqlIdentifier) operand;
@@ -97,9 +96,8 @@ public class SqlWithItem extends SqlCall {
withItem.query.unparse(writer, getLeftPrec(), getRightPrec());
}
- @Override
- public SqlCall createCall(SqlLiteral functionQualifier, SqlParserPos pos,
- SqlNode... operands) {
+ @Override public SqlCall createCall(SqlLiteral functionQualifier,
+ SqlParserPos pos, SqlNode... operands) {
assert functionQualifier == null;
assert operands.length == 3;
return new SqlWithItem(pos, (SqlIdentifier) operands[0],
@@ -108,4 +106,4 @@ public class SqlWithItem extends SqlCall {
}
}
-// End SqlWithItemOperator.java
+// End SqlWithItem.java
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/SqlWriter.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/SqlWriter.java b/core/src/main/java/org/apache/calcite/sql/SqlWriter.java
index a5f01ef..ac03856 100644
--- a/core/src/main/java/org/apache/calcite/sql/SqlWriter.java
+++ b/core/src/main/java/org/apache/calcite/sql/SqlWriter.java
@@ -14,9 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql;
+package org.apache.calcite.sql;
-import org.eigenbase.sql.util.SqlString;
+import org.apache.calcite.sql.util.SqlString;
/**
* A <code>SqlWriter</code> is the target to construct a SQL statement from a
@@ -451,14 +451,15 @@ public interface SqlWriter {
* are empty strings, but it consists of a sequence of clauses. "SELECT",
* "FROM", "WHERE" are separators.
*
- * <p>A frame is current between a call to one of the {@link
- * SqlWriter#startList} methods and the call to {@link
- * SqlWriter#endList(Frame)}. If other code starts a frame in the mean time,
- * the sub-frame is put onto a stack.
+ * <p>A frame is current between a call to one of the
+ * {@link SqlWriter#startList} methods and the call to
+ * {@link SqlWriter#endList(Frame)}. If other code starts a frame in the mean
+ * time, the sub-frame is put onto a stack.
*/
public interface Frame {
}
+ /** Frame type. */
interface FrameType {
/**
* Returns the name of this frame type.
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/advise/SqlAdvisor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/advise/SqlAdvisor.java b/core/src/main/java/org/apache/calcite/sql/advise/SqlAdvisor.java
index 7643b00..818d200 100644
--- a/core/src/main/java/org/apache/calcite/sql/advise/SqlAdvisor.java
+++ b/core/src/main/java/org/apache/calcite/sql/advise/SqlAdvisor.java
@@ -14,16 +14,29 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql.advise;
-
-import java.util.*;
-import java.util.logging.*;
-
-import org.eigenbase.sql.*;
-import org.eigenbase.sql.parser.*;
-import org.eigenbase.sql.validate.*;
-import org.eigenbase.trace.*;
-import org.eigenbase.util.*;
+package org.apache.calcite.sql.advise;
+
+import org.apache.calcite.runtime.CalciteContextException;
+import org.apache.calcite.runtime.CalciteException;
+import org.apache.calcite.sql.SqlIdentifier;
+import org.apache.calcite.sql.SqlNode;
+import org.apache.calcite.sql.parser.SqlAbstractParserImpl;
+import org.apache.calcite.sql.parser.SqlParseException;
+import org.apache.calcite.sql.parser.SqlParser;
+import org.apache.calcite.sql.parser.SqlParserPos;
+import org.apache.calcite.sql.validate.SqlMoniker;
+import org.apache.calcite.sql.validate.SqlMonikerImpl;
+import org.apache.calcite.sql.validate.SqlMonikerType;
+import org.apache.calcite.sql.validate.SqlValidatorWithHints;
+import org.apache.calcite.util.Util;
+import org.apache.calcite.util.trace.CalciteTrace;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.logging.Logger;
/**
* An assistant which offers hints and corrections to a partially-formed SQL
@@ -32,7 +45,7 @@ import org.eigenbase.util.*;
public class SqlAdvisor {
//~ Static fields/initializers ---------------------------------------------
- public static final Logger LOGGER = EigenbaseTrace.PARSER_LOGGER;
+ public static final Logger LOGGER = CalciteTrace.PARSER_LOGGER;
//~ Instance fields --------------------------------------------------------
@@ -235,7 +248,7 @@ public class SqlAdvisor {
}
}
return null;
- } catch (EigenbaseException e) {
+ } catch (CalciteException e) {
Util.swallow(e, null);
return null;
}
@@ -265,7 +278,7 @@ public class SqlAdvisor {
SqlParserPos pos = new SqlParserPos(1, cursor + 1);
try {
return validator.lookupQualifiedName(sqlNode, pos);
- } catch (EigenbaseContextException e) {
+ } catch (CalciteContextException e) {
return null;
} catch (java.lang.AssertionError e) {
return null;
@@ -315,7 +328,7 @@ public class SqlAdvisor {
}
try {
validator.validate(sqlNode);
- } catch (EigenbaseContextException e) {
+ } catch (CalciteContextException e) {
ValidateErrorInfo errInfo = new ValidateErrorInfo(e);
// validator only returns 1 exception now
@@ -458,12 +471,12 @@ public class SqlAdvisor {
}
/**
- * Creates a new ValidateErrorInfo with an EigenbaseContextException.
+ * Creates a new ValidateErrorInfo with an CalciteContextException.
*
* @param e Exception
*/
public ValidateErrorInfo(
- EigenbaseContextException e) {
+ CalciteContextException e) {
this.startLineNum = e.getPosLine();
this.startColumnNum = e.getPosColumn();
this.endLineNum = e.getEndPosLine();
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/advise/SqlAdvisorGetHintsFunction.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/advise/SqlAdvisorGetHintsFunction.java b/core/src/main/java/org/apache/calcite/sql/advise/SqlAdvisorGetHintsFunction.java
index b560b62..8e27d5d 100644
--- a/core/src/main/java/org/apache/calcite/sql/advise/SqlAdvisorGetHintsFunction.java
+++ b/core/src/main/java/org/apache/calcite/sql/advise/SqlAdvisorGetHintsFunction.java
@@ -14,7 +14,30 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql.advise;
+package org.apache.calcite.sql.advise;
+
+import org.apache.calcite.DataContext;
+import org.apache.calcite.adapter.enumerable.CallImplementor;
+import org.apache.calcite.adapter.enumerable.NotNullImplementor;
+import org.apache.calcite.adapter.enumerable.NullPolicy;
+import org.apache.calcite.adapter.enumerable.RexImpTable;
+import org.apache.calcite.adapter.enumerable.RexToLixTranslator;
+import org.apache.calcite.linq4j.Enumerable;
+import org.apache.calcite.linq4j.Linq4j;
+import org.apache.calcite.linq4j.tree.Expression;
+import org.apache.calcite.linq4j.tree.Expressions;
+import org.apache.calcite.linq4j.tree.Types;
+import org.apache.calcite.rel.type.RelDataType;
+import org.apache.calcite.rel.type.RelDataTypeFactory;
+import org.apache.calcite.rex.RexCall;
+import org.apache.calcite.schema.FunctionParameter;
+import org.apache.calcite.schema.ImplementableFunction;
+import org.apache.calcite.schema.TableFunction;
+import org.apache.calcite.schema.impl.ReflectiveFunctionBase;
+import org.apache.calcite.sql.validate.SqlMoniker;
+import org.apache.calcite.util.BuiltInMethod;
+
+import com.google.common.collect.Iterables;
import java.lang.reflect.Method;
import java.lang.reflect.Type;
@@ -22,22 +45,6 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
-import org.eigenbase.reltype.RelDataType;
-import org.eigenbase.reltype.RelDataTypeFactory;
-import org.eigenbase.rex.RexCall;
-import org.eigenbase.sql.validate.SqlMoniker;
-
-import net.hydromatic.linq4j.*;
-import net.hydromatic.linq4j.expressions.Expression;
-import net.hydromatic.linq4j.expressions.Expressions;
-import net.hydromatic.linq4j.expressions.Types;
-
-import net.hydromatic.optiq.*;
-import net.hydromatic.optiq.impl.ReflectiveFunctionBase;
-import net.hydromatic.optiq.rules.java.*;
-
-import com.google.common.collect.Iterables;
-
/**
* Table function that returns completion hints for a given SQL statement.
*/
@@ -46,7 +53,7 @@ public class SqlAdvisorGetHintsFunction
private static final Expression ADVISOR =
Expressions.convert_(
Expressions.call(DataContext.ROOT,
- BuiltinMethod.DATA_CONTEXT_GET.method,
+ BuiltInMethod.DATA_CONTEXT_GET.method,
Expressions.constant(DataContext.Variable.SQL_ADVISOR.camelName)),
SqlAdvisor.class);
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/advise/SqlAdvisorHint.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/advise/SqlAdvisorHint.java b/core/src/main/java/org/apache/calcite/sql/advise/SqlAdvisorHint.java
index 00d40d0..95bb404 100644
--- a/core/src/main/java/org/apache/calcite/sql/advise/SqlAdvisorHint.java
+++ b/core/src/main/java/org/apache/calcite/sql/advise/SqlAdvisorHint.java
@@ -14,22 +14,22 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql.advise;
+package org.apache.calcite.sql.advise;
-import java.util.List;
+import org.apache.calcite.sql.validate.SqlMoniker;
-import org.eigenbase.sql.validate.SqlMoniker;
+import java.util.List;
/**
- * This class is used to return values for {@link SqlAdvisor#getCompletionHints
- * (String, int, String[])}.
+ * This class is used to return values for
+ * {@link SqlAdvisor#getCompletionHints (String, int, String[])}.
*/
public class SqlAdvisorHint {
/** Fully qualified object name as string. */
public final String id;
/** Fully qualified object name as array of names. */
public final String[] names;
- /** One of {@link org.eigenbase.sql.validate.SqlMonikerType}. */
+ /** One of {@link org.apache.calcite.sql.validate.SqlMonikerType}. */
public final String type;
public SqlAdvisorHint(String id, String[] names, String type) {
@@ -47,3 +47,5 @@ public class SqlAdvisorHint {
type = id.getType().name();
}
}
+
+// End SqlAdvisorHint.java
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/advise/SqlAdvisorValidator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/advise/SqlAdvisorValidator.java b/core/src/main/java/org/apache/calcite/sql/advise/SqlAdvisorValidator.java
index 78de9b7..b8ddaf4 100644
--- a/core/src/main/java/org/apache/calcite/sql/advise/SqlAdvisorValidator.java
+++ b/core/src/main/java/org/apache/calcite/sql/advise/SqlAdvisorValidator.java
@@ -14,16 +14,28 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql.advise;
-
-import java.util.*;
-
-import org.eigenbase.reltype.*;
-import org.eigenbase.sql.*;
-import org.eigenbase.sql.parser.*;
-import org.eigenbase.sql.type.*;
-import org.eigenbase.sql.validate.*;
-import org.eigenbase.util.*;
+package org.apache.calcite.sql.advise;
+
+import org.apache.calcite.rel.type.RelDataType;
+import org.apache.calcite.rel.type.RelDataTypeFactory;
+import org.apache.calcite.runtime.CalciteException;
+import org.apache.calcite.sql.SqlCall;
+import org.apache.calcite.sql.SqlIdentifier;
+import org.apache.calcite.sql.SqlNode;
+import org.apache.calcite.sql.SqlOperatorTable;
+import org.apache.calcite.sql.SqlSelect;
+import org.apache.calcite.sql.parser.SqlParserPos;
+import org.apache.calcite.sql.type.SqlTypeUtil;
+import org.apache.calcite.sql.validate.OverScope;
+import org.apache.calcite.sql.validate.SqlConformance;
+import org.apache.calcite.sql.validate.SqlValidatorCatalogReader;
+import org.apache.calcite.sql.validate.SqlValidatorImpl;
+import org.apache.calcite.sql.validate.SqlValidatorNamespace;
+import org.apache.calcite.sql.validate.SqlValidatorScope;
+import org.apache.calcite.util.Util;
+
+import java.util.HashSet;
+import java.util.Set;
/**
* <code>SqlAdvisorValidator</code> is used by {@link SqlAdvisor} to traverse
@@ -70,7 +82,7 @@ public class SqlAdvisorValidator extends SqlValidatorImpl {
registerId(id, scope);
try {
super.validateIdentifier(id, scope);
- } catch (EigenbaseException e) {
+ } catch (CalciteException e) {
Util.swallow(e, TRACER);
}
}
@@ -111,7 +123,7 @@ public class SqlAdvisorValidator extends SqlValidatorImpl {
// Util.permAssert that throws Error
try {
return super.deriveType(scope, operand);
- } catch (EigenbaseException e) {
+ } catch (CalciteException e) {
return unknownType;
} catch (UnsupportedOperationException e) {
return unknownType;
@@ -129,7 +141,7 @@ public class SqlAdvisorValidator extends SqlValidatorImpl {
SqlValidatorScope scope) {
try {
super.validateFrom(node, targetRowType, scope);
- } catch (EigenbaseException e) {
+ } catch (CalciteException e) {
Util.swallow(e, TRACER);
}
}
@@ -140,7 +152,7 @@ public class SqlAdvisorValidator extends SqlValidatorImpl {
protected void validateWhereClause(SqlSelect select) {
try {
super.validateWhereClause(select);
- } catch (EigenbaseException e) {
+ } catch (CalciteException e) {
Util.swallow(e, TRACER);
}
}
@@ -151,7 +163,7 @@ public class SqlAdvisorValidator extends SqlValidatorImpl {
protected void validateHavingClause(SqlSelect select) {
try {
super.validateHavingClause(select);
- } catch (EigenbaseException e) {
+ } catch (CalciteException e) {
Util.swallow(e, TRACER);
}
}
@@ -167,7 +179,7 @@ public class SqlAdvisorValidator extends SqlValidatorImpl {
opScope = overScope;
}
validateWindow(window, opScope, null);
- } catch (EigenbaseException e) {
+ } catch (CalciteException e) {
Util.swallow(e, TRACER);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/advise/SqlSimpleParser.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/advise/SqlSimpleParser.java b/core/src/main/java/org/apache/calcite/sql/advise/SqlSimpleParser.java
index 1d186dc..0bf8ce2 100644
--- a/core/src/main/java/org/apache/calcite/sql/advise/SqlSimpleParser.java
+++ b/core/src/main/java/org/apache/calcite/sql/advise/SqlSimpleParser.java
@@ -14,9 +14,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql.advise;
-
-import java.util.*;
+package org.apache.calcite.sql.advise;
+
+import java.util.ArrayList;
+import java.util.EnumSet;
+import java.util.HashMap;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Map;
/**
* A simple parser that takes an incomplete and turn it into a syntactically
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/advise/package-info.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/advise/package-info.java b/core/src/main/java/org/apache/calcite/sql/advise/package-info.java
index 0ca1782..a30a886 100644
--- a/core/src/main/java/org/apache/calcite/sql/advise/package-info.java
+++ b/core/src/main/java/org/apache/calcite/sql/advise/package-info.java
@@ -22,8 +22,8 @@
* invalid. It is edited in a SQL editor user-interface.</p>
*
* <p>The advisor uses the validation and parser framework set up in
- * <code>org.eigenbase.sql.validate</code> package.
+ * <code>org.apache.calcite.sql.validate</code> package.
*/
-package org.eigenbase.sql.advise;
+package org.apache.calcite.sql.advise;
// End package-info.java
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/fun/SqlAbstractTimeFunction.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/fun/SqlAbstractTimeFunction.java b/core/src/main/java/org/apache/calcite/sql/fun/SqlAbstractTimeFunction.java
index 16e9e00..6469927 100644
--- a/core/src/main/java/org/apache/calcite/sql/fun/SqlAbstractTimeFunction.java
+++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlAbstractTimeFunction.java
@@ -14,14 +14,23 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql.fun;
+package org.apache.calcite.sql.fun;
-import org.eigenbase.reltype.*;
-import org.eigenbase.sql.*;
-import org.eigenbase.sql.type.*;
-import org.eigenbase.sql.validate.*;
+import org.apache.calcite.rel.type.RelDataType;
+import org.apache.calcite.sql.SqlCall;
+import org.apache.calcite.sql.SqlFunction;
+import org.apache.calcite.sql.SqlFunctionCategory;
+import org.apache.calcite.sql.SqlKind;
+import org.apache.calcite.sql.SqlOperatorBinding;
+import org.apache.calcite.sql.SqlSyntax;
+import org.apache.calcite.sql.type.OperandTypes;
+import org.apache.calcite.sql.type.SqlOperandTypeChecker;
+import org.apache.calcite.sql.type.SqlTypeName;
+import org.apache.calcite.sql.type.SqlTypeUtil;
+import org.apache.calcite.sql.validate.SqlMonotonicity;
+import org.apache.calcite.sql.validate.SqlValidatorScope;
-import static org.eigenbase.util.Static.RESOURCE;
+import static org.apache.calcite.util.Static.RESOURCE;
/**
* Base class for time functions such as "LOCALTIME", "LOCALTIME(n)".
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/fun/SqlArrayQueryConstructor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/fun/SqlArrayQueryConstructor.java b/core/src/main/java/org/apache/calcite/sql/fun/SqlArrayQueryConstructor.java
index 252d0fa..2ea6b0a 100644
--- a/core/src/main/java/org/apache/calcite/sql/fun/SqlArrayQueryConstructor.java
+++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlArrayQueryConstructor.java
@@ -14,10 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql.fun;
+package org.apache.calcite.sql.fun;
-import org.eigenbase.sql.*;
-import org.eigenbase.sql.validate.*;
+import org.apache.calcite.sql.SqlKind;
/**
* Definition of the SQL:2003 standard ARRAY query constructor, <code>
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/fun/SqlArrayValueConstructor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/fun/SqlArrayValueConstructor.java b/core/src/main/java/org/apache/calcite/sql/fun/SqlArrayValueConstructor.java
index 9ac4f7e..b51c18b 100644
--- a/core/src/main/java/org/apache/calcite/sql/fun/SqlArrayValueConstructor.java
+++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlArrayValueConstructor.java
@@ -14,12 +14,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql.fun;
+package org.apache.calcite.sql.fun;
-import org.eigenbase.reltype.RelDataType;
-import org.eigenbase.sql.SqlKind;
-import org.eigenbase.sql.SqlOperatorBinding;
-import org.eigenbase.sql.type.SqlTypeUtil;
+import org.apache.calcite.rel.type.RelDataType;
+import org.apache.calcite.sql.SqlKind;
+import org.apache.calcite.sql.SqlOperatorBinding;
+import org.apache.calcite.sql.type.SqlTypeUtil;
/**
* Definition of the SQL:2003 standard ARRAY constructor, <code>MULTISET
@@ -30,8 +30,7 @@ public class SqlArrayValueConstructor extends SqlMultisetValueConstructor {
super("ARRAY", SqlKind.ARRAY_VALUE_CONSTRUCTOR);
}
- @Override
- public RelDataType inferReturnType(SqlOperatorBinding opBinding) {
+ @Override public RelDataType inferReturnType(SqlOperatorBinding opBinding) {
RelDataType type =
getComponentType(
opBinding.getTypeFactory(),
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/fun/SqlAvgAggFunction.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/fun/SqlAvgAggFunction.java b/core/src/main/java/org/apache/calcite/sql/fun/SqlAvgAggFunction.java
index 8a6bfe7..af78e8c 100644
--- a/core/src/main/java/org/apache/calcite/sql/fun/SqlAvgAggFunction.java
+++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlAvgAggFunction.java
@@ -14,16 +14,20 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql.fun;
+package org.apache.calcite.sql.fun;
-import java.util.List;
-
-import org.eigenbase.reltype.*;
-import org.eigenbase.sql.*;
-import org.eigenbase.sql.type.*;
+import org.apache.calcite.rel.type.RelDataType;
+import org.apache.calcite.rel.type.RelDataTypeFactory;
+import org.apache.calcite.sql.SqlAggFunction;
+import org.apache.calcite.sql.SqlFunctionCategory;
+import org.apache.calcite.sql.SqlKind;
+import org.apache.calcite.sql.type.OperandTypes;
+import org.apache.calcite.sql.type.ReturnTypes;
import com.google.common.collect.ImmutableList;
+import java.util.List;
+
/**
* <code>Avg</code> is an aggregator which returns the average of the values
* which go into it. It has precisely one argument of numeric type
@@ -77,6 +81,7 @@ public class SqlAvgAggFunction extends SqlAggFunction {
return subtype;
}
+ /** Sub-type of aggregate function. */
public enum Subtype {
AVG,
STDDEV_POP,
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/fun/SqlBetweenOperator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/fun/SqlBetweenOperator.java b/core/src/main/java/org/apache/calcite/sql/fun/SqlBetweenOperator.java
index 1f981c7..4b982ad 100644
--- a/core/src/main/java/org/apache/calcite/sql/fun/SqlBetweenOperator.java
+++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlBetweenOperator.java
@@ -14,19 +14,36 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql.fun;
-
-import java.util.*;
-
-import org.eigenbase.reltype.*;
-import org.eigenbase.sql.*;
-import org.eigenbase.sql.parser.*;
-import org.eigenbase.sql.type.*;
-import org.eigenbase.sql.util.*;
-import org.eigenbase.sql.validate.*;
-import org.eigenbase.util.*;
-
-import static org.eigenbase.util.Static.RESOURCE;
+package org.apache.calcite.sql.fun;
+
+import org.apache.calcite.rel.type.RelDataType;
+import org.apache.calcite.rel.type.RelDataTypeComparability;
+import org.apache.calcite.sql.ExplicitOperatorBinding;
+import org.apache.calcite.sql.SqlCall;
+import org.apache.calcite.sql.SqlCallBinding;
+import org.apache.calcite.sql.SqlInfixOperator;
+import org.apache.calcite.sql.SqlKind;
+import org.apache.calcite.sql.SqlLiteral;
+import org.apache.calcite.sql.SqlNode;
+import org.apache.calcite.sql.SqlOperator;
+import org.apache.calcite.sql.SqlOperatorBinding;
+import org.apache.calcite.sql.SqlUtil;
+import org.apache.calcite.sql.SqlWriter;
+import org.apache.calcite.sql.parser.SqlParserPos;
+import org.apache.calcite.sql.parser.SqlParserUtil;
+import org.apache.calcite.sql.type.ComparableOperandTypeChecker;
+import org.apache.calcite.sql.type.ReturnTypes;
+import org.apache.calcite.sql.type.SqlOperandTypeChecker;
+import org.apache.calcite.sql.type.SqlTypeUtil;
+import org.apache.calcite.sql.util.SqlBasicVisitor;
+import org.apache.calcite.sql.validate.SqlValidator;
+import org.apache.calcite.sql.validate.SqlValidatorScope;
+import org.apache.calcite.util.ImmutableNullableList;
+import org.apache.calcite.util.Util;
+
+import java.util.List;
+
+import static org.apache.calcite.util.Static.RESOURCE;
/**
* Defines the BETWEEN operator.
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/fun/SqlCase.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/fun/SqlCase.java b/core/src/main/java/org/apache/calcite/sql/fun/SqlCase.java
index 35e3776..fab92b2 100644
--- a/core/src/main/java/org/apache/calcite/sql/fun/SqlCase.java
+++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlCase.java
@@ -14,13 +14,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql.fun;
+package org.apache.calcite.sql.fun;
-import java.util.List;
+import org.apache.calcite.sql.SqlCall;
+import org.apache.calcite.sql.SqlKind;
+import org.apache.calcite.sql.SqlLiteral;
+import org.apache.calcite.sql.SqlNode;
+import org.apache.calcite.sql.SqlNodeList;
+import org.apache.calcite.sql.SqlOperator;
+import org.apache.calcite.sql.parser.SqlParserPos;
+import org.apache.calcite.util.UnmodifiableArrayList;
-import org.eigenbase.sql.*;
-import org.eigenbase.sql.parser.*;
-import org.eigenbase.util.UnmodifiableArrayList;
+import java.util.List;
/**
* A <code>SqlCase</code> is a node of a parse tree which represents a case
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/fun/SqlCaseOperator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/fun/SqlCaseOperator.java b/core/src/main/java/org/apache/calcite/sql/fun/SqlCaseOperator.java
index 44c4e12..0b060a6 100644
--- a/core/src/main/java/org/apache/calcite/sql/fun/SqlCaseOperator.java
+++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlCaseOperator.java
@@ -14,20 +14,36 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql.fun;
+package org.apache.calcite.sql.fun;
-import java.util.*;
-
-import org.eigenbase.reltype.*;
-import org.eigenbase.sql.*;
-import org.eigenbase.sql.parser.*;
-import org.eigenbase.sql.type.*;
-import org.eigenbase.sql.validate.*;
-import org.eigenbase.util.Pair;
+import org.apache.calcite.rel.type.RelDataType;
+import org.apache.calcite.rel.type.RelDataTypeFactory;
+import org.apache.calcite.sql.SqlCall;
+import org.apache.calcite.sql.SqlCallBinding;
+import org.apache.calcite.sql.SqlKind;
+import org.apache.calcite.sql.SqlLiteral;
+import org.apache.calcite.sql.SqlNode;
+import org.apache.calcite.sql.SqlNodeList;
+import org.apache.calcite.sql.SqlOperandCountRange;
+import org.apache.calcite.sql.SqlOperator;
+import org.apache.calcite.sql.SqlOperatorBinding;
+import org.apache.calcite.sql.SqlSyntax;
+import org.apache.calcite.sql.SqlUtil;
+import org.apache.calcite.sql.SqlWriter;
+import org.apache.calcite.sql.parser.SqlParserPos;
+import org.apache.calcite.sql.type.InferTypes;
+import org.apache.calcite.sql.type.SqlOperandCountRanges;
+import org.apache.calcite.sql.type.SqlTypeUtil;
+import org.apache.calcite.sql.validate.SqlValidator;
+import org.apache.calcite.sql.validate.SqlValidatorScope;
+import org.apache.calcite.util.Pair;
import com.google.common.collect.Iterables;
-import static org.eigenbase.util.Static.RESOURCE;
+import java.util.ArrayList;
+import java.util.List;
+
+import static org.apache.calcite.util.Static.RESOURCE;
/**
* An operator describing a <code>CASE</code>, <code>NULLIF</code> or <code>
@@ -92,7 +108,7 @@ import static org.eigenbase.util.Static.RESOURCE;
* but there's now no way to represent a call to COALESCE or NULLIF. All in all,
* it would be better to have operators for COALESCE, NULLIF, and both simple
* and switched forms of CASE, then translate to simple CASE when building the
- * {@link org.eigenbase.rex.RexNode} tree.</p>
+ * {@link org.apache.calcite.rex.RexNode} tree.</p>
*
* <p>The arguments are physically represented as follows:</p>
*
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/fun/SqlCastFunction.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/fun/SqlCastFunction.java b/core/src/main/java/org/apache/calcite/sql/fun/SqlCastFunction.java
index 47d1b89..7c7c7c4 100644
--- a/core/src/main/java/org/apache/calcite/sql/fun/SqlCastFunction.java
+++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlCastFunction.java
@@ -14,16 +14,35 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql.fun;
+package org.apache.calcite.sql.fun;
-import java.util.*;
+import org.apache.calcite.rel.type.RelDataType;
+import org.apache.calcite.rel.type.RelDataTypeFamily;
+import org.apache.calcite.sql.SqlCall;
+import org.apache.calcite.sql.SqlCallBinding;
+import org.apache.calcite.sql.SqlDynamicParam;
+import org.apache.calcite.sql.SqlFunction;
+import org.apache.calcite.sql.SqlFunctionCategory;
+import org.apache.calcite.sql.SqlIntervalQualifier;
+import org.apache.calcite.sql.SqlKind;
+import org.apache.calcite.sql.SqlLiteral;
+import org.apache.calcite.sql.SqlNode;
+import org.apache.calcite.sql.SqlOperandCountRange;
+import org.apache.calcite.sql.SqlOperatorBinding;
+import org.apache.calcite.sql.SqlSyntax;
+import org.apache.calcite.sql.SqlUtil;
+import org.apache.calcite.sql.SqlWriter;
+import org.apache.calcite.sql.type.InferTypes;
+import org.apache.calcite.sql.type.SqlOperandCountRanges;
+import org.apache.calcite.sql.type.SqlTypeFamily;
+import org.apache.calcite.sql.type.SqlTypeUtil;
+import org.apache.calcite.sql.validate.SqlMonotonicity;
+import org.apache.calcite.sql.validate.SqlValidatorScope;
-import org.eigenbase.reltype.*;
-import org.eigenbase.sql.*;
-import org.eigenbase.sql.type.*;
-import org.eigenbase.sql.validate.*;
+import java.util.HashSet;
+import java.util.Set;
-import static org.eigenbase.util.Static.RESOURCE;
+import static org.apache.calcite.util.Static.RESOURCE;
/**
* SqlCastFunction. Note that the std functions are really singleton objects,
@@ -210,8 +229,7 @@ public class SqlCastFunction extends SqlFunction {
writer.endFunCall(frame);
}
- @Override
- public SqlMonotonicity getMonotonicity(
+ @Override public SqlMonotonicity getMonotonicity(
SqlCall call,
SqlValidatorScope scope) {
RelDataTypeFamily castFrom =
@@ -227,6 +245,7 @@ public class SqlCastFunction extends SqlFunction {
//~ Inner Classes ----------------------------------------------------------
+ /** Pair of source-target type families. */
private class TypeFamilyCast {
private final RelDataTypeFamily castFrom;
private final RelDataTypeFamily castTo;
@@ -238,8 +257,7 @@ public class SqlCastFunction extends SqlFunction {
this.castTo = castTo;
}
- @Override
- public boolean equals(Object obj) {
+ @Override public boolean equals(Object obj) {
// TODO Auto-generated method stub
if (obj.getClass() != TypeFamilyCast.class) {
return false;
@@ -249,8 +267,7 @@ public class SqlCastFunction extends SqlFunction {
&& this.castTo.equals(other.castTo);
}
- @Override
- public int hashCode() {
+ @Override public int hashCode() {
// TODO Auto-generated method stub
return castFrom.hashCode() + castTo.hashCode();
}
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/fun/SqlCeilFunction.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/fun/SqlCeilFunction.java b/core/src/main/java/org/apache/calcite/sql/fun/SqlCeilFunction.java
index 9f5773d..a984c94 100644
--- a/core/src/main/java/org/apache/calcite/sql/fun/SqlCeilFunction.java
+++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlCeilFunction.java
@@ -14,11 +14,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql.fun;
+package org.apache.calcite.sql.fun;
-import org.eigenbase.sql.*;
-import org.eigenbase.sql.type.*;
-import org.eigenbase.sql.validate.*;
+import org.apache.calcite.sql.SqlCall;
+import org.apache.calcite.sql.SqlFunction;
+import org.apache.calcite.sql.SqlFunctionCategory;
+import org.apache.calcite.sql.SqlKind;
+import org.apache.calcite.sql.type.OperandTypes;
+import org.apache.calcite.sql.type.ReturnTypes;
+import org.apache.calcite.sql.validate.SqlMonotonicity;
+import org.apache.calcite.sql.validate.SqlValidatorScope;
/**
* Support for the CEIL/CEILING builtin function.
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/fun/SqlCoalesceFunction.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/fun/SqlCoalesceFunction.java b/core/src/main/java/org/apache/calcite/sql/fun/SqlCoalesceFunction.java
index 92e2509..89f33af 100644
--- a/core/src/main/java/org/apache/calcite/sql/fun/SqlCoalesceFunction.java
+++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlCoalesceFunction.java
@@ -14,15 +14,21 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql.fun;
+package org.apache.calcite.sql.fun;
-import java.util.List;
+import org.apache.calcite.sql.SqlCall;
+import org.apache.calcite.sql.SqlFunction;
+import org.apache.calcite.sql.SqlFunctionCategory;
+import org.apache.calcite.sql.SqlKind;
+import org.apache.calcite.sql.SqlNode;
+import org.apache.calcite.sql.SqlNodeList;
+import org.apache.calcite.sql.parser.SqlParserPos;
+import org.apache.calcite.sql.type.OperandTypes;
+import org.apache.calcite.sql.type.ReturnTypes;
+import org.apache.calcite.sql.validate.SqlValidator;
+import org.apache.calcite.util.Util;
-import org.eigenbase.sql.*;
-import org.eigenbase.sql.parser.*;
-import org.eigenbase.sql.type.*;
-import org.eigenbase.sql.validate.*;
-import org.eigenbase.util.Util;
+import java.util.List;
/**
* The <code>COALESCE</code> function.
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/fun/SqlCollectionTableOperator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/fun/SqlCollectionTableOperator.java b/core/src/main/java/org/apache/calcite/sql/fun/SqlCollectionTableOperator.java
index be42639..a8b8535 100644
--- a/core/src/main/java/org/apache/calcite/sql/fun/SqlCollectionTableOperator.java
+++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlCollectionTableOperator.java
@@ -14,18 +14,20 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql.fun;
+package org.apache.calcite.sql.fun;
-import org.eigenbase.sql.*;
-import org.eigenbase.sql.type.*;
+import org.apache.calcite.sql.SqlFunctionalOperator;
+import org.apache.calcite.sql.SqlKind;
+import org.apache.calcite.sql.type.OperandTypes;
+import org.apache.calcite.sql.type.ReturnTypes;
/**
* SqlCollectionTableOperator is the "table function derived table" operator. It
* converts a table-valued function into a relation, e.g. "<code>SELECT * FROM
* TABLE(ramp(5))</code>".
*
- * <p>This operator has function syntax (with one argument), whereas {@link
- * SqlStdOperatorTable#EXPLICIT_TABLE} is a prefix operator.
+ * <p>This operator has function syntax (with one argument), whereas
+ * {@link SqlStdOperatorTable#EXPLICIT_TABLE} is a prefix operator.
*/
public class SqlCollectionTableOperator extends SqlFunctionalOperator {
//~ Static fields/initializers ---------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/fun/SqlColumnListConstructor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/fun/SqlColumnListConstructor.java b/core/src/main/java/org/apache/calcite/sql/fun/SqlColumnListConstructor.java
index db939ed..56d908c 100644
--- a/core/src/main/java/org/apache/calcite/sql/fun/SqlColumnListConstructor.java
+++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlColumnListConstructor.java
@@ -14,10 +14,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql.fun;
+package org.apache.calcite.sql.fun;
-import org.eigenbase.sql.*;
-import org.eigenbase.sql.type.*;
+import org.apache.calcite.sql.SqlCall;
+import org.apache.calcite.sql.SqlKind;
+import org.apache.calcite.sql.SqlNode;
+import org.apache.calcite.sql.SqlSpecialOperator;
+import org.apache.calcite.sql.SqlWriter;
+import org.apache.calcite.sql.type.OperandTypes;
+import org.apache.calcite.sql.type.ReturnTypes;
/**
* SqlColumnListConstructor defines the non-standard constructor used to pass a
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/fun/SqlConvertFunction.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/fun/SqlConvertFunction.java b/core/src/main/java/org/apache/calcite/sql/fun/SqlConvertFunction.java
index 3327b27..efdacdd 100644
--- a/core/src/main/java/org/apache/calcite/sql/fun/SqlConvertFunction.java
+++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlConvertFunction.java
@@ -14,9 +14,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql.fun;
+package org.apache.calcite.sql.fun;
-import org.eigenbase.sql.*;
+import org.apache.calcite.sql.SqlCall;
+import org.apache.calcite.sql.SqlFunction;
+import org.apache.calcite.sql.SqlFunctionCategory;
+import org.apache.calcite.sql.SqlKind;
+import org.apache.calcite.sql.SqlWriter;
/**
* Common base for the <code>CONVERT</code> and <code>TRANSLATE</code>
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/fun/SqlCountAggFunction.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/fun/SqlCountAggFunction.java b/core/src/main/java/org/apache/calcite/sql/fun/SqlCountAggFunction.java
index 319559f..0d9e1a5 100644
--- a/core/src/main/java/org/apache/calcite/sql/fun/SqlCountAggFunction.java
+++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlCountAggFunction.java
@@ -14,17 +14,25 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql.fun;
+package org.apache.calcite.sql.fun;
-import java.util.List;
-
-import org.eigenbase.reltype.*;
-import org.eigenbase.sql.*;
-import org.eigenbase.sql.type.*;
-import org.eigenbase.sql.validate.*;
+import org.apache.calcite.rel.type.RelDataType;
+import org.apache.calcite.rel.type.RelDataTypeFactory;
+import org.apache.calcite.sql.SqlAggFunction;
+import org.apache.calcite.sql.SqlCall;
+import org.apache.calcite.sql.SqlFunctionCategory;
+import org.apache.calcite.sql.SqlKind;
+import org.apache.calcite.sql.SqlSyntax;
+import org.apache.calcite.sql.type.OperandTypes;
+import org.apache.calcite.sql.type.ReturnTypes;
+import org.apache.calcite.sql.type.SqlTypeName;
+import org.apache.calcite.sql.validate.SqlValidator;
+import org.apache.calcite.sql.validate.SqlValidatorScope;
import com.google.common.collect.ImmutableList;
+import java.util.List;
+
/**
* Definition of the SQL <code>COUNT</code> aggregation function.
*
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/fun/SqlCovarAggFunction.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/fun/SqlCovarAggFunction.java b/core/src/main/java/org/apache/calcite/sql/fun/SqlCovarAggFunction.java
index f759d0c..be63c1a 100644
--- a/core/src/main/java/org/apache/calcite/sql/fun/SqlCovarAggFunction.java
+++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlCovarAggFunction.java
@@ -14,20 +14,20 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql.fun;
+package org.apache.calcite.sql.fun;
-import java.util.List;
-
-import org.eigenbase.reltype.RelDataType;
-import org.eigenbase.reltype.RelDataTypeFactory;
-import org.eigenbase.sql.SqlAggFunction;
-import org.eigenbase.sql.SqlFunctionCategory;
-import org.eigenbase.sql.SqlKind;
-import org.eigenbase.sql.type.OperandTypes;
-import org.eigenbase.sql.type.ReturnTypes;
+import org.apache.calcite.rel.type.RelDataType;
+import org.apache.calcite.rel.type.RelDataTypeFactory;
+import org.apache.calcite.sql.SqlAggFunction;
+import org.apache.calcite.sql.SqlFunctionCategory;
+import org.apache.calcite.sql.SqlKind;
+import org.apache.calcite.sql.type.OperandTypes;
+import org.apache.calcite.sql.type.ReturnTypes;
import com.google.common.collect.ImmutableList;
+import java.util.List;
+
/**
* <code>Covar</code> is an aggregator which returns the Covariance of the
* values which go into it. It has precisely two arguments of numeric type
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/fun/SqlCurrentDateFunction.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/fun/SqlCurrentDateFunction.java b/core/src/main/java/org/apache/calcite/sql/fun/SqlCurrentDateFunction.java
index fd86dba..cdab873 100644
--- a/core/src/main/java/org/apache/calcite/sql/fun/SqlCurrentDateFunction.java
+++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlCurrentDateFunction.java
@@ -14,11 +14,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql.fun;
-
-import org.eigenbase.sql.*;
-import org.eigenbase.sql.type.*;
-import org.eigenbase.sql.validate.*;
+package org.apache.calcite.sql.fun;
+
+import org.apache.calcite.sql.SqlCall;
+import org.apache.calcite.sql.SqlFunction;
+import org.apache.calcite.sql.SqlFunctionCategory;
+import org.apache.calcite.sql.SqlKind;
+import org.apache.calcite.sql.SqlSyntax;
+import org.apache.calcite.sql.type.OperandTypes;
+import org.apache.calcite.sql.type.ReturnTypes;
+import org.apache.calcite.sql.validate.SqlMonotonicity;
+import org.apache.calcite.sql.validate.SqlValidatorScope;
/**
* The <code>CURRENT_DATE</code> function.
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/fun/SqlCursorConstructor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/fun/SqlCursorConstructor.java b/core/src/main/java/org/apache/calcite/sql/fun/SqlCursorConstructor.java
index 5ea0fff..a1fb812 100644
--- a/core/src/main/java/org/apache/calcite/sql/fun/SqlCursorConstructor.java
+++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlCursorConstructor.java
@@ -14,12 +14,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql.fun;
+package org.apache.calcite.sql.fun;
-import org.eigenbase.reltype.*;
-import org.eigenbase.sql.*;
-import org.eigenbase.sql.type.*;
-import org.eigenbase.sql.validate.*;
+import org.apache.calcite.rel.type.RelDataType;
+import org.apache.calcite.sql.SqlCall;
+import org.apache.calcite.sql.SqlKind;
+import org.apache.calcite.sql.SqlSelect;
+import org.apache.calcite.sql.SqlSpecialOperator;
+import org.apache.calcite.sql.SqlWriter;
+import org.apache.calcite.sql.type.OperandTypes;
+import org.apache.calcite.sql.type.ReturnTypes;
+import org.apache.calcite.sql.validate.SqlValidator;
+import org.apache.calcite.sql.validate.SqlValidatorScope;
/**
* SqlCursorConstructor defines the non-standard CURSOR(<query>)
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/fun/SqlDatetimeSubtractionOperator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/fun/SqlDatetimeSubtractionOperator.java b/core/src/main/java/org/apache/calcite/sql/fun/SqlDatetimeSubtractionOperator.java
index e577f1e..9ff4ee1 100644
--- a/core/src/main/java/org/apache/calcite/sql/fun/SqlDatetimeSubtractionOperator.java
+++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlDatetimeSubtractionOperator.java
@@ -14,12 +14,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql.fun;
+package org.apache.calcite.sql.fun;
-import org.eigenbase.sql.*;
-import org.eigenbase.sql.type.*;
-import org.eigenbase.sql.validate.SqlMonotonicity;
-import org.eigenbase.sql.validate.SqlValidatorScope;
+import org.apache.calcite.sql.SqlCall;
+import org.apache.calcite.sql.SqlKind;
+import org.apache.calcite.sql.SqlSpecialOperator;
+import org.apache.calcite.sql.SqlSyntax;
+import org.apache.calcite.sql.SqlWriter;
+import org.apache.calcite.sql.type.InferTypes;
+import org.apache.calcite.sql.type.OperandTypes;
+import org.apache.calcite.sql.type.ReturnTypes;
+import org.apache.calcite.sql.validate.SqlMonotonicity;
+import org.apache.calcite.sql.validate.SqlValidatorScope;
/**
* A special operator for the subtraction of two DATETIMEs. The format of
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/fun/SqlExtractFunction.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/fun/SqlExtractFunction.java b/core/src/main/java/org/apache/calcite/sql/fun/SqlExtractFunction.java
index 5fc5ece..7e43262 100644
--- a/core/src/main/java/org/apache/calcite/sql/fun/SqlExtractFunction.java
+++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlExtractFunction.java
@@ -14,11 +14,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql.fun;
+package org.apache.calcite.sql.fun;
-import org.eigenbase.sql.*;
-import org.eigenbase.sql.type.*;
-import org.eigenbase.util.*;
+import org.apache.calcite.sql.SqlCall;
+import org.apache.calcite.sql.SqlFunction;
+import org.apache.calcite.sql.SqlFunctionCategory;
+import org.apache.calcite.sql.SqlKind;
+import org.apache.calcite.sql.SqlWriter;
+import org.apache.calcite.sql.type.OperandTypes;
+import org.apache.calcite.sql.type.ReturnTypes;
+import org.apache.calcite.util.Util;
/**
* The SQL <code>EXTRACT</code> operator. Extracts a specified field value from
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/fun/SqlFirstLastValueAggFunction.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/fun/SqlFirstLastValueAggFunction.java b/core/src/main/java/org/apache/calcite/sql/fun/SqlFirstLastValueAggFunction.java
index f401c58..5d382c3 100644
--- a/core/src/main/java/org/apache/calcite/sql/fun/SqlFirstLastValueAggFunction.java
+++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlFirstLastValueAggFunction.java
@@ -14,16 +14,21 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql.fun;
+package org.apache.calcite.sql.fun;
-import java.util.List;
-
-import org.eigenbase.reltype.*;
-import org.eigenbase.sql.*;
-import org.eigenbase.sql.type.*;
+import org.apache.calcite.rel.type.RelDataType;
+import org.apache.calcite.rel.type.RelDataTypeFactory;
+import org.apache.calcite.sql.SqlAggFunction;
+import org.apache.calcite.sql.SqlFunctionCategory;
+import org.apache.calcite.sql.SqlKind;
+import org.apache.calcite.sql.type.OperandTypes;
+import org.apache.calcite.sql.type.ReturnTypes;
+import org.apache.calcite.sql.type.SqlTypeName;
import com.google.common.collect.ImmutableList;
+import java.util.List;
+
/**
* <code>FIRST_VALUE</code> and <code>LAST_VALUE</code> aggregate functions
* return the first or the last value in a list of values that are input to the
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/fun/SqlFloorFunction.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/fun/SqlFloorFunction.java b/core/src/main/java/org/apache/calcite/sql/fun/SqlFloorFunction.java
index 04a14a2..bec351c 100644
--- a/core/src/main/java/org/apache/calcite/sql/fun/SqlFloorFunction.java
+++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlFloorFunction.java
@@ -14,11 +14,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql.fun;
+package org.apache.calcite.sql.fun;
-import org.eigenbase.sql.*;
-import org.eigenbase.sql.type.*;
-import org.eigenbase.sql.validate.*;
+import org.apache.calcite.sql.SqlCall;
+import org.apache.calcite.sql.SqlFunction;
+import org.apache.calcite.sql.SqlFunctionCategory;
+import org.apache.calcite.sql.SqlKind;
+import org.apache.calcite.sql.type.OperandTypes;
+import org.apache.calcite.sql.type.ReturnTypes;
+import org.apache.calcite.sql.validate.SqlMonotonicity;
+import org.apache.calcite.sql.validate.SqlValidatorScope;
/**
* Definition of the "FLOOR" builtin SQL function.
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/fun/SqlHistogramAggFunction.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/fun/SqlHistogramAggFunction.java b/core/src/main/java/org/apache/calcite/sql/fun/SqlHistogramAggFunction.java
index a9a24b9..9f2e461 100644
--- a/core/src/main/java/org/apache/calcite/sql/fun/SqlHistogramAggFunction.java
+++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlHistogramAggFunction.java
@@ -14,16 +14,20 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql.fun;
+package org.apache.calcite.sql.fun;
-import java.util.List;
-
-import org.eigenbase.reltype.*;
-import org.eigenbase.sql.*;
-import org.eigenbase.sql.type.*;
+import org.apache.calcite.rel.type.RelDataType;
+import org.apache.calcite.rel.type.RelDataTypeFactory;
+import org.apache.calcite.sql.SqlAggFunction;
+import org.apache.calcite.sql.SqlFunctionCategory;
+import org.apache.calcite.sql.SqlKind;
+import org.apache.calcite.sql.type.OperandTypes;
+import org.apache.calcite.sql.type.ReturnTypes;
import com.google.common.collect.ImmutableList;
+import java.util.List;
+
/**
* <code>HistogramAgg</code> is base operator which supports the Histogram
* MIN/MAX aggregatoin functions. which returns the sum of the values which go
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/fun/SqlInOperator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/fun/SqlInOperator.java b/core/src/main/java/org/apache/calcite/sql/fun/SqlInOperator.java
index b120d78..547e0e7 100644
--- a/core/src/main/java/org/apache/calcite/sql/fun/SqlInOperator.java
+++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlInOperator.java
@@ -14,18 +14,33 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql.fun;
-
-import java.util.*;
-
-import org.eigenbase.reltype.*;
-import org.eigenbase.sql.*;
-import org.eigenbase.sql.type.*;
-import org.eigenbase.sql.validate.*;
+package org.apache.calcite.sql.fun;
+
+import org.apache.calcite.rel.type.RelDataType;
+import org.apache.calcite.rel.type.RelDataTypeFactory;
+import org.apache.calcite.rel.type.RelDataTypeField;
+import org.apache.calcite.sql.ExplicitOperatorBinding;
+import org.apache.calcite.sql.SqlBinaryOperator;
+import org.apache.calcite.sql.SqlCall;
+import org.apache.calcite.sql.SqlCallBinding;
+import org.apache.calcite.sql.SqlKind;
+import org.apache.calcite.sql.SqlNode;
+import org.apache.calcite.sql.SqlNodeList;
+import org.apache.calcite.sql.type.ComparableOperandTypeChecker;
+import org.apache.calcite.sql.type.InferTypes;
+import org.apache.calcite.sql.type.OperandTypes;
+import org.apache.calcite.sql.type.ReturnTypes;
+import org.apache.calcite.sql.type.SqlTypeName;
+import org.apache.calcite.sql.type.SqlTypeUtil;
+import org.apache.calcite.sql.validate.SqlValidator;
+import org.apache.calcite.sql.validate.SqlValidatorScope;
import com.google.common.collect.ImmutableList;
-import static org.eigenbase.util.Static.RESOURCE;
+import java.util.ArrayList;
+import java.util.List;
+
+import static org.apache.calcite.util.Static.RESOURCE;
/**
* Definition of the SQL <code>IN</code> operator, which tests for a value's
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/fun/SqlItemOperator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/fun/SqlItemOperator.java b/core/src/main/java/org/apache/calcite/sql/fun/SqlItemOperator.java
index 639665a..fb4d127 100644
--- a/core/src/main/java/org/apache/calcite/sql/fun/SqlItemOperator.java
+++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlItemOperator.java
@@ -14,15 +14,26 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql.fun;
+package org.apache.calcite.sql.fun;
-import java.util.List;
+import org.apache.calcite.rel.type.RelDataType;
+import org.apache.calcite.rel.type.RelDataTypeFactory;
+import org.apache.calcite.sql.SqlCall;
+import org.apache.calcite.sql.SqlCallBinding;
+import org.apache.calcite.sql.SqlKind;
+import org.apache.calcite.sql.SqlNode;
+import org.apache.calcite.sql.SqlOperandCountRange;
+import org.apache.calcite.sql.SqlOperatorBinding;
+import org.apache.calcite.sql.SqlSpecialOperator;
+import org.apache.calcite.sql.SqlWriter;
+import org.apache.calcite.sql.parser.SqlParserUtil;
+import org.apache.calcite.sql.type.OperandTypes;
+import org.apache.calcite.sql.type.SqlOperandCountRanges;
+import org.apache.calcite.sql.type.SqlSingleOperandTypeChecker;
+import org.apache.calcite.sql.type.SqlTypeFamily;
+import org.apache.calcite.sql.type.SqlTypeName;
-import org.eigenbase.reltype.RelDataType;
-import org.eigenbase.reltype.RelDataTypeFactory;
-import org.eigenbase.sql.*;
-import org.eigenbase.sql.parser.SqlParserUtil;
-import org.eigenbase.sql.type.*;
+import java.util.List;
/**
* The item operator {@code [ ... ]}, used to access a given element of an
@@ -40,8 +51,7 @@ class SqlItemOperator extends SqlSpecialOperator {
super("ITEM", SqlKind.OTHER_FUNCTION, 100, true, null, null, null);
}
- @Override
- public int reduceExpr(int ordinal, List<Object> list) {
+ @Override public int reduceExpr(int ordinal, List<Object> list) {
SqlNode left = (SqlNode) list.get(ordinal - 1);
SqlNode right = (SqlNode) list.get(ordinal + 1);
final SqlParserUtil.ToTreeListItem treeListItem =
@@ -59,8 +69,7 @@ class SqlItemOperator extends SqlSpecialOperator {
return ordinal - 1;
}
- @Override
- public void unparse(
+ @Override public void unparse(
SqlWriter writer, SqlCall call, int leftPrec, int rightPrec) {
call.operand(0).unparse(writer, leftPrec, 0);
final SqlWriter.Frame frame = writer.startList("[", "]");
@@ -68,13 +77,11 @@ class SqlItemOperator extends SqlSpecialOperator {
writer.endList(frame);
}
- @Override
- public SqlOperandCountRange getOperandCountRange() {
+ @Override public SqlOperandCountRange getOperandCountRange() {
return SqlOperandCountRanges.of(2);
}
- @Override
- public boolean checkOperandTypes(
+ @Override public boolean checkOperandTypes(
SqlCallBinding callBinding,
boolean throwOnFailure) {
final SqlNode left = callBinding.getCall().operand(0);
@@ -105,14 +112,12 @@ class SqlItemOperator extends SqlSpecialOperator {
}
}
- @Override
- public String getAllowedSignatures(String name) {
+ @Override public String getAllowedSignatures(String name) {
return "<ARRAY>[<INTEGER>]\n"
+ "<MAP>[<VALUE>]";
}
- @Override
- public RelDataType inferReturnType(SqlOperatorBinding opBinding) {
+ @Override public RelDataType inferReturnType(SqlOperatorBinding opBinding) {
final RelDataTypeFactory typeFactory = opBinding.getTypeFactory();
final RelDataType operandType = opBinding.getOperandType(0);
switch (operandType.getSqlTypeName()) {
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/fun/SqlLeadLagAggFunction.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/fun/SqlLeadLagAggFunction.java b/core/src/main/java/org/apache/calcite/sql/fun/SqlLeadLagAggFunction.java
index 5f91738..a6d5fec 100644
--- a/core/src/main/java/org/apache/calcite/sql/fun/SqlLeadLagAggFunction.java
+++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlLeadLagAggFunction.java
@@ -14,17 +14,27 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql.fun;
+package org.apache.calcite.sql.fun;
-import java.util.List;
-
-import org.eigenbase.reltype.RelDataType;
-import org.eigenbase.reltype.RelDataTypeFactory;
-import org.eigenbase.sql.*;
-import org.eigenbase.sql.type.*;
+import org.apache.calcite.rel.type.RelDataType;
+import org.apache.calcite.rel.type.RelDataTypeFactory;
+import org.apache.calcite.sql.SqlAggFunction;
+import org.apache.calcite.sql.SqlFunctionCategory;
+import org.apache.calcite.sql.SqlKind;
+import org.apache.calcite.sql.SqlOperatorBinding;
+import org.apache.calcite.sql.type.OperandTypes;
+import org.apache.calcite.sql.type.ReturnTypes;
+import org.apache.calcite.sql.type.SameOperandTypeChecker;
+import org.apache.calcite.sql.type.SqlReturnTypeInference;
+import org.apache.calcite.sql.type.SqlSingleOperandTypeChecker;
+import org.apache.calcite.sql.type.SqlTypeFamily;
+import org.apache.calcite.sql.type.SqlTypeTransform;
+import org.apache.calcite.sql.type.SqlTypeTransforms;
import com.google.common.collect.ImmutableList;
+import java.util.List;
+
/**
* <code>LEAD</code> and <code>LAG</code> aggregate functions
* return the value of given expression evaluated at given offset.
@@ -35,12 +45,12 @@ public class SqlLeadLagAggFunction extends SqlAggFunction {
OperandTypes.ANY,
OperandTypes.family(SqlTypeFamily.ANY, SqlTypeFamily.NUMERIC),
OperandTypes.and(
- OperandTypes.family(
- SqlTypeFamily.ANY, SqlTypeFamily.NUMERIC, SqlTypeFamily.ANY)
+ OperandTypes.family(SqlTypeFamily.ANY, SqlTypeFamily.NUMERIC,
+ SqlTypeFamily.ANY),
// Arguments 1 and 3 must have same type
- , new SameOperandTypeChecker(3) {
- @Override
- protected List<Integer> getOperandList(int operandCount) {
+ new SameOperandTypeChecker(3) {
+ @Override protected List<Integer>
+ getOperandList(int operandCount) {
return ImmutableList.of(0, 2);
}
}));
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/fun/SqlLikeOperator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/fun/SqlLikeOperator.java b/core/src/main/java/org/apache/calcite/sql/fun/SqlLikeOperator.java
index 5de868a..ecd388a 100644
--- a/core/src/main/java/org/apache/calcite/sql/fun/SqlLikeOperator.java
+++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlLikeOperator.java
@@ -14,14 +14,26 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql.fun;
-
-import java.util.*;
-
-import org.eigenbase.sql.*;
-import org.eigenbase.sql.parser.*;
-import org.eigenbase.sql.type.*;
-import org.eigenbase.util.*;
+package org.apache.calcite.sql.fun;
+
+import org.apache.calcite.sql.SqlCall;
+import org.apache.calcite.sql.SqlCallBinding;
+import org.apache.calcite.sql.SqlKind;
+import org.apache.calcite.sql.SqlNode;
+import org.apache.calcite.sql.SqlOperandCountRange;
+import org.apache.calcite.sql.SqlOperator;
+import org.apache.calcite.sql.SqlSpecialOperator;
+import org.apache.calcite.sql.SqlWriter;
+import org.apache.calcite.sql.parser.SqlParserPos;
+import org.apache.calcite.sql.parser.SqlParserUtil;
+import org.apache.calcite.sql.type.InferTypes;
+import org.apache.calcite.sql.type.OperandTypes;
+import org.apache.calcite.sql.type.ReturnTypes;
+import org.apache.calcite.sql.type.SqlOperandCountRanges;
+import org.apache.calcite.sql.type.SqlTypeUtil;
+import org.apache.calcite.util.Util;
+
+import java.util.List;
/**
* An operator describing the <code>LIKE</code> and <code>SIMILAR</code>
@@ -36,9 +48,9 @@ import org.eigenbase.util.*;
* escape-value]</code></li>
* </ul>
*
- * <p><b>NOTE</b> If the <code>NOT</code> clause is present the {@link
- * org.eigenbase.sql.parser.SqlParser parser} will generate a eqvivalent to
- * <code>NOT (src LIKE pattern ...)</code>
+ * <p><b>NOTE</b> If the <code>NOT</code> clause is present the
+ * {@link org.apache.calcite.sql.parser.SqlParser parser} will generate a
+ * eqvivalent to <code>NOT (src LIKE pattern ...)</code>
*/
public class SqlLikeOperator extends SqlSpecialOperator {
//~ Instance fields --------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/fun/SqlLiteralChainOperator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/fun/SqlLiteralChainOperator.java b/core/src/main/java/org/apache/calcite/sql/fun/SqlLiteralChainOperator.java
index c6cafb9..d51ef0c 100644
--- a/core/src/main/java/org/apache/calcite/sql/fun/SqlLiteralChainOperator.java
+++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlLiteralChainOperator.java
@@ -14,20 +14,36 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql.fun;
-
-import java.util.*;
-
-import org.eigenbase.reltype.*;
-import org.eigenbase.sql.*;
-import org.eigenbase.sql.parser.*;
-import org.eigenbase.sql.type.*;
-import org.eigenbase.sql.validate.*;
-import org.eigenbase.util.*;
-
-import net.hydromatic.linq4j.Ord;
-
-import static org.eigenbase.util.Static.RESOURCE;
+package org.apache.calcite.sql.fun;
+
+import org.apache.calcite.linq4j.Ord;
+import org.apache.calcite.rel.type.RelDataType;
+import org.apache.calcite.sql.SqlCall;
+import org.apache.calcite.sql.SqlCallBinding;
+import org.apache.calcite.sql.SqlCharStringLiteral;
+import org.apache.calcite.sql.SqlCollation;
+import org.apache.calcite.sql.SqlInternalOperator;
+import org.apache.calcite.sql.SqlKind;
+import org.apache.calcite.sql.SqlLiteral;
+import org.apache.calcite.sql.SqlNode;
+import org.apache.calcite.sql.SqlOperatorBinding;
+import org.apache.calcite.sql.SqlUtil;
+import org.apache.calcite.sql.SqlWriter;
+import org.apache.calcite.sql.parser.SqlParserPos;
+import org.apache.calcite.sql.type.InferTypes;
+import org.apache.calcite.sql.type.OperandTypes;
+import org.apache.calcite.sql.type.ReturnTypes;
+import org.apache.calcite.sql.type.SqlTypeName;
+import org.apache.calcite.sql.type.SqlTypeUtil;
+import org.apache.calcite.sql.validate.SqlValidator;
+import org.apache.calcite.sql.validate.SqlValidatorScope;
+import org.apache.calcite.util.BitString;
+import org.apache.calcite.util.NlsString;
+import org.apache.calcite.util.Util;
+
+import java.util.List;
+
+import static org.apache.calcite.util.Static.RESOURCE;
/**
* Internal operator, by which the parser represents a continued string literal.
@@ -36,8 +52,9 @@ import static org.eigenbase.util.Static.RESOURCE;
* collected as the operands of an {@link SqlCall} using this operator. After
* validation, the fragments will be concatenated into a single literal.
*
- * <p>For a chain of {@link org.eigenbase.sql.SqlCharStringLiteral} objects, a
- * {@link SqlCollation} object is attached only to the head of the chain.
+ * <p>For a chain of {@link org.apache.calcite.sql.SqlCharStringLiteral}
+ * objects, a {@link SqlCollation} object is attached only to the head of the
+ * chain.
*/
public class SqlLiteralChainOperator extends SqlInternalOperator {
//~ Constructors -----------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/fun/SqlMapQueryConstructor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/fun/SqlMapQueryConstructor.java b/core/src/main/java/org/apache/calcite/sql/fun/SqlMapQueryConstructor.java
index e3db960..e15421d 100644
--- a/core/src/main/java/org/apache/calcite/sql/fun/SqlMapQueryConstructor.java
+++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlMapQueryConstructor.java
@@ -14,9 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql.fun;
+package org.apache.calcite.sql.fun;
-import org.eigenbase.sql.SqlKind;
+import org.apache.calcite.sql.SqlKind;
/**
* Definition of the MAP query constructor, <code>
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/fun/SqlMapValueConstructor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/fun/SqlMapValueConstructor.java b/core/src/main/java/org/apache/calcite/sql/fun/SqlMapValueConstructor.java
index e86df48..2e86321 100644
--- a/core/src/main/java/org/apache/calcite/sql/fun/SqlMapValueConstructor.java
+++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlMapValueConstructor.java
@@ -14,18 +14,20 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql.fun;
+package org.apache.calcite.sql.fun;
-import java.util.List;
+import org.apache.calcite.rel.type.RelDataType;
+import org.apache.calcite.rel.type.RelDataTypeFactory;
+import org.apache.calcite.sql.SqlCallBinding;
+import org.apache.calcite.sql.SqlKind;
+import org.apache.calcite.sql.SqlOperatorBinding;
+import org.apache.calcite.sql.type.SqlTypeUtil;
+import org.apache.calcite.util.Pair;
+import org.apache.calcite.util.Util;
-import org.eigenbase.reltype.RelDataType;
-import org.eigenbase.reltype.RelDataTypeFactory;
-import org.eigenbase.sql.*;
-import org.eigenbase.sql.type.SqlTypeUtil;
-import org.eigenbase.util.Pair;
-import org.eigenbase.util.Util;
+import java.util.List;
-import static org.eigenbase.util.Static.RESOURCE;
+import static org.apache.calcite.util.Static.RESOURCE;
/**
* Definition of the MAP constructor,
@@ -38,8 +40,7 @@ public class SqlMapValueConstructor extends SqlMultisetValueConstructor {
super("MAP", SqlKind.MAP_VALUE_CONSTRUCTOR);
}
- @Override
- public RelDataType inferReturnType(SqlOperatorBinding opBinding) {
+ @Override public RelDataType inferReturnType(SqlOperatorBinding opBinding) {
Pair<RelDataType, RelDataType> type =
getComponentTypes(
opBinding.getTypeFactory(), opBinding.collectOperandTypes());
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/fun/SqlMinMaxAggFunction.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/fun/SqlMinMaxAggFunction.java b/core/src/main/java/org/apache/calcite/sql/fun/SqlMinMaxAggFunction.java
index 0c231d0..74b3c99 100644
--- a/core/src/main/java/org/apache/calcite/sql/fun/SqlMinMaxAggFunction.java
+++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlMinMaxAggFunction.java
@@ -14,14 +14,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql.fun;
+package org.apache.calcite.sql.fun;
-import java.util.List;
+import org.apache.calcite.rel.type.RelDataType;
+import org.apache.calcite.rel.type.RelDataTypeFactory;
+import org.apache.calcite.sql.SqlAggFunction;
+import org.apache.calcite.sql.SqlFunctionCategory;
+import org.apache.calcite.sql.SqlKind;
+import org.apache.calcite.sql.type.OperandTypes;
+import org.apache.calcite.sql.type.ReturnTypes;
+import org.apache.calcite.util.Util;
-import org.eigenbase.reltype.*;
-import org.eigenbase.sql.*;
-import org.eigenbase.sql.type.*;
-import org.eigenbase.util.*;
+import java.util.List;
/**
* Definition of the <code>MIN</code> and <code>MAX</code> aggregate functions,
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/fun/SqlMonotonicBinaryOperator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/fun/SqlMonotonicBinaryOperator.java b/core/src/main/java/org/apache/calcite/sql/fun/SqlMonotonicBinaryOperator.java
index 93595e2..42599a1 100644
--- a/core/src/main/java/org/apache/calcite/sql/fun/SqlMonotonicBinaryOperator.java
+++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlMonotonicBinaryOperator.java
@@ -14,11 +14,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql.fun;
-
-import org.eigenbase.sql.*;
-import org.eigenbase.sql.type.*;
-import org.eigenbase.sql.validate.*;
+package org.apache.calcite.sql.fun;
+
+import org.apache.calcite.sql.SqlBinaryOperator;
+import org.apache.calcite.sql.SqlCall;
+import org.apache.calcite.sql.SqlKind;
+import org.apache.calcite.sql.SqlLiteral;
+import org.apache.calcite.sql.type.SqlOperandTypeChecker;
+import org.apache.calcite.sql.type.SqlOperandTypeInference;
+import org.apache.calcite.sql.type.SqlReturnTypeInference;
+import org.apache.calcite.sql.validate.SqlMonotonicity;
+import org.apache.calcite.sql.validate.SqlValidatorScope;
/**
* Base class for binary operators such as addition, subtraction, and
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/fun/SqlMonotonicUnaryFunction.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/fun/SqlMonotonicUnaryFunction.java b/core/src/main/java/org/apache/calcite/sql/fun/SqlMonotonicUnaryFunction.java
index eefe699..d347fbc 100644
--- a/core/src/main/java/org/apache/calcite/sql/fun/SqlMonotonicUnaryFunction.java
+++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlMonotonicUnaryFunction.java
@@ -14,11 +14,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql.fun;
+package org.apache.calcite.sql.fun;
-import org.eigenbase.sql.*;
-import org.eigenbase.sql.type.*;
-import org.eigenbase.sql.validate.*;
+import org.apache.calcite.sql.SqlCall;
+import org.apache.calcite.sql.SqlFunction;
+import org.apache.calcite.sql.SqlFunctionCategory;
+import org.apache.calcite.sql.SqlKind;
+import org.apache.calcite.sql.type.SqlOperandTypeChecker;
+import org.apache.calcite.sql.type.SqlOperandTypeInference;
+import org.apache.calcite.sql.type.SqlReturnTypeInference;
+import org.apache.calcite.sql.validate.SqlMonotonicity;
+import org.apache.calcite.sql.validate.SqlValidatorScope;
/**
* Base class for unary operators such as FLOOR/CEIL which are monotonic for
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/a0ba73cd/core/src/main/java/org/apache/calcite/sql/fun/SqlMultisetMemberOfOperator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/fun/SqlMultisetMemberOfOperator.java b/core/src/main/java/org/apache/calcite/sql/fun/SqlMultisetMemberOfOperator.java
index 866dff4..71b5880 100644
--- a/core/src/main/java/org/apache/calcite/sql/fun/SqlMultisetMemberOfOperator.java
+++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlMultisetMemberOfOperator.java
@@ -14,13 +14,19 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.eigenbase.sql.fun;
+package org.apache.calcite.sql.fun;
-import org.eigenbase.reltype.*;
-import org.eigenbase.sql.*;
-import org.eigenbase.sql.type.*;
+import org.apache.calcite.rel.type.RelDataType;
+import org.apache.calcite.sql.SqlBinaryOperator;
+import org.apache.calcite.sql.SqlCallBinding;
+import org.apache.calcite.sql.SqlKind;
+import org.apache.calcite.sql.SqlOperandCountRange;
+import org.apache.calcite.sql.type.MultisetSqlType;
+import org.apache.calcite.sql.type.OperandTypes;
+import org.apache.calcite.sql.type.ReturnTypes;
+import org.apache.calcite.sql.type.SqlOperandCountRanges;
-import static org.eigenbase.util.Static.RESOURCE;
+import static org.apache.calcite.util.Static.RESOURCE;
/**
* Multiset MEMBER OF. Checks to see if a element belongs to a multiset.<br>