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 2016/10/31 07:32:59 UTC
[6/8] calcite git commit: [CALCITE-1270] Upgrade Calcite to
avatica-1.9, sqlline-1.2.0
[CALCITE-1270] Upgrade Calcite to avatica-1.9, sqlline-1.2.0
[CALCITE-1475] Jackson shading causes JsonIgnore to be ignored when serializing response as JSON
Add types for enum properties (leveraging recent API changes in Avatica).
Calcite changes corresponding to [CALCITE-1301] Add cancel flag to AvaticaStatement.
Depend on avatica-core rather than avatica (fixes [CALCITE-1475]) (Josh Elser).
Project: http://git-wip-us.apache.org/repos/asf/calcite/repo
Commit: http://git-wip-us.apache.org/repos/asf/calcite/commit/b22733c7
Tree: http://git-wip-us.apache.org/repos/asf/calcite/tree/b22733c7
Diff: http://git-wip-us.apache.org/repos/asf/calcite/diff/b22733c7
Branch: refs/heads/master
Commit: b22733c7c52def566abf84dd020258ae0194b21d
Parents: 01d4760
Author: Julian Hyde <jh...@apache.org>
Authored: Sat May 28 22:58:55 2016 -0700
Committer: Julian Hyde <jh...@apache.org>
Committed: Sun Oct 30 21:20:40 2016 -0700
----------------------------------------------------------------------
cassandra/pom.xml | 2 +-
core/pom.xml | 14 +++++++++-
.../config/CalciteConnectionConfigImpl.java | 8 ++----
.../config/CalciteConnectionProperty.java | 28 +++++++++++++++-----
.../calcite/jdbc/CalciteConnectionImpl.java | 14 +++++-----
.../apache/calcite/jdbc/CalciteMetaImpl.java | 10 +++----
.../apache/calcite/jdbc/CalciteResultSet.java | 24 +----------------
.../org/apache/calcite/model/JsonSchema.java | 1 -
.../apache/calcite/runtime/CalciteResource.java | 2 --
.../calcite/runtime/CalciteResource.properties | 1 -
.../java/org/apache/calcite/test/JdbcTest.java | 10 +++----
druid/pom.xml | 10 ++++++-
elasticsearch/pom.xml | 16 ++++++++---
example/csv/pom.xml | 12 ++++++---
mongodb/pom.xml | 4 ---
piglet/pom.xml | 2 +-
pom.xml | 12 +++------
splunk/pom.xml | 2 +-
18 files changed, 88 insertions(+), 84 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/calcite/blob/b22733c7/cassandra/pom.xml
----------------------------------------------------------------------
diff --git a/cassandra/pom.xml b/cassandra/pom.xml
index d5481d4..f4b7541 100644
--- a/cassandra/pom.xml
+++ b/cassandra/pom.xml
@@ -38,7 +38,7 @@ limitations under the License.
in dependencyManagement in the root POM, not here. -->
<dependency>
<groupId>org.apache.calcite.avatica</groupId>
- <artifactId>avatica</artifactId>
+ <artifactId>avatica-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.calcite</groupId>
http://git-wip-us.apache.org/repos/asf/calcite/blob/b22733c7/core/pom.xml
----------------------------------------------------------------------
diff --git a/core/pom.xml b/core/pom.xml
index 635810a..14d8872 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -39,7 +39,7 @@ limitations under the License.
in dependencyManagement in the root POM, not here. -->
<dependency>
<groupId>org.apache.calcite.avatica</groupId>
- <artifactId>avatica</artifactId>
+ <artifactId>avatica-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.calcite</groupId>
@@ -60,6 +60,18 @@ limitations under the License.
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-annotations</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ </dependency>
+ <dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
</dependency>
http://git-wip-us.apache.org/repos/asf/calcite/blob/b22733c7/core/src/main/java/org/apache/calcite/config/CalciteConnectionConfigImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/config/CalciteConnectionConfigImpl.java b/core/src/main/java/org/apache/calcite/config/CalciteConnectionConfigImpl.java
index f3dbd2a..5262059 100644
--- a/core/src/main/java/org/apache/calcite/config/CalciteConnectionConfigImpl.java
+++ b/core/src/main/java/org/apache/calcite/config/CalciteConnectionConfigImpl.java
@@ -127,12 +127,8 @@ public class CalciteConnectionConfigImpl extends ConnectionConfigImpl
}
public JsonSchema.Type schemaType() {
- // Avatica won't allow enum properties whose default is null, so we use
- // NONE, which is equivalent to null.
- final JsonSchema.Type type =
- CalciteConnectionProperty.SCHEMA_TYPE.wrap(properties)
- .getEnum(JsonSchema.Type.class);
- return type == null || type == JsonSchema.Type.NONE ? null : type;
+ return CalciteConnectionProperty.SCHEMA_TYPE.wrap(properties)
+ .getEnum(JsonSchema.Type.class);
}
public boolean spark() {
http://git-wip-us.apache.org/repos/asf/calcite/blob/b22733c7/core/src/main/java/org/apache/calcite/config/CalciteConnectionProperty.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/config/CalciteConnectionProperty.java b/core/src/main/java/org/apache/calcite/config/CalciteConnectionProperty.java
index 2086f87..e17740d 100644
--- a/core/src/main/java/org/apache/calcite/config/CalciteConnectionProperty.java
+++ b/core/src/main/java/org/apache/calcite/config/CalciteConnectionProperty.java
@@ -17,6 +17,8 @@
package org.apache.calcite.config;
import org.apache.calcite.avatica.ConnectionProperty;
+import org.apache.calcite.avatica.util.Casing;
+import org.apache.calcite.avatica.util.Quoting;
import org.apache.calcite.model.JsonSchema;
import org.apache.calcite.sql.validate.SqlConformanceEnum;
@@ -44,7 +46,7 @@ public enum CalciteConnectionProperty implements ConnectionProperty {
/** How NULL values should be sorted if neither NULLS FIRST nor NULLS LAST are
* specified. The default, HIGH, sorts NULL values the same as Oracle. */
DEFAULT_NULL_COLLATION("defaultNullCollation", Type.ENUM, NullCollation.HIGH,
- true),
+ true, NullCollation.class),
/** How many rows the Druid adapter should fetch at a time when executing
* "select" queries. */
@@ -62,15 +64,15 @@ public enum CalciteConnectionProperty implements ConnectionProperty {
/** How identifiers are quoted.
* If not specified, value from {@link #LEX} is used. */
- QUOTING("quoting", Type.ENUM, null, false),
+ QUOTING("quoting", Type.ENUM, null, false, Quoting.class),
/** How identifiers are stored if they are quoted.
* If not specified, value from {@link #LEX} is used. */
- QUOTED_CASING("quotedCasing", Type.ENUM, null, false),
+ QUOTED_CASING("quotedCasing", Type.ENUM, null, false, Casing.class),
/** How identifiers are stored if they are not quoted.
* If not specified, value from {@link #LEX} is used. */
- UNQUOTED_CASING("unquotedCasing", Type.ENUM, null, false),
+ UNQUOTED_CASING("unquotedCasing", Type.ENUM, null, false, Casing.class),
/** Whether identifiers are matched case-sensitively.
* If not specified, value from {@link #LEX} is used. */
@@ -91,10 +93,9 @@ public enum CalciteConnectionProperty implements ConnectionProperty {
*
* <p>Value may be null, "MAP", "JDBC", or "CUSTOM"
* (implicit if {@link #SCHEMA_FACTORY} is specified).
- * The value "NONE" is converted to null.
*
* <p>Ignored if {@link #MODEL} is specified. */
- SCHEMA_TYPE("schemaType", Type.ENUM, JsonSchema.Type.NONE, false),
+ SCHEMA_TYPE("schemaType", Type.ENUM, null, false, JsonSchema.Type.class),
/** Specifies whether Spark should be used as the engine for processing that
* cannot be pushed to the source system. If false (the default), Calcite
@@ -120,6 +121,7 @@ public enum CalciteConnectionProperty implements ConnectionProperty {
private final Type type;
private final Object defaultValue;
private final boolean required;
+ private final Class valueClass;
private static final Map<String, CalciteConnectionProperty> NAME_TO_PROPS;
@@ -137,11 +139,19 @@ public enum CalciteConnectionProperty implements ConnectionProperty {
CalciteConnectionProperty(String camelName, Type type, Object defaultValue,
boolean required) {
+ this(camelName, type, defaultValue, required, null);
+ }
+
+ CalciteConnectionProperty(String camelName, Type type, Object defaultValue,
+ boolean required, Class valueClass) {
this.camelName = camelName;
this.type = type;
this.defaultValue = defaultValue;
this.required = required;
- assert defaultValue == null || type.valid(defaultValue);
+ this.valueClass = type.deduceValueClass(defaultValue, valueClass);
+ if (!type.valid(defaultValue, this.valueClass)) {
+ throw new AssertionError(camelName);
+ }
}
public String camelName() {
@@ -156,6 +166,10 @@ public enum CalciteConnectionProperty implements ConnectionProperty {
return type;
}
+ public Class valueClass() {
+ return valueClass;
+ }
+
public boolean required() {
return required;
}
http://git-wip-us.apache.org/repos/asf/calcite/blob/b22733c7/core/src/main/java/org/apache/calcite/jdbc/CalciteConnectionImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/jdbc/CalciteConnectionImpl.java b/core/src/main/java/org/apache/calcite/jdbc/CalciteConnectionImpl.java
index 5eebb38..98a1994 100644
--- a/core/src/main/java/org/apache/calcite/jdbc/CalciteConnectionImpl.java
+++ b/core/src/main/java/org/apache/calcite/jdbc/CalciteConnectionImpl.java
@@ -219,6 +219,12 @@ abstract class CalciteConnectionImpl
}
}
+ @Override public AtomicBoolean getCancelFlag(Meta.StatementHandle handle)
+ throws NoSuchStatementException {
+ final CalciteServerStatement serverStatement = server.getStatement(handle);
+ return ((CalciteServerStatementImpl) serverStatement).cancelFlag;
+ }
+
// CalciteConnection methods
public SchemaPlus getRootSchema() {
@@ -289,14 +295,6 @@ abstract class CalciteConnectionImpl
return signature.enumerable(dataContext);
}
- /** Returns the flag that is used to request or check cancel for a particular
- * statement. */
- AtomicBoolean getCancelFlag(Meta.StatementHandle handle)
- throws NoSuchStatementException {
- final CalciteServerStatement serverStatement = server.getStatement(handle);
- return ((CalciteServerStatementImpl) serverStatement).cancelFlag;
- }
-
public DataContext createDataContext(Map<String, Object> parameterValues) {
if (config().spark()) {
return new SlimDataContext();
http://git-wip-us.apache.org/repos/asf/calcite/blob/b22733c7/core/src/main/java/org/apache/calcite/jdbc/CalciteMetaImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/jdbc/CalciteMetaImpl.java b/core/src/main/java/org/apache/calcite/jdbc/CalciteMetaImpl.java
index 168f356..daf6e8b 100644
--- a/core/src/main/java/org/apache/calcite/jdbc/CalciteMetaImpl.java
+++ b/core/src/main/java/org/apache/calcite/jdbc/CalciteMetaImpl.java
@@ -178,7 +178,7 @@ public class CalciteMetaImpl extends MetaImpl {
} catch (NoSuchFieldException e) {
throw new RuntimeException(e);
}
- columns.add(columnMetaData(name, index, field.getType()));
+ columns.add(columnMetaData(name, index, field.getType(), false));
fields.add(field);
fieldNames.add(fieldName);
}
@@ -463,16 +463,16 @@ public class CalciteMetaImpl extends MetaImpl {
typeSystem.getLiteral(sqlTypeName, true),
typeSystem.getLiteral(sqlTypeName, false),
// All types are nullable
- DatabaseMetaData.typeNullable,
+ (short) DatabaseMetaData.typeNullable,
typeSystem.isCaseSensitive(sqlTypeName),
// Making all type searchable; we may want to
// be specific and declare under SqlTypeName
- DatabaseMetaData.typeSearchable,
+ (short) DatabaseMetaData.typeSearchable,
false,
false,
typeSystem.isAutoincrement(sqlTypeName),
- sqlTypeName.getMinScale(),
- typeSystem.getMaxScale(sqlTypeName),
+ (short) sqlTypeName.getMinScale(),
+ (short) typeSystem.getMaxScale(sqlTypeName),
typeSystem.getNumTypeRadix(sqlTypeName)));
}
return allTypeList.build();
http://git-wip-us.apache.org/repos/asf/calcite/blob/b22733c7/core/src/main/java/org/apache/calcite/jdbc/CalciteResultSet.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/jdbc/CalciteResultSet.java b/core/src/main/java/org/apache/calcite/jdbc/CalciteResultSet.java
index e62417a..e022a66 100644
--- a/core/src/main/java/org/apache/calcite/jdbc/CalciteResultSet.java
+++ b/core/src/main/java/org/apache/calcite/jdbc/CalciteResultSet.java
@@ -22,7 +22,6 @@ import org.apache.calcite.avatica.AvaticaStatement;
import org.apache.calcite.avatica.ColumnMetaData;
import org.apache.calcite.avatica.Handler;
import org.apache.calcite.avatica.Meta;
-import org.apache.calcite.avatica.NoSuchStatementException;
import org.apache.calcite.avatica.util.Cursor;
import org.apache.calcite.linq4j.Enumerator;
import org.apache.calcite.linq4j.Linq4j;
@@ -30,7 +29,6 @@ import org.apache.calcite.rel.RelCollation;
import org.apache.calcite.runtime.ArrayEnumeratorCursor;
import org.apache.calcite.runtime.ObjectEnumeratorCursor;
-import com.google.common.base.Throwables;
import com.google.common.collect.ImmutableList;
import java.sql.ResultSet;
@@ -38,27 +36,19 @@ import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.util.List;
import java.util.TimeZone;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import static org.apache.calcite.util.Static.RESOURCE;
/**
* Implementation of {@link ResultSet}
* for the Calcite engine.
*/
public class CalciteResultSet extends AvaticaResultSet {
- private final AtomicBoolean cancelFlag;
+ /** Creates a CalciteResultSet. */
CalciteResultSet(AvaticaStatement statement,
CalcitePrepare.CalciteSignature calciteSignature,
ResultSetMetaData resultSetMetaData, TimeZone timeZone,
Meta.Frame firstFrame) {
super(statement, null, calciteSignature, resultSetMetaData, timeZone, firstFrame);
- try {
- cancelFlag = getCalciteConnection().getCancelFlag(statement.handle);
- } catch (NoSuchStatementException e) {
- throw Throwables.propagate(e);
- }
}
@Override protected CalciteResultSet execute() throws SQLException {
@@ -78,18 +68,6 @@ public class CalciteResultSet extends AvaticaResultSet {
return this;
}
- @Override protected void cancel() {
- cancelFlag.compareAndSet(false, true);
- }
-
- @Override public boolean next() throws SQLException {
- final boolean next = super.next();
- if (cancelFlag.get()) {
- throw new SQLException(RESOURCE.statementCanceled().str());
- }
- return next;
- }
-
@Override public ResultSet create(ColumnMetaData.AvaticaType elementType,
Iterable<Object> iterable) {
final List<ColumnMetaData> columnMetaDataList;
http://git-wip-us.apache.org/repos/asf/calcite/blob/b22733c7/core/src/main/java/org/apache/calcite/model/JsonSchema.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/model/JsonSchema.java b/core/src/main/java/org/apache/calcite/model/JsonSchema.java
index 94ab89d..f9517e8 100644
--- a/core/src/main/java/org/apache/calcite/model/JsonSchema.java
+++ b/core/src/main/java/org/apache/calcite/model/JsonSchema.java
@@ -106,7 +106,6 @@ public abstract class JsonSchema {
/** Built-in schema types. */
public enum Type {
- NONE,
MAP,
JDBC,
CUSTOM
http://git-wip-us.apache.org/repos/asf/calcite/blob/b22733c7/core/src/main/java/org/apache/calcite/runtime/CalciteResource.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/runtime/CalciteResource.java b/core/src/main/java/org/apache/calcite/runtime/CalciteResource.java
index f9cdf50..9a3cb8d 100644
--- a/core/src/main/java/org/apache/calcite/runtime/CalciteResource.java
+++ b/core/src/main/java/org/apache/calcite/runtime/CalciteResource.java
@@ -622,8 +622,6 @@ public interface CalciteResource {
@BaseMessage("SELECT must have a FROM clause")
ExInst<SqlValidatorException> selectMissingFrom();
- @BaseMessage("Statement canceled")
- Inst statementCanceled();
}
// End CalciteResource.java
http://git-wip-us.apache.org/repos/asf/calcite/blob/b22733c7/core/src/main/resources/org/apache/calcite/runtime/CalciteResource.properties
----------------------------------------------------------------------
diff --git a/core/src/main/resources/org/apache/calcite/runtime/CalciteResource.properties b/core/src/main/resources/org/apache/calcite/runtime/CalciteResource.properties
index b21e5a5..8297cf2 100644
--- a/core/src/main/resources/org/apache/calcite/runtime/CalciteResource.properties
+++ b/core/src/main/resources/org/apache/calcite/runtime/CalciteResource.properties
@@ -203,5 +203,4 @@ StarRequiresRecordType=Not a record type. The ''*'' operator requires a record
FilterMustBeBoolean=FILTER expression must be of type BOOLEAN
CannotStreamResultsForNonStreamingInputs=Cannot stream results of a query with no streaming inputs: ''{0}''. At least one input should be convertible to a stream
SelectMissingFrom=SELECT must have a FROM clause
-StatementCanceled=Statement canceled
# End CalciteResource.properties
http://git-wip-us.apache.org/repos/asf/calcite/blob/b22733c7/core/src/test/java/org/apache/calcite/test/JdbcTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/calcite/test/JdbcTest.java b/core/src/test/java/org/apache/calcite/test/JdbcTest.java
index 678846c..0eede43 100644
--- a/core/src/test/java/org/apache/calcite/test/JdbcTest.java
+++ b/core/src/test/java/org/apache/calcite/test/JdbcTest.java
@@ -5373,11 +5373,11 @@ public class JdbcTest {
// columns
assertEquals(
- "TABLE_CAT=null; TABLE_SCHEM=adhoc; TABLE_NAME=V; COLUMN_NAME=empid; DATA_TYPE=4; TYPE_NAME=JavaType(int) NOT NULL; COLUMN_SIZE=-1; BUFFER_LENGTH=null; DECIMAL_DIGITS=null; NUM_PREC_RADIX=10; NULLABLE=0; REMARKS=null; COLUMN_DEF=null; SQL_DATA_TYPE=null; SQL_DATETIME_SUB=null; CHAR_OCTET_LENGTH=-1; ORDINAL_POSITION=1; IS_NULLABLE=NO; SCOPE_CATALOG=null; SCOPE_SCHEMA=null; SCOPE_TABLE=null; SOURCE_DATA_TYPE=null; IS_AUTOINCREMENT=null; IS_GENERATEDCOLUMN=null\n"
- + "TABLE_CAT=null; TABLE_SCHEM=adhoc; TABLE_NAME=V; COLUMN_NAME=deptno; DATA_TYPE=4; TYPE_NAME=JavaType(int) NOT NULL; COLUMN_SIZE=-1; BUFFER_LENGTH=null; DECIMAL_DIGITS=null; NUM_PREC_RADIX=10; NULLABLE=0; REMARKS=null; COLUMN_DEF=null; SQL_DATA_TYPE=null; SQL_DATETIME_SUB=null; CHAR_OCTET_LENGTH=-1; ORDINAL_POSITION=2; IS_NULLABLE=NO; SCOPE_CATALOG=null; SCOPE_SCHEMA=null; SCOPE_TABLE=null; SOURCE_DATA_TYPE=null; IS_AUTOINCREMENT=null; IS_GENERATEDCOLUMN=null\n"
- + "TABLE_CAT=null; TABLE_SCHEM=adhoc; TABLE_NAME=V; COLUMN_NAME=name; DATA_TYPE=12; TYPE_NAME=JavaType(class java.lang.String); COLUMN_SIZE=-1; BUFFER_LENGTH=null; DECIMAL_DIGITS=null; NUM_PREC_RADIX=10; NULLABLE=1; REMARKS=null; COLUMN_DEF=null; SQL_DATA_TYPE=null; SQL_DATETIME_SUB=null; CHAR_OCTET_LENGTH=-1; ORDINAL_POSITION=3; IS_NULLABLE=YES; SCOPE_CATALOG=null; SCOPE_SCHEMA=null; SCOPE_TABLE=null; SOURCE_DATA_TYPE=null; IS_AUTOINCREMENT=null; IS_GENERATEDCOLUMN=null\n"
- + "TABLE_CAT=null; TABLE_SCHEM=adhoc; TABLE_NAME=V; COLUMN_NAME=salary; DATA_TYPE=7; TYPE_NAME=JavaType(float) NOT NULL; COLUMN_SIZE=-1; BUFFER_LENGTH=null; DECIMAL_DIGITS=null; NUM_PREC_RADIX=10; NULLABLE=0; REMARKS=null; COLUMN_DEF=null; SQL_DATA_TYPE=null; SQL_DATETIME_SUB=null; CHAR_OCTET_LENGTH=-1; ORDINAL_POSITION=4; IS_NULLABLE=NO; SCOPE_CATALOG=null; SCOPE_SCHEMA=null; SCOPE_TABLE=null; SOURCE_DATA_TYPE=null; IS_AUTOINCREMENT=null; IS_GENERATEDCOLUMN=null\n"
- + "TABLE_CAT=null; TABLE_SCHEM=adhoc; TABLE_NAME=V; COLUMN_NAME=commission; DATA_TYPE=4; TYPE_NAME=JavaType(class java.lang.Integer); COLUMN_SIZE=-1; BUFFER_LENGTH=null; DECIMAL_DIGITS=null; NUM_PREC_RADIX=10; NULLABLE=1; REMARKS=null; COLUMN_DEF=null; SQL_DATA_TYPE=null; SQL_DATETIME_SUB=null; CHAR_OCTET_LENGTH=-1; ORDINAL_POSITION=5; IS_NULLABLE=YES; SCOPE_CATALOG=null; SCOPE_SCHEMA=null; SCOPE_TABLE=null; SOURCE_DATA_TYPE=null; IS_AUTOINCREMENT=null; IS_GENERATEDCOLUMN=null\n",
+ "TABLE_CAT=null; TABLE_SCHEM=adhoc; TABLE_NAME=V; COLUMN_NAME=empid; DATA_TYPE=4; TYPE_NAME=JavaType(int) NOT NULL; COLUMN_SIZE=-1; BUFFER_LENGTH=null; DECIMAL_DIGITS=null; NUM_PREC_RADIX=10; NULLABLE=0; REMARKS=null; COLUMN_DEF=null; SQL_DATA_TYPE=null; SQL_DATETIME_SUB=null; CHAR_OCTET_LENGTH=-1; ORDINAL_POSITION=1; IS_NULLABLE=NO; SCOPE_CATALOG=null; SCOPE_SCHEMA=null; SCOPE_TABLE=null; SOURCE_DATA_TYPE=null; IS_AUTOINCREMENT=; IS_GENERATEDCOLUMN=\n"
+ + "TABLE_CAT=null; TABLE_SCHEM=adhoc; TABLE_NAME=V; COLUMN_NAME=deptno; DATA_TYPE=4; TYPE_NAME=JavaType(int) NOT NULL; COLUMN_SIZE=-1; BUFFER_LENGTH=null; DECIMAL_DIGITS=null; NUM_PREC_RADIX=10; NULLABLE=0; REMARKS=null; COLUMN_DEF=null; SQL_DATA_TYPE=null; SQL_DATETIME_SUB=null; CHAR_OCTET_LENGTH=-1; ORDINAL_POSITION=2; IS_NULLABLE=NO; SCOPE_CATALOG=null; SCOPE_SCHEMA=null; SCOPE_TABLE=null; SOURCE_DATA_TYPE=null; IS_AUTOINCREMENT=; IS_GENERATEDCOLUMN=\n"
+ + "TABLE_CAT=null; TABLE_SCHEM=adhoc; TABLE_NAME=V; COLUMN_NAME=name; DATA_TYPE=12; TYPE_NAME=JavaType(class java.lang.String); COLUMN_SIZE=-1; BUFFER_LENGTH=null; DECIMAL_DIGITS=null; NUM_PREC_RADIX=10; NULLABLE=1; REMARKS=null; COLUMN_DEF=null; SQL_DATA_TYPE=null; SQL_DATETIME_SUB=null; CHAR_OCTET_LENGTH=-1; ORDINAL_POSITION=3; IS_NULLABLE=YES; SCOPE_CATALOG=null; SCOPE_SCHEMA=null; SCOPE_TABLE=null; SOURCE_DATA_TYPE=null; IS_AUTOINCREMENT=; IS_GENERATEDCOLUMN=\n"
+ + "TABLE_CAT=null; TABLE_SCHEM=adhoc; TABLE_NAME=V; COLUMN_NAME=salary; DATA_TYPE=7; TYPE_NAME=JavaType(float) NOT NULL; COLUMN_SIZE=-1; BUFFER_LENGTH=null; DECIMAL_DIGITS=null; NUM_PREC_RADIX=10; NULLABLE=0; REMARKS=null; COLUMN_DEF=null; SQL_DATA_TYPE=null; SQL_DATETIME_SUB=null; CHAR_OCTET_LENGTH=-1; ORDINAL_POSITION=4; IS_NULLABLE=NO; SCOPE_CATALOG=null; SCOPE_SCHEMA=null; SCOPE_TABLE=null; SOURCE_DATA_TYPE=null; IS_AUTOINCREMENT=; IS_GENERATEDCOLUMN=\n"
+ + "TABLE_CAT=null; TABLE_SCHEM=adhoc; TABLE_NAME=V; COLUMN_NAME=commission; DATA_TYPE=4; TYPE_NAME=JavaType(class java.lang.Integer); COLUMN_SIZE=-1; BUFFER_LENGTH=null; DECIMAL_DIGITS=null; NUM_PREC_RADIX=10; NULLABLE=1; REMARKS=null; COLUMN_DEF=null; SQL_DATA_TYPE=null; SQL_DATETIME_SUB=null; CHAR_OCTET_LENGTH=-1; ORDINAL_POSITION=5; IS_NULLABLE=YES; SCOPE_CATALOG=null; SCOPE_SCHEMA=null; SCOPE_TABLE=null; SOURCE_DATA_TYPE=null; IS_AUTOINCREMENT=; IS_GENERATEDCOLUMN=\n",
CalciteAssert.toString(
metaData.getColumns(
null, "adhoc", "V", null)));
http://git-wip-us.apache.org/repos/asf/calcite/blob/b22733c7/druid/pom.xml
----------------------------------------------------------------------
diff --git a/druid/pom.xml b/druid/pom.xml
index d74c87e..16a7db1 100644
--- a/druid/pom.xml
+++ b/druid/pom.xml
@@ -38,7 +38,7 @@ limitations under the License.
in dependencyManagement in the root POM, not here. -->
<dependency>
<groupId>org.apache.calcite.avatica</groupId>
- <artifactId>avatica</artifactId>
+ <artifactId>avatica-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.calcite</groupId>
@@ -57,6 +57,14 @@ limitations under the License.
</dependency>
<dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ </dependency>
+ <dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
</dependency>
http://git-wip-us.apache.org/repos/asf/calcite/blob/b22733c7/elasticsearch/pom.xml
----------------------------------------------------------------------
diff --git a/elasticsearch/pom.xml b/elasticsearch/pom.xml
index 197b365..940e4af 100644
--- a/elasticsearch/pom.xml
+++ b/elasticsearch/pom.xml
@@ -40,10 +40,6 @@ limitations under the License.
<artifactId>guava</artifactId>
</dependency>
<dependency>
- <groupId>org.apache.calcite.avatica</groupId>
- <artifactId>avatica</artifactId>
- </dependency>
- <dependency>
<groupId>org.apache.calcite</groupId>
<artifactId>calcite-core</artifactId>
<type>jar</type>
@@ -55,6 +51,14 @@ limitations under the License.
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ </dependency>
+ <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
@@ -77,6 +81,10 @@ limitations under the License.
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
</dependencies>
<build>
http://git-wip-us.apache.org/repos/asf/calcite/blob/b22733c7/example/csv/pom.xml
----------------------------------------------------------------------
diff --git a/example/csv/pom.xml b/example/csv/pom.xml
index 0b30e69..ad6a1ef 100644
--- a/example/csv/pom.xml
+++ b/example/csv/pom.xml
@@ -36,10 +36,6 @@ limitations under the License.
<dependencies>
<dependency>
- <groupId>org.apache.calcite.avatica</groupId>
- <artifactId>avatica</artifactId>
- </dependency>
- <dependency>
<groupId>org.apache.calcite</groupId>
<artifactId>calcite-core</artifactId>
</dependency>
@@ -49,6 +45,14 @@ limitations under the License.
</dependency>
<dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ </dependency>
+ <dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
http://git-wip-us.apache.org/repos/asf/calcite/blob/b22733c7/mongodb/pom.xml
----------------------------------------------------------------------
diff --git a/mongodb/pom.xml b/mongodb/pom.xml
index 9661673..a0d80bd 100644
--- a/mongodb/pom.xml
+++ b/mongodb/pom.xml
@@ -37,10 +37,6 @@ limitations under the License.
<!-- Sorted by groupId, artifactId; calcite dependencies first. Put versions
in dependencyManagement in the root POM, not here. -->
<dependency>
- <groupId>org.apache.calcite.avatica</groupId>
- <artifactId>avatica</artifactId>
- </dependency>
- <dependency>
<groupId>org.apache.calcite</groupId>
<artifactId>calcite-core</artifactId>
<type>jar</type>
http://git-wip-us.apache.org/repos/asf/calcite/blob/b22733c7/piglet/pom.xml
----------------------------------------------------------------------
diff --git a/piglet/pom.xml b/piglet/pom.xml
index f56ab85..8a3fb23 100644
--- a/piglet/pom.xml
+++ b/piglet/pom.xml
@@ -38,7 +38,7 @@ limitations under the License.
in dependencyManagement in the root POM, not here. -->
<dependency>
<groupId>org.apache.calcite.avatica</groupId>
- <artifactId>avatica</artifactId>
+ <artifactId>avatica-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.calcite</groupId>
http://git-wip-us.apache.org/repos/asf/calcite/blob/b22733c7/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index a9ff6a6..e5f80e3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -53,7 +53,7 @@ limitations under the License.
<!-- This list is in alphabetical order. -->
<airlift-tpch.version>0.1</airlift-tpch.version>
- <avatica.version>1.8.0</avatica.version>
+ <avatica.version>1.9.0</avatica.version>
<build-helper-maven-plugin.version>1.9</build-helper-maven-plugin.version>
<cassandra-driver-core.version>3.0.0</cassandra-driver-core.version>
<checksum-maven-plugin.version>1.2</checksum-maven-plugin.version>
@@ -107,14 +107,13 @@ limitations under the License.
<oracle-jdbc6-driver.version>11.2.0.2.0</oracle-jdbc6-driver.version>
<pentaho-aggdesigner.version>5.1.5-jhyde</pentaho-aggdesigner.version>
<postgresql.version>9.3-1102-jdbc3</postgresql.version>
- <protobuf.version>3.0.0-beta-1</protobuf.version>
<quidem.version>0.7</quidem.version>
<scala.version>2.10.3</scala.version>
<scott-data-hsqldb.version>0.1</scott-data-hsqldb.version>
<servlet.version>3.0.1</servlet.version>
<slf4j.version>1.7.13</slf4j.version>
<spark.version>1.6.1</spark.version>
- <sqlline.version>1.1.9</sqlline.version>
+ <sqlline.version>1.2.0</sqlline.version>
<xalan.version>2.7.1</xalan.version>
<xerces.version>2.9.1</xerces.version>
</properties>
@@ -156,7 +155,7 @@ limitations under the License.
<!-- Sorted by groupId, artifactId; calcite (and avatica) dependencies first. -->
<dependency>
<groupId>org.apache.calcite.avatica</groupId>
- <artifactId>avatica</artifactId>
+ <artifactId>avatica-core</artifactId>
<version>${avatica.version}</version>
</dependency>
<dependency>
@@ -228,11 +227,6 @@ limitations under the License.
<version>${guava.version}</version>
</dependency>
<dependency>
- <groupId>com.google.protobuf</groupId>
- <artifactId>protobuf-java</artifactId>
- <version>${protobuf.version}</version>
- </dependency>
- <dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>${oracle-jdbc6-driver.version}</version>
http://git-wip-us.apache.org/repos/asf/calcite/blob/b22733c7/splunk/pom.xml
----------------------------------------------------------------------
diff --git a/splunk/pom.xml b/splunk/pom.xml
index 68a4eae..4e42782 100644
--- a/splunk/pom.xml
+++ b/splunk/pom.xml
@@ -38,7 +38,7 @@ limitations under the License.
in dependencyManagement in the root POM, not here. -->
<dependency>
<groupId>org.apache.calcite.avatica</groupId>
- <artifactId>avatica</artifactId>
+ <artifactId>avatica-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.calcite</groupId>