diff --git a/core/cml-main/pom.xml b/core/cml-main/pom.xml
index fc21a3e6e..bd3ddc86e 100644
--- a/core/cml-main/pom.xml
+++ b/core/cml-main/pom.xml
@@ -32,11 +32,6 @@
log
-
- com.carrotsearch
- hppc
-
-
com.google.api
gax
@@ -63,11 +58,6 @@
-
- com.google.code.findbugs
- jsr305
-
-
com.google.guava
guava
@@ -83,51 +73,14 @@
guice
-
- commons-codec
- commons-codec
-
-
io.cml
cml-spi
-
- io.netty
- netty-all
-
-
javax.inject
javax.inject
-
-
- joda-time
- joda-time
-
-
-
- org.antlr
- antlr4-runtime
-
-
-
-
-
- org.antlr
- antlr4-maven-plugin
- ${dep.antlr.version}
-
-
-
- antlr4
-
-
-
-
-
-
diff --git a/core/cml-main/src/main/java/io/cml/connector/bigquery/BigQueryConnector.java b/core/cml-main/src/main/java/io/cml/connector/bigquery/BigQueryConnector.java
index 389cf4029..4d4dd35be 100644
--- a/core/cml-main/src/main/java/io/cml/connector/bigquery/BigQueryConnector.java
+++ b/core/cml-main/src/main/java/io/cml/connector/bigquery/BigQueryConnector.java
@@ -30,7 +30,7 @@ import io.cml.spi.connector.Connector;
import io.cml.spi.metadata.MetadataUtil;
import io.cml.spi.metadata.SchemaTableName;
import io.cml.spi.metadata.TableMetadata;
-import io.cml.type.VarcharType;
+import io.cml.spi.type.VarcharType;
import javax.inject.Inject;
diff --git a/core/cml-postgres-wire-protocol/pom.xml b/core/cml-postgres-wire-protocol/pom.xml
index 5d09749fa..520a3f7e6 100644
--- a/core/cml-postgres-wire-protocol/pom.xml
+++ b/core/cml-postgres-wire-protocol/pom.xml
@@ -54,11 +54,6 @@
guice
-
- io.cml
- cml-main
-
-
io.cml
cml-spi
diff --git a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/builder/BigQueryPgCatalogTableBuilder.java b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/builder/BigQueryPgCatalogTableBuilder.java
index 1116a9137..16b185a05 100644
--- a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/builder/BigQueryPgCatalogTableBuilder.java
+++ b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/builder/BigQueryPgCatalogTableBuilder.java
@@ -32,9 +32,9 @@ import static io.cml.pgcatalog.builder.BigQueryUtils.createOrReplaceAllColumn;
import static io.cml.pgcatalog.builder.BigQueryUtils.createOrReplaceAllTable;
import static io.cml.pgcatalog.builder.BigQueryUtils.getOidToBqType;
import static io.cml.pgcatalog.builder.PgCatalogTableBuilderUtils.generatePgTypeRecords;
-import static io.cml.type.CharType.CHAR;
-import static io.cml.type.RegprocType.REGPROC;
-import static io.cml.type.VarcharType.VARCHAR;
+import static io.cml.spi.type.CharType.CHAR;
+import static io.cml.spi.type.RegprocType.REGPROC;
+import static io.cml.spi.type.VarcharType.VARCHAR;
import static java.lang.String.format;
import static java.util.stream.Collectors.joining;
diff --git a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/builder/BigQueryPgFunctionBuilder.java b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/builder/BigQueryPgFunctionBuilder.java
index a26ce0136..bd4022948 100644
--- a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/builder/BigQueryPgFunctionBuilder.java
+++ b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/builder/BigQueryPgFunctionBuilder.java
@@ -3,7 +3,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -25,7 +25,7 @@ import java.util.Locale;
import static io.cml.pgcatalog.PgCatalogUtils.PG_CATALOG_NAME;
import static io.cml.pgcatalog.builder.BigQueryUtils.getOidToBqType;
import static io.cml.spi.metadata.StandardErrorCode.GENERIC_INTERNAL_ERROR;
-import static io.cml.type.VarcharType.VARCHAR;
+import static io.cml.spi.type.VarcharType.VARCHAR;
import static java.lang.String.format;
public class BigQueryPgFunctionBuilder
diff --git a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/builder/BigQueryUtils.java b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/builder/BigQueryUtils.java
index 48e5a39dc..dee138610 100644
--- a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/builder/BigQueryUtils.java
+++ b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/builder/BigQueryUtils.java
@@ -16,33 +16,33 @@ package io.cml.pgcatalog.builder;
import com.google.common.collect.ImmutableMap;
import io.cml.spi.connector.Connector;
-import io.cml.type.PGArray;
+import io.cml.spi.type.PGArray;
import java.util.List;
import java.util.Map;
import static io.cml.pgcatalog.PgCatalogUtils.CML_TEMP_NAME;
-import static io.cml.type.BigIntType.BIGINT;
-import static io.cml.type.BooleanType.BOOLEAN;
-import static io.cml.type.BpCharType.BPCHAR;
-import static io.cml.type.ByteaType.BYTEA;
-import static io.cml.type.CharType.CHAR;
-import static io.cml.type.DateType.DATE;
-import static io.cml.type.DoubleType.DOUBLE;
-import static io.cml.type.InetType.INET;
-import static io.cml.type.IntegerType.INTEGER;
-import static io.cml.type.JsonType.JSON;
-import static io.cml.type.NumericType.NUMERIC;
-import static io.cml.type.OidType.OID_INSTANCE;
-import static io.cml.type.RealType.REAL;
-import static io.cml.type.RegprocType.REGPROC;
-import static io.cml.type.SmallIntType.SMALLINT;
-import static io.cml.type.TimestampType.TIMESTAMP;
-import static io.cml.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIMEZONE;
-import static io.cml.type.UuidType.UUID;
-import static io.cml.type.VarcharType.NameType.NAME;
-import static io.cml.type.VarcharType.TextType.TEXT;
-import static io.cml.type.VarcharType.VARCHAR;
+import static io.cml.spi.type.BigIntType.BIGINT;
+import static io.cml.spi.type.BooleanType.BOOLEAN;
+import static io.cml.spi.type.BpCharType.BPCHAR;
+import static io.cml.spi.type.ByteaType.BYTEA;
+import static io.cml.spi.type.CharType.CHAR;
+import static io.cml.spi.type.DateType.DATE;
+import static io.cml.spi.type.DoubleType.DOUBLE;
+import static io.cml.spi.type.InetType.INET;
+import static io.cml.spi.type.IntegerType.INTEGER;
+import static io.cml.spi.type.JsonType.JSON;
+import static io.cml.spi.type.NumericType.NUMERIC;
+import static io.cml.spi.type.OidType.OID_INSTANCE;
+import static io.cml.spi.type.RealType.REAL;
+import static io.cml.spi.type.RegprocType.REGPROC;
+import static io.cml.spi.type.SmallIntType.SMALLINT;
+import static io.cml.spi.type.TimestampType.TIMESTAMP;
+import static io.cml.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIMEZONE;
+import static io.cml.spi.type.UuidType.UUID;
+import static io.cml.spi.type.VarcharType.NameType.NAME;
+import static io.cml.spi.type.VarcharType.TextType.TEXT;
+import static io.cml.spi.type.VarcharType.VARCHAR;
import static java.lang.String.format;
public final class BigQueryUtils
diff --git a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/builder/PgCatalogTableBuilderUtils.java b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/builder/PgCatalogTableBuilderUtils.java
index 3f8387211..9977aeeb4 100644
--- a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/builder/PgCatalogTableBuilderUtils.java
+++ b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/builder/PgCatalogTableBuilderUtils.java
@@ -17,7 +17,7 @@ package io.cml.pgcatalog.builder;
import com.google.common.collect.Streams;
import io.cml.pgcatalog.OidHash;
import io.cml.pgcatalog.table.PgCatalogTable;
-import io.cml.type.PGTypes;
+import io.cml.spi.type.PGTypes;
import java.util.List;
import java.util.Map;
diff --git a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/builder/PgFunctionBuilder.java b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/builder/PgFunctionBuilder.java
index 1372a1b30..c4d2da71d 100644
--- a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/builder/PgFunctionBuilder.java
+++ b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/builder/PgFunctionBuilder.java
@@ -3,7 +3,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/function/PgFunction.java b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/function/PgFunction.java
index 2076ccad9..ef09374f4 100644
--- a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/function/PgFunction.java
+++ b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/function/PgFunction.java
@@ -3,7 +3,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/function/PgFunctions.java b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/function/PgFunctions.java
index 7cacec1ff..80c621a4f 100644
--- a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/function/PgFunctions.java
+++ b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/function/PgFunctions.java
@@ -3,7 +3,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -19,9 +19,9 @@ import com.google.common.collect.ImmutableList;
import static io.cml.pgcatalog.function.PgFunction.Argument.argument;
import static io.cml.pgcatalog.function.PgFunction.Language.SQL;
import static io.cml.pgcatalog.function.PgFunction.builder;
-import static io.cml.type.BigIntType.BIGINT;
-import static io.cml.type.IntegerType.INTEGER;
-import static io.cml.type.VarcharType.VARCHAR;
+import static io.cml.spi.type.BigIntType.BIGINT;
+import static io.cml.spi.type.IntegerType.INTEGER;
+import static io.cml.spi.type.VarcharType.VARCHAR;
public final class PgFunctions
{
diff --git a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/regtype/BigQueryPgMetadata.java b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/regtype/BigQueryPgMetadata.java
index dfc769380..82bc098ec 100644
--- a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/regtype/BigQueryPgMetadata.java
+++ b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/regtype/BigQueryPgMetadata.java
@@ -3,7 +3,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/regtype/PgMetadata.java b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/regtype/PgMetadata.java
index 043106698..752d20638 100644
--- a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/regtype/PgMetadata.java
+++ b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/regtype/PgMetadata.java
@@ -3,7 +3,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/regtype/RegClassFactory.java b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/regtype/RegClassFactory.java
index 45e7f9b95..38b5b2042 100644
--- a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/regtype/RegClassFactory.java
+++ b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/regtype/RegClassFactory.java
@@ -3,7 +3,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/regtype/RegObject.java b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/regtype/RegObject.java
index f8cd68548..3700ffe86 100644
--- a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/regtype/RegObject.java
+++ b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/regtype/RegObject.java
@@ -3,7 +3,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/regtype/RegObjectFactory.java b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/regtype/RegObjectFactory.java
index 04ceb640e..e8240b36a 100644
--- a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/regtype/RegObjectFactory.java
+++ b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/regtype/RegObjectFactory.java
@@ -3,7 +3,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/regtype/RegProcFactory.java b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/regtype/RegProcFactory.java
index 27cfcbc8b..e3f4551a6 100644
--- a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/regtype/RegProcFactory.java
+++ b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/regtype/RegProcFactory.java
@@ -3,7 +3,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/CharacterSets.java b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/CharacterSets.java
index 0a4657eb3..4a44d4cec 100644
--- a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/CharacterSets.java
+++ b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/CharacterSets.java
@@ -17,7 +17,7 @@ package io.cml.pgcatalog.table;
import io.cml.spi.metadata.TableMetadata;
import static io.cml.pgcatalog.table.PgCatalogTableUtils.table;
-import static io.cml.type.VarcharType.VARCHAR;
+import static io.cml.spi.type.VarcharType.VARCHAR;
public class CharacterSets
extends PgCatalogTable
diff --git a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/KeyColumnUsage.java b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/KeyColumnUsage.java
index a8ba7182f..955d1f69b 100644
--- a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/KeyColumnUsage.java
+++ b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/KeyColumnUsage.java
@@ -16,7 +16,7 @@ package io.cml.pgcatalog.table;
import io.cml.spi.metadata.TableMetadata;
-import static io.cml.type.VarcharType.VARCHAR;
+import static io.cml.spi.type.VarcharType.VARCHAR;
public class KeyColumnUsage
extends PgCatalogTable
diff --git a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgAmTable.java b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgAmTable.java
index 1d1c7576c..1e526fdf5 100644
--- a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgAmTable.java
+++ b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgAmTable.java
@@ -16,9 +16,9 @@ package io.cml.pgcatalog.table;
import io.cml.spi.metadata.TableMetadata;
import static io.cml.pgcatalog.table.PgCatalogTableUtils.table;
-import static io.cml.type.CharType.CHAR;
-import static io.cml.type.IntegerType.INTEGER;
-import static io.cml.type.VarcharType.VARCHAR;
+import static io.cml.spi.type.CharType.CHAR;
+import static io.cml.spi.type.IntegerType.INTEGER;
+import static io.cml.spi.type.VarcharType.VARCHAR;
/**
* this table is unused in Cannerflow, so just an empty table
diff --git a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgAttrdefTable.java b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgAttrdefTable.java
index 6117ee278..b52a3ca38 100644
--- a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgAttrdefTable.java
+++ b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgAttrdefTable.java
@@ -17,8 +17,8 @@ package io.cml.pgcatalog.table;
import io.cml.spi.metadata.TableMetadata;
import static io.cml.pgcatalog.table.PgCatalogTableUtils.table;
-import static io.cml.type.IntegerType.INTEGER;
-import static io.cml.type.VarcharType.VARCHAR;
+import static io.cml.spi.type.IntegerType.INTEGER;
+import static io.cml.spi.type.VarcharType.VARCHAR;
/**
* this table is unused in Cannerflow, so just an empty table
diff --git a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgAttributeTable.java b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgAttributeTable.java
index 186d271fc..f59849912 100644
--- a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgAttributeTable.java
+++ b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgAttributeTable.java
@@ -16,11 +16,11 @@ package io.cml.pgcatalog.table;
import io.cml.spi.metadata.TableMetadata;
import static io.cml.pgcatalog.table.PgCatalogTableUtils.table;
-import static io.cml.type.BooleanType.BOOLEAN;
-import static io.cml.type.CharType.CHAR;
-import static io.cml.type.IntegerType.INTEGER;
-import static io.cml.type.PGArray.VARCHAR_ARRAY;
-import static io.cml.type.VarcharType.VARCHAR;
+import static io.cml.spi.type.BooleanType.BOOLEAN;
+import static io.cml.spi.type.CharType.CHAR;
+import static io.cml.spi.type.IntegerType.INTEGER;
+import static io.cml.spi.type.PGArray.VARCHAR_ARRAY;
+import static io.cml.spi.type.VarcharType.VARCHAR;
/**
* this table is unused in Cannerflow, so just an empty table
diff --git a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgClassTable.java b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgClassTable.java
index d8f099c19..c19ee678a 100644
--- a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgClassTable.java
+++ b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgClassTable.java
@@ -15,14 +15,14 @@
package io.cml.pgcatalog.table;
import io.cml.spi.metadata.TableMetadata;
-import io.cml.type.BooleanType;
+import io.cml.spi.type.BooleanType;
import static io.cml.pgcatalog.table.PgCatalogTableUtils.table;
-import static io.cml.type.BooleanType.BOOLEAN;
-import static io.cml.type.DoubleType.DOUBLE;
-import static io.cml.type.IntegerType.INTEGER;
-import static io.cml.type.PGArray.VARCHAR_ARRAY;
-import static io.cml.type.VarcharType.VARCHAR;
+import static io.cml.spi.type.BooleanType.BOOLEAN;
+import static io.cml.spi.type.DoubleType.DOUBLE;
+import static io.cml.spi.type.IntegerType.INTEGER;
+import static io.cml.spi.type.PGArray.VARCHAR_ARRAY;
+import static io.cml.spi.type.VarcharType.VARCHAR;
/**
* @see PostgreSQL pg_class
diff --git a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgConstraintTable.java b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgConstraintTable.java
index 230e4ce4e..ff0c19825 100644
--- a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgConstraintTable.java
+++ b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgConstraintTable.java
@@ -17,11 +17,11 @@ package io.cml.pgcatalog.table;
import io.cml.spi.metadata.TableMetadata;
import static io.cml.pgcatalog.table.PgCatalogTableUtils.table;
-import static io.cml.type.BooleanType.BOOLEAN;
-import static io.cml.type.CharType.CHAR;
-import static io.cml.type.IntegerType.INTEGER;
-import static io.cml.type.PGArray.INT4_ARRAY;
-import static io.cml.type.VarcharType.VARCHAR;
+import static io.cml.spi.type.BooleanType.BOOLEAN;
+import static io.cml.spi.type.CharType.CHAR;
+import static io.cml.spi.type.IntegerType.INTEGER;
+import static io.cml.spi.type.PGArray.INT4_ARRAY;
+import static io.cml.spi.type.VarcharType.VARCHAR;
/**
* this table is unused in Cannerflow, so just an empty table
diff --git a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgDatabaseTable.java b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgDatabaseTable.java
index 22e028d57..873d524e2 100644
--- a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgDatabaseTable.java
+++ b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgDatabaseTable.java
@@ -16,10 +16,10 @@ package io.cml.pgcatalog.table;
import io.cml.spi.metadata.TableMetadata;
-import static io.cml.type.BooleanType.BOOLEAN;
-import static io.cml.type.IntegerType.INTEGER;
-import static io.cml.type.PGArray.VARCHAR_ARRAY;
-import static io.cml.type.VarcharType.VARCHAR;
+import static io.cml.spi.type.BooleanType.BOOLEAN;
+import static io.cml.spi.type.IntegerType.INTEGER;
+import static io.cml.spi.type.PGArray.VARCHAR_ARRAY;
+import static io.cml.spi.type.VarcharType.VARCHAR;
/**
* @see PostgreSQL pg_database
diff --git a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgDescriptionTable.java b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgDescriptionTable.java
index c09aac21c..12cff2f44 100644
--- a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgDescriptionTable.java
+++ b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgDescriptionTable.java
@@ -17,8 +17,8 @@ package io.cml.pgcatalog.table;
import io.cml.spi.metadata.TableMetadata;
import static io.cml.pgcatalog.table.PgCatalogTableUtils.table;
-import static io.cml.type.IntegerType.INTEGER;
-import static io.cml.type.VarcharType.VARCHAR;
+import static io.cml.spi.type.IntegerType.INTEGER;
+import static io.cml.spi.type.VarcharType.VARCHAR;
/**
* this table is unused in Cannerflow, so just an empty table
diff --git a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgEnumTable.java b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgEnumTable.java
index 68a8f978f..6d0d9142b 100644
--- a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgEnumTable.java
+++ b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgEnumTable.java
@@ -17,9 +17,9 @@ package io.cml.pgcatalog.table;
import io.cml.spi.metadata.TableMetadata;
import static io.cml.pgcatalog.table.PgCatalogTableUtils.table;
-import static io.cml.type.DoubleType.DOUBLE;
-import static io.cml.type.IntegerType.INTEGER;
-import static io.cml.type.VarcharType.VARCHAR;
+import static io.cml.spi.type.DoubleType.DOUBLE;
+import static io.cml.spi.type.IntegerType.INTEGER;
+import static io.cml.spi.type.VarcharType.VARCHAR;
/**
* this table is unused in Cannerflow, so just an empty table
diff --git a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgIndexTable.java b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgIndexTable.java
index 2669fa5c0..b130aee5d 100644
--- a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgIndexTable.java
+++ b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgIndexTable.java
@@ -17,10 +17,10 @@ package io.cml.pgcatalog.table;
import io.cml.spi.metadata.TableMetadata;
import static io.cml.pgcatalog.table.PgCatalogTableUtils.table;
-import static io.cml.type.BooleanType.BOOLEAN;
-import static io.cml.type.IntegerType.INTEGER;
-import static io.cml.type.PGArray.INT4_ARRAY;
-import static io.cml.type.PGArray.VARCHAR_ARRAY;
+import static io.cml.spi.type.BooleanType.BOOLEAN;
+import static io.cml.spi.type.IntegerType.INTEGER;
+import static io.cml.spi.type.PGArray.INT4_ARRAY;
+import static io.cml.spi.type.PGArray.VARCHAR_ARRAY;
/**
* this table is unused in Cannerflow, so just an empty table
diff --git a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgNamespaceTable.java b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgNamespaceTable.java
index 8d44b25c5..c05d51df8 100644
--- a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgNamespaceTable.java
+++ b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgNamespaceTable.java
@@ -17,9 +17,9 @@ package io.cml.pgcatalog.table;
import io.cml.spi.metadata.TableMetadata;
import static io.cml.pgcatalog.table.PgCatalogTableUtils.table;
-import static io.cml.type.IntegerType.INTEGER;
-import static io.cml.type.PGArray.VARCHAR_ARRAY;
-import static io.cml.type.VarcharType.VARCHAR;
+import static io.cml.spi.type.IntegerType.INTEGER;
+import static io.cml.spi.type.PGArray.VARCHAR_ARRAY;
+import static io.cml.spi.type.VarcharType.VARCHAR;
/**
* @see PostgreSQL pg_namespace
diff --git a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgProcTable.java b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgProcTable.java
index ba6e0a77a..267bd46dc 100644
--- a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgProcTable.java
+++ b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgProcTable.java
@@ -17,15 +17,15 @@ package io.cml.pgcatalog.table;
import io.cml.spi.metadata.TableMetadata;
import static io.cml.pgcatalog.table.PgCatalogTableUtils.table;
-import static io.cml.type.BooleanType.BOOLEAN;
-import static io.cml.type.CharType.CHAR;
-import static io.cml.type.DoubleType.DOUBLE;
-import static io.cml.type.IntegerType.INTEGER;
-import static io.cml.type.PGArray.CHAR_ARRAY;
-import static io.cml.type.PGArray.INT4_ARRAY;
-import static io.cml.type.PGArray.VARCHAR_ARRAY;
-import static io.cml.type.RegprocType.REGPROC;
-import static io.cml.type.VarcharType.VARCHAR;
+import static io.cml.spi.type.BooleanType.BOOLEAN;
+import static io.cml.spi.type.CharType.CHAR;
+import static io.cml.spi.type.DoubleType.DOUBLE;
+import static io.cml.spi.type.IntegerType.INTEGER;
+import static io.cml.spi.type.PGArray.CHAR_ARRAY;
+import static io.cml.spi.type.PGArray.INT4_ARRAY;
+import static io.cml.spi.type.PGArray.VARCHAR_ARRAY;
+import static io.cml.spi.type.RegprocType.REGPROC;
+import static io.cml.spi.type.VarcharType.VARCHAR;
/**
* @see PostgreSQL pg_proc
diff --git a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgRangeTable.java b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgRangeTable.java
index 660de5dc4..66091bc84 100644
--- a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgRangeTable.java
+++ b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgRangeTable.java
@@ -16,8 +16,8 @@ package io.cml.pgcatalog.table;
import io.cml.spi.metadata.TableMetadata;
import static io.cml.pgcatalog.table.PgCatalogTableUtils.table;
-import static io.cml.type.IntegerType.INTEGER;
-import static io.cml.type.VarcharType.VARCHAR;
+import static io.cml.spi.type.IntegerType.INTEGER;
+import static io.cml.spi.type.VarcharType.VARCHAR;
/**
* this table is unused in Cannerflow, so just an empty table
diff --git a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgRolesTable.java b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgRolesTable.java
index 5f4961d58..5a13adcb4 100644
--- a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgRolesTable.java
+++ b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgRolesTable.java
@@ -16,11 +16,11 @@ package io.cml.pgcatalog.table;
import io.cml.spi.metadata.TableMetadata;
-import static io.cml.type.BooleanType.BOOLEAN;
-import static io.cml.type.IntegerType.INTEGER;
-import static io.cml.type.PGArray.VARCHAR_ARRAY;
-import static io.cml.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIMEZONE;
-import static io.cml.type.VarcharType.VARCHAR;
+import static io.cml.spi.type.BooleanType.BOOLEAN;
+import static io.cml.spi.type.IntegerType.INTEGER;
+import static io.cml.spi.type.PGArray.VARCHAR_ARRAY;
+import static io.cml.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIMEZONE;
+import static io.cml.spi.type.VarcharType.VARCHAR;
/**
* this table is unused in Cannerflow, so just an empty table
diff --git a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgSettingsTable.java b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgSettingsTable.java
index f5b0dabf1..6ef3f20c6 100644
--- a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgSettingsTable.java
+++ b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgSettingsTable.java
@@ -15,10 +15,10 @@ package io.cml.pgcatalog.table;
import io.cml.spi.metadata.TableMetadata;
-import static io.cml.type.BooleanType.BOOLEAN;
-import static io.cml.type.IntegerType.INTEGER;
-import static io.cml.type.PGArray.VARCHAR_ARRAY;
-import static io.cml.type.VarcharType.VARCHAR;
+import static io.cml.spi.type.BooleanType.BOOLEAN;
+import static io.cml.spi.type.IntegerType.INTEGER;
+import static io.cml.spi.type.PGArray.VARCHAR_ARRAY;
+import static io.cml.spi.type.VarcharType.VARCHAR;
/**
* this table is unused in Cannerflow, so just an empty table
diff --git a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgTablespaceTable.java b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgTablespaceTable.java
index 29bdd6e6f..7e985b9d7 100644
--- a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgTablespaceTable.java
+++ b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgTablespaceTable.java
@@ -17,9 +17,9 @@ package io.cml.pgcatalog.table;
import io.cml.spi.metadata.TableMetadata;
import static io.cml.pgcatalog.table.PgCatalogTableUtils.table;
-import static io.cml.type.IntegerType.INTEGER;
-import static io.cml.type.PGArray.VARCHAR_ARRAY;
-import static io.cml.type.VarcharType.VARCHAR;
+import static io.cml.spi.type.IntegerType.INTEGER;
+import static io.cml.spi.type.PGArray.VARCHAR_ARRAY;
+import static io.cml.spi.type.VarcharType.VARCHAR;
/**
* this table is unused in Cannerflow, so just an empty table
diff --git a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgTypeTable.java b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgTypeTable.java
index cba5328ca..858703429 100644
--- a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgTypeTable.java
+++ b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/PgTypeTable.java
@@ -16,11 +16,11 @@ package io.cml.pgcatalog.table;
import io.cml.spi.metadata.TableMetadata;
import static io.cml.pgcatalog.table.PgCatalogTableUtils.table;
-import static io.cml.type.BooleanType.BOOLEAN;
-import static io.cml.type.CharType.CHAR;
-import static io.cml.type.IntegerType.INTEGER;
-import static io.cml.type.RegprocType.REGPROC;
-import static io.cml.type.VarcharType.VARCHAR;
+import static io.cml.spi.type.BooleanType.BOOLEAN;
+import static io.cml.spi.type.CharType.CHAR;
+import static io.cml.spi.type.IntegerType.INTEGER;
+import static io.cml.spi.type.RegprocType.REGPROC;
+import static io.cml.spi.type.VarcharType.VARCHAR;
/**
* @see PostgreSQL pg_type
diff --git a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/ReferentialConstraints.java b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/ReferentialConstraints.java
index ff59077b3..14cfcba7f 100644
--- a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/ReferentialConstraints.java
+++ b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/ReferentialConstraints.java
@@ -17,7 +17,7 @@ package io.cml.pgcatalog.table;
import io.cml.spi.metadata.TableMetadata;
import static io.cml.pgcatalog.table.PgCatalogTableUtils.table;
-import static io.cml.type.VarcharType.VARCHAR;
+import static io.cml.spi.type.VarcharType.VARCHAR;
public class ReferentialConstraints
extends PgCatalogTable
diff --git a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/TableConstraints.java b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/TableConstraints.java
index ee0776832..9253da5d6 100644
--- a/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/TableConstraints.java
+++ b/core/cml-postgres-wire-protocol/src/main/java/io/cml/pgcatalog/table/TableConstraints.java
@@ -17,7 +17,7 @@ package io.cml.pgcatalog.table;
import io.cml.spi.metadata.TableMetadata;
import static io.cml.pgcatalog.table.PgCatalogTableUtils.table;
-import static io.cml.type.VarcharType.VARCHAR;
+import static io.cml.spi.type.VarcharType.VARCHAR;
public class TableConstraints
extends PgCatalogTable
diff --git a/core/cml-postgres-wire-protocol/src/main/java/io/cml/sql/PgOidTypeTableInfo.java b/core/cml-postgres-wire-protocol/src/main/java/io/cml/sql/PgOidTypeTableInfo.java
index 29932acb7..02260ced2 100644
--- a/core/cml-postgres-wire-protocol/src/main/java/io/cml/sql/PgOidTypeTableInfo.java
+++ b/core/cml-postgres-wire-protocol/src/main/java/io/cml/sql/PgOidTypeTableInfo.java
@@ -3,7 +3,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/core/cml-postgres-wire-protocol/src/main/java/io/cml/sql/RegObjectInterpreter.java b/core/cml-postgres-wire-protocol/src/main/java/io/cml/sql/RegObjectInterpreter.java
index cd8d7aa12..f0bc1bce3 100644
--- a/core/cml-postgres-wire-protocol/src/main/java/io/cml/sql/RegObjectInterpreter.java
+++ b/core/cml-postgres-wire-protocol/src/main/java/io/cml/sql/RegObjectInterpreter.java
@@ -3,7 +3,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/core/cml-postgres-wire-protocol/src/main/java/io/cml/wireprotocol/BaseRewriteVisitor.java b/core/cml-postgres-wire-protocol/src/main/java/io/cml/wireprotocol/BaseRewriteVisitor.java
index a35dd8825..ee2f23a8a 100644
--- a/core/cml-postgres-wire-protocol/src/main/java/io/cml/wireprotocol/BaseRewriteVisitor.java
+++ b/core/cml-postgres-wire-protocol/src/main/java/io/cml/wireprotocol/BaseRewriteVisitor.java
@@ -3,7 +3,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/core/cml-postgres-wire-protocol/src/main/java/io/cml/wireprotocol/PostgresWireProtocol.java b/core/cml-postgres-wire-protocol/src/main/java/io/cml/wireprotocol/PostgresWireProtocol.java
index 0985f54e9..9071e6a9c 100644
--- a/core/cml-postgres-wire-protocol/src/main/java/io/cml/wireprotocol/PostgresWireProtocol.java
+++ b/core/cml-postgres-wire-protocol/src/main/java/io/cml/wireprotocol/PostgresWireProtocol.java
@@ -19,7 +19,7 @@ import io.airlift.log.Logger;
import io.cml.spi.CmlException;
import io.cml.spi.Column;
import io.cml.spi.type.PGType;
-import io.cml.type.PGTypes;
+import io.cml.spi.type.PGTypes;
import io.cml.wireprotocol.ssl.SslReqHandler;
import io.netty.buffer.ByteBuf;
import io.netty.channel.Channel;
diff --git a/core/cml-postgres-wire-protocol/src/main/java/io/cml/wireprotocol/ssl/SslContextProvider.java b/core/cml-postgres-wire-protocol/src/main/java/io/cml/wireprotocol/ssl/SslContextProvider.java
index 5f4947b19..a7e44ac2f 100644
--- a/core/cml-postgres-wire-protocol/src/main/java/io/cml/wireprotocol/ssl/SslContextProvider.java
+++ b/core/cml-postgres-wire-protocol/src/main/java/io/cml/wireprotocol/ssl/SslContextProvider.java
@@ -3,7 +3,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/core/cml-postgres-wire-protocol/src/test/java/io/cml/pgcatalog/regtype/TestingPgMetadata.java b/core/cml-postgres-wire-protocol/src/test/java/io/cml/pgcatalog/regtype/TestingPgMetadata.java
index facf42eb1..64416666b 100644
--- a/core/cml-postgres-wire-protocol/src/test/java/io/cml/pgcatalog/regtype/TestingPgMetadata.java
+++ b/core/cml-postgres-wire-protocol/src/test/java/io/cml/pgcatalog/regtype/TestingPgMetadata.java
@@ -3,7 +3,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/core/cml-postgres-wire-protocol/src/test/java/io/cml/wireprotocol/TestPostgreSqlRewrite.java b/core/cml-postgres-wire-protocol/src/test/java/io/cml/wireprotocol/TestPostgreSqlRewrite.java
index 720acb542..bcafde309 100644
--- a/core/cml-postgres-wire-protocol/src/test/java/io/cml/wireprotocol/TestPostgreSqlRewrite.java
+++ b/core/cml-postgres-wire-protocol/src/test/java/io/cml/wireprotocol/TestPostgreSqlRewrite.java
@@ -3,7 +3,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/core/cml-server/src/main/java/io/cml/server/module/BigQueryConnectorModule.java b/core/cml-server/src/main/java/io/cml/server/module/BigQueryConnectorModule.java
index f5bf45ff6..fa40a4dd4 100644
--- a/core/cml-server/src/main/java/io/cml/server/module/BigQueryConnectorModule.java
+++ b/core/cml-server/src/main/java/io/cml/server/module/BigQueryConnectorModule.java
@@ -3,7 +3,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/core/cml-server/src/main/java/io/cml/server/module/PostgresWireProtocolModule.java b/core/cml-server/src/main/java/io/cml/server/module/PostgresWireProtocolModule.java
index c2b20fd45..95f05f9d3 100644
--- a/core/cml-server/src/main/java/io/cml/server/module/PostgresWireProtocolModule.java
+++ b/core/cml-server/src/main/java/io/cml/server/module/PostgresWireProtocolModule.java
@@ -3,7 +3,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/core/cml-spi/pom.xml b/core/cml-spi/pom.xml
index 15164af79..6061e0a63 100644
--- a/core/cml-spi/pom.xml
+++ b/core/cml-spi/pom.xml
@@ -23,6 +23,11 @@
log
+
+ com.carrotsearch
+ hppc
+
+
com.fasterxml.jackson.core
jackson-annotations
@@ -34,11 +39,26 @@
true
+
+ commons-codec
+ commons-codec
+
+
io.netty
netty-all
+
+ joda-time
+ joda-time
+
+
+
+ org.antlr
+ antlr4-runtime
+
+
com.google.guava
guava
@@ -101,4 +121,21 @@
+
+
+
+
+ org.antlr
+ antlr4-maven-plugin
+ ${dep.antlr.version}
+
+
+
+ antlr4
+
+
+
+
+
+
diff --git a/core/cml-main/src/main/antlr4/io/cml/spi/type/parser/antlr/v4/PgArray.g4 b/core/cml-spi/src/main/antlr4/io/cml/spi/type/parser/antlr/v4/PgArray.g4
similarity index 100%
rename from core/cml-main/src/main/antlr4/io/cml/spi/type/parser/antlr/v4/PgArray.g4
rename to core/cml-spi/src/main/antlr4/io/cml/spi/type/parser/antlr/v4/PgArray.g4
diff --git a/core/cml-main/src/main/antlr4/io/cml/spi/type/parser/antlr/v4/PgDateTimeFormat.g4 b/core/cml-spi/src/main/antlr4/io/cml/spi/type/parser/antlr/v4/PgDateTimeFormat.g4
similarity index 100%
rename from core/cml-main/src/main/antlr4/io/cml/spi/type/parser/antlr/v4/PgDateTimeFormat.g4
rename to core/cml-spi/src/main/antlr4/io/cml/spi/type/parser/antlr/v4/PgDateTimeFormat.g4
diff --git a/core/cml-main/src/main/antlr4/io/cml/spi/type/parser/antlr/v4/PgNumericFormat.g4 b/core/cml-spi/src/main/antlr4/io/cml/spi/type/parser/antlr/v4/PgNumericFormat.g4
similarity index 100%
rename from core/cml-main/src/main/antlr4/io/cml/spi/type/parser/antlr/v4/PgNumericFormat.g4
rename to core/cml-spi/src/main/antlr4/io/cml/spi/type/parser/antlr/v4/PgNumericFormat.g4
diff --git a/core/cml-main/src/main/java/io/cml/type/AnyType.java b/core/cml-spi/src/main/java/io/cml/spi/type/AnyType.java
similarity index 97%
rename from core/cml-main/src/main/java/io/cml/type/AnyType.java
rename to core/cml-spi/src/main/java/io/cml/spi/type/AnyType.java
index 4778b8dd1..bc720d52d 100644
--- a/core/cml-main/src/main/java/io/cml/type/AnyType.java
+++ b/core/cml-spi/src/main/java/io/cml/spi/type/AnyType.java
@@ -12,9 +12,8 @@
* limitations under the License.
*/
-package io.cml.type;
+package io.cml.spi.type;
-import io.cml.spi.type.PGType;
import io.netty.buffer.ByteBuf;
import javax.annotation.Nonnull;
diff --git a/core/cml-main/src/main/java/io/cml/type/BaseTimestampType.java b/core/cml-spi/src/main/java/io/cml/spi/type/BaseTimestampType.java
similarity index 85%
rename from core/cml-main/src/main/java/io/cml/type/BaseTimestampType.java
rename to core/cml-spi/src/main/java/io/cml/spi/type/BaseTimestampType.java
index eff87b245..2bff4ff90 100644
--- a/core/cml-main/src/main/java/io/cml/type/BaseTimestampType.java
+++ b/core/cml-spi/src/main/java/io/cml/spi/type/BaseTimestampType.java
@@ -12,16 +12,13 @@
* limitations under the License.
*/
-package io.cml.type;
+package io.cml.spi.type;
-import io.cml.spi.type.PGType;
import io.netty.buffer.ByteBuf;
import javax.annotation.Nonnull;
import static com.google.common.base.Preconditions.checkArgument;
-import static io.cml.type.PgDatetimeUtils.toPgTimestamp;
-import static io.cml.type.PgDatetimeUtils.toTrinoTimestamp;
import static java.lang.String.format;
abstract class BaseTimestampType
@@ -39,7 +36,7 @@ abstract class BaseTimestampType
public int writeAsBinary(ByteBuf buffer, @Nonnull Object value)
{
buffer.writeInt(TYPE_LEN);
- buffer.writeLong(toPgTimestamp((long) value));
+ buffer.writeLong(PgDatetimeUtils.toPgTimestamp((long) value));
return INT32_BYTE_SIZE + TYPE_LEN;
}
@@ -60,6 +57,6 @@ abstract class BaseTimestampType
{
checkArgument(valueLength == TYPE_LEN, format("valueLength must be %s because timestamp is a 64 bit long. Actual length is %s", TYPE_LEN, valueLength));
long microSecondsSince2K = buffer.readLong();
- return toTrinoTimestamp(microSecondsSince2K);
+ return PgDatetimeUtils.toTrinoTimestamp(microSecondsSince2K);
}
}
diff --git a/core/cml-main/src/main/java/io/cml/type/BigIntType.java b/core/cml-spi/src/main/java/io/cml/spi/type/BigIntType.java
similarity index 97%
rename from core/cml-main/src/main/java/io/cml/type/BigIntType.java
rename to core/cml-spi/src/main/java/io/cml/spi/type/BigIntType.java
index f5c6e920d..aaf402633 100644
--- a/core/cml-main/src/main/java/io/cml/type/BigIntType.java
+++ b/core/cml-spi/src/main/java/io/cml/spi/type/BigIntType.java
@@ -12,9 +12,8 @@
* limitations under the License.
*/
-package io.cml.type;
+package io.cml.spi.type;
-import io.cml.spi.type.PGType;
import io.netty.buffer.ByteBuf;
import javax.annotation.Nonnull;
diff --git a/core/cml-main/src/main/java/io/cml/type/BooleanType.java b/core/cml-spi/src/main/java/io/cml/spi/type/BooleanType.java
similarity index 98%
rename from core/cml-main/src/main/java/io/cml/type/BooleanType.java
rename to core/cml-spi/src/main/java/io/cml/spi/type/BooleanType.java
index 7d2637281..cbadaba33 100644
--- a/core/cml-main/src/main/java/io/cml/type/BooleanType.java
+++ b/core/cml-spi/src/main/java/io/cml/spi/type/BooleanType.java
@@ -12,10 +12,9 @@
* limitations under the License.
*/
-package io.cml.type;
+package io.cml.spi.type;
import com.google.common.collect.ImmutableSet;
-import io.cml.spi.type.PGType;
import io.netty.buffer.ByteBuf;
import javax.annotation.Nonnull;
diff --git a/core/cml-main/src/main/java/io/cml/type/BpCharType.java b/core/cml-spi/src/main/java/io/cml/spi/type/BpCharType.java
similarity index 97%
rename from core/cml-main/src/main/java/io/cml/type/BpCharType.java
rename to core/cml-spi/src/main/java/io/cml/spi/type/BpCharType.java
index acc767262..a546dc37a 100644
--- a/core/cml-main/src/main/java/io/cml/type/BpCharType.java
+++ b/core/cml-spi/src/main/java/io/cml/spi/type/BpCharType.java
@@ -12,9 +12,8 @@
* limitations under the License.
*/
-package io.cml.type;
+package io.cml.spi.type;
-import io.cml.spi.type.PGType;
import io.netty.buffer.ByteBuf;
import javax.annotation.Nonnull;
diff --git a/core/cml-main/src/main/java/io/cml/type/ByteaType.java b/core/cml-spi/src/main/java/io/cml/spi/type/ByteaType.java
similarity index 97%
rename from core/cml-main/src/main/java/io/cml/type/ByteaType.java
rename to core/cml-spi/src/main/java/io/cml/spi/type/ByteaType.java
index 1fad268d4..879a27497 100644
--- a/core/cml-main/src/main/java/io/cml/type/ByteaType.java
+++ b/core/cml-spi/src/main/java/io/cml/spi/type/ByteaType.java
@@ -12,9 +12,8 @@
* limitations under the License.
*/
-package io.cml.type;
+package io.cml.spi.type;
-import io.cml.spi.type.PGType;
import io.netty.buffer.ByteBuf;
import org.apache.commons.codec.binary.Hex;
diff --git a/core/cml-main/src/main/java/io/cml/type/CharType.java b/core/cml-spi/src/main/java/io/cml/spi/type/CharType.java
similarity index 97%
rename from core/cml-main/src/main/java/io/cml/type/CharType.java
rename to core/cml-spi/src/main/java/io/cml/spi/type/CharType.java
index 86d896759..4e09e1cb7 100644
--- a/core/cml-main/src/main/java/io/cml/type/CharType.java
+++ b/core/cml-spi/src/main/java/io/cml/spi/type/CharType.java
@@ -12,9 +12,8 @@
* limitations under the License.
*/
-package io.cml.type;
+package io.cml.spi.type;
-import io.cml.spi.type.PGType;
import io.netty.buffer.ByteBuf;
import javax.annotation.Nonnull;
diff --git a/core/cml-main/src/main/java/io/cml/type/DateType.java b/core/cml-spi/src/main/java/io/cml/spi/type/DateType.java
similarity index 97%
rename from core/cml-main/src/main/java/io/cml/type/DateType.java
rename to core/cml-spi/src/main/java/io/cml/spi/type/DateType.java
index 241ca273a..a18757866 100644
--- a/core/cml-main/src/main/java/io/cml/type/DateType.java
+++ b/core/cml-spi/src/main/java/io/cml/spi/type/DateType.java
@@ -12,9 +12,8 @@
* limitations under the License.
*/
-package io.cml.type;
+package io.cml.spi.type;
-import io.cml.spi.type.PGType;
import io.netty.buffer.ByteBuf;
import javax.annotation.Nonnull;
diff --git a/core/cml-main/src/main/java/io/cml/type/DoubleType.java b/core/cml-spi/src/main/java/io/cml/spi/type/DoubleType.java
similarity index 97%
rename from core/cml-main/src/main/java/io/cml/type/DoubleType.java
rename to core/cml-spi/src/main/java/io/cml/spi/type/DoubleType.java
index 6456c7339..6a9034717 100644
--- a/core/cml-main/src/main/java/io/cml/type/DoubleType.java
+++ b/core/cml-spi/src/main/java/io/cml/spi/type/DoubleType.java
@@ -12,9 +12,8 @@
* limitations under the License.
*/
-package io.cml.type;
+package io.cml.spi.type;
-import io.cml.spi.type.PGType;
import io.netty.buffer.ByteBuf;
import javax.annotation.Nonnull;
diff --git a/core/cml-main/src/main/java/io/cml/type/HstoreType.java b/core/cml-spi/src/main/java/io/cml/spi/type/HstoreType.java
similarity index 98%
rename from core/cml-main/src/main/java/io/cml/type/HstoreType.java
rename to core/cml-spi/src/main/java/io/cml/spi/type/HstoreType.java
index 3aa0b4147..a14c6147d 100644
--- a/core/cml-main/src/main/java/io/cml/type/HstoreType.java
+++ b/core/cml-spi/src/main/java/io/cml/spi/type/HstoreType.java
@@ -12,9 +12,8 @@
* limitations under the License.
*/
-package io.cml.type;
+package io.cml.spi.type;
-import io.cml.spi.type.PGType;
import io.netty.buffer.ByteBuf;
import java.util.Map;
diff --git a/core/cml-main/src/main/java/io/cml/type/InetType.java b/core/cml-spi/src/main/java/io/cml/spi/type/InetType.java
similarity index 97%
rename from core/cml-main/src/main/java/io/cml/type/InetType.java
rename to core/cml-spi/src/main/java/io/cml/spi/type/InetType.java
index 778499a26..3b88655fe 100644
--- a/core/cml-main/src/main/java/io/cml/type/InetType.java
+++ b/core/cml-spi/src/main/java/io/cml/spi/type/InetType.java
@@ -12,9 +12,8 @@
* limitations under the License.
*/
-package io.cml.type;
+package io.cml.spi.type;
-import io.cml.spi.type.PGType;
import io.netty.buffer.ByteBuf;
import javax.annotation.Nonnull;
diff --git a/core/cml-main/src/main/java/io/cml/type/IntegerType.java b/core/cml-spi/src/main/java/io/cml/spi/type/IntegerType.java
similarity index 97%
rename from core/cml-main/src/main/java/io/cml/type/IntegerType.java
rename to core/cml-spi/src/main/java/io/cml/spi/type/IntegerType.java
index f5539bc25..fc9d8b750 100644
--- a/core/cml-main/src/main/java/io/cml/type/IntegerType.java
+++ b/core/cml-spi/src/main/java/io/cml/spi/type/IntegerType.java
@@ -12,9 +12,8 @@
* limitations under the License.
*/
-package io.cml.type;
+package io.cml.spi.type;
-import io.cml.spi.type.PGType;
import io.netty.buffer.ByteBuf;
import javax.annotation.Nonnull;
diff --git a/core/cml-main/src/main/java/io/cml/type/IntervalType.java b/core/cml-spi/src/main/java/io/cml/spi/type/IntervalType.java
similarity index 98%
rename from core/cml-main/src/main/java/io/cml/type/IntervalType.java
rename to core/cml-spi/src/main/java/io/cml/spi/type/IntervalType.java
index a6e01c29d..60ec8bc25 100644
--- a/core/cml-main/src/main/java/io/cml/type/IntervalType.java
+++ b/core/cml-spi/src/main/java/io/cml/spi/type/IntervalType.java
@@ -12,9 +12,8 @@
* limitations under the License.
*/
-package io.cml.type;
+package io.cml.spi.type;
-import io.cml.spi.type.PGType;
import io.netty.buffer.ByteBuf;
import org.joda.time.Period;
diff --git a/core/cml-main/src/main/java/io/cml/type/JsonType.java b/core/cml-spi/src/main/java/io/cml/spi/type/JsonType.java
similarity index 97%
rename from core/cml-main/src/main/java/io/cml/type/JsonType.java
rename to core/cml-spi/src/main/java/io/cml/spi/type/JsonType.java
index 3ab9fef2d..382ac3bab 100644
--- a/core/cml-main/src/main/java/io/cml/type/JsonType.java
+++ b/core/cml-spi/src/main/java/io/cml/spi/type/JsonType.java
@@ -12,9 +12,8 @@
* limitations under the License.
*/
-package io.cml.type;
+package io.cml.spi.type;
-import io.cml.spi.type.PGType;
import io.netty.buffer.ByteBuf;
import javax.annotation.Nonnull;
diff --git a/core/cml-main/src/main/java/io/cml/type/NumericType.java b/core/cml-spi/src/main/java/io/cml/spi/type/NumericType.java
similarity index 99%
rename from core/cml-main/src/main/java/io/cml/type/NumericType.java
rename to core/cml-spi/src/main/java/io/cml/spi/type/NumericType.java
index a0e5c3eaa..f53e2239d 100644
--- a/core/cml-main/src/main/java/io/cml/type/NumericType.java
+++ b/core/cml-spi/src/main/java/io/cml/spi/type/NumericType.java
@@ -12,9 +12,8 @@
* limitations under the License.
*/
-package io.cml.type;
+package io.cml.spi.type;
-import io.cml.spi.type.PGType;
import io.netty.buffer.ByteBuf;
import javax.annotation.Nonnull;
diff --git a/core/cml-main/src/main/java/io/cml/type/OidType.java b/core/cml-spi/src/main/java/io/cml/spi/type/OidType.java
similarity index 97%
rename from core/cml-main/src/main/java/io/cml/type/OidType.java
rename to core/cml-spi/src/main/java/io/cml/spi/type/OidType.java
index 0a9cdab66..9c456f9f0 100644
--- a/core/cml-main/src/main/java/io/cml/type/OidType.java
+++ b/core/cml-spi/src/main/java/io/cml/spi/type/OidType.java
@@ -12,9 +12,8 @@
* limitations under the License.
*/
-package io.cml.type;
+package io.cml.spi.type;
-import io.cml.spi.type.PGType;
import io.netty.buffer.ByteBuf;
import java.nio.charset.StandardCharsets;
diff --git a/core/cml-main/src/main/java/io/cml/type/PGArray.java b/core/cml-spi/src/main/java/io/cml/spi/type/PGArray.java
similarity index 96%
rename from core/cml-main/src/main/java/io/cml/type/PGArray.java
rename to core/cml-spi/src/main/java/io/cml/spi/type/PGArray.java
index 91f2c1f33..80b9c7897 100644
--- a/core/cml-main/src/main/java/io/cml/type/PGArray.java
+++ b/core/cml-spi/src/main/java/io/cml/spi/type/PGArray.java
@@ -12,12 +12,11 @@
* limitations under the License.
*/
-package io.cml.type;
+package io.cml.spi.type;
import com.google.common.collect.ImmutableList;
import com.google.common.primitives.Bytes;
-import io.cml.spi.type.PGType;
-import io.cml.type.parser.PgArrayParserWrapper;
+import io.cml.spi.type.parser.PgArrayParserWrapper;
import io.netty.buffer.ByteBuf;
import javax.annotation.Nonnull;
@@ -25,12 +24,10 @@ import javax.annotation.Nonnull;
import java.util.ArrayList;
import java.util.List;
-import static io.cml.type.BooleanType.BOOLEAN;
-import static io.cml.type.CharType.CHAR;
-import static io.cml.type.DateType.DATE;
-import static io.cml.type.IntegerType.INTEGER;
-import static io.cml.type.OidType.OID_INSTANCE;
-import static io.cml.type.UuidType.UUID;
+import static io.cml.spi.type.BooleanType.BOOLEAN;
+import static io.cml.spi.type.CharType.CHAR;
+import static io.cml.spi.type.DateType.DATE;
+import static io.cml.spi.type.IntegerType.INTEGER;
public class PGArray
extends PGType>
@@ -39,7 +36,7 @@ public class PGArray
public static final PGArray BPCHAR_ARRAY = new PGArray(1014, BpCharType.BPCHAR);
public static final PGArray INT2_ARRAY = new PGArray(1005, SmallIntType.SMALLINT);
public static final PGArray INT4_ARRAY = new PGArray(1007, INTEGER);
- public static final PGArray OID_ARRAY = new PGArray(1028, OID_INSTANCE);
+ public static final PGArray OID_ARRAY = new PGArray(1028, OidType.OID_INSTANCE);
public static final PGArray INT8_ARRAY = new PGArray(1016, BigIntType.BIGINT);
public static final PGArray FLOAT4_ARRAY = new PGArray(1021, RealType.REAL);
public static final PGArray FLOAT8_ARRAY = new PGArray(1022, DoubleType.DOUBLE);
@@ -52,7 +49,7 @@ public class PGArray
public static final PGArray TIMESTAMP_WITH_TIMEZONE_ARRAY = new PGArray(1185, TimestampWithTimeZoneType.TIMESTAMP_WITH_TIMEZONE);
public static final PGArray TIMESTAMP_ARRAY = new PGArray(1115, TimestampType.TIMESTAMP);
public static final PGArray DATE_ARRAY = new PGArray(1182, DATE);
- public static final PGArray UUID_ARRAY = new PGArray(2951, UUID);
+ public static final PGArray UUID_ARRAY = new PGArray(2951, UuidType.UUID);
public static final PGArray BYTEA_ARRAY = new PGArray(1001, ByteaType.BYTEA);
public static final PGArray INET_ARRAY = new PGArray(1041, InetType.INET);
public static final PGArray EMPTY_RECORD_ARRAY = new PGArray(2287, RecordType.EMPTY_RECORD);
diff --git a/core/cml-main/src/main/java/io/cml/type/PGTypes.java b/core/cml-spi/src/main/java/io/cml/spi/type/PGTypes.java
similarity index 60%
rename from core/cml-main/src/main/java/io/cml/type/PGTypes.java
rename to core/cml-spi/src/main/java/io/cml/spi/type/PGTypes.java
index bd6da4a77..b3768a0ec 100644
--- a/core/cml-main/src/main/java/io/cml/type/PGTypes.java
+++ b/core/cml-spi/src/main/java/io/cml/spi/type/PGTypes.java
@@ -12,39 +12,27 @@
* limitations under the License.
*/
-package io.cml.type;
+package io.cml.spi.type;
import com.google.common.collect.ImmutableMap;
-import io.cml.spi.type.PGType;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
-import static io.cml.type.AnyType.ANY;
-import static io.cml.type.BigIntType.BIGINT;
-import static io.cml.type.BooleanType.BOOLEAN;
-import static io.cml.type.BpCharType.BPCHAR;
-import static io.cml.type.ByteaType.BYTEA;
-import static io.cml.type.CharType.CHAR;
-import static io.cml.type.DateType.DATE;
-import static io.cml.type.DoubleType.DOUBLE;
-import static io.cml.type.HstoreType.HSTORE;
-import static io.cml.type.InetType.INET;
-import static io.cml.type.IntegerType.INTEGER;
-import static io.cml.type.JsonType.JSON;
-import static io.cml.type.NumericType.NUMERIC;
-import static io.cml.type.OidType.OID_INSTANCE;
-import static io.cml.type.RealType.REAL;
-import static io.cml.type.RecordType.EMPTY_RECORD;
-import static io.cml.type.SmallIntType.SMALLINT;
-import static io.cml.type.TimestampType.TIMESTAMP;
-import static io.cml.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIMEZONE;
-import static io.cml.type.UuidType.UUID;
-import static io.cml.type.VarcharType.NameType.NAME;
-import static io.cml.type.VarcharType.TextType.TEXT;
-import static io.cml.type.VarcharType.VARCHAR;
+import static io.cml.spi.type.BigIntType.BIGINT;
+import static io.cml.spi.type.BooleanType.BOOLEAN;
+import static io.cml.spi.type.CharType.CHAR;
+import static io.cml.spi.type.DateType.DATE;
+import static io.cml.spi.type.HstoreType.HSTORE;
+import static io.cml.spi.type.IntegerType.INTEGER;
+import static io.cml.spi.type.RealType.REAL;
+import static io.cml.spi.type.SmallIntType.SMALLINT;
+import static io.cml.spi.type.TimestampType.TIMESTAMP;
+import static io.cml.spi.type.VarcharType.NameType.NAME;
+import static io.cml.spi.type.VarcharType.TextType.TEXT;
+import static io.cml.spi.type.VarcharType.VARCHAR;
import static java.lang.String.format;
public final class PGTypes
@@ -60,26 +48,26 @@ public final class PGTypes
TYPE_TABLE.put(INTEGER.oid(), INTEGER);
TYPE_TABLE.put(BIGINT.oid(), BIGINT);
TYPE_TABLE.put(REAL.oid(), REAL);
- TYPE_TABLE.put(DOUBLE.oid(), DOUBLE);
- TYPE_TABLE.put(NUMERIC.oid(), NUMERIC);
+ TYPE_TABLE.put(DoubleType.DOUBLE.oid(), DoubleType.DOUBLE);
+ TYPE_TABLE.put(NumericType.NUMERIC.oid(), NumericType.NUMERIC);
TYPE_TABLE.put(VARCHAR.oid(), VARCHAR);
TYPE_TABLE.put(CHAR.oid(), CHAR);
- TYPE_TABLE.put(JSON.oid(), JSON);
+ TYPE_TABLE.put(JsonType.JSON.oid(), JsonType.JSON);
TYPE_TABLE.put(TIMESTAMP.oid(), TIMESTAMP);
- TYPE_TABLE.put(TIMESTAMP_WITH_TIMEZONE.oid(), TIMESTAMP_WITH_TIMEZONE);
+ TYPE_TABLE.put(TimestampWithTimeZoneType.TIMESTAMP_WITH_TIMEZONE.oid(), TimestampWithTimeZoneType.TIMESTAMP_WITH_TIMEZONE);
TYPE_TABLE.put(TEXT.oid(), TEXT);
TYPE_TABLE.put(NAME.oid(), NAME);
- TYPE_TABLE.put(OID_INSTANCE.oid(), OID_INSTANCE);
+ TYPE_TABLE.put(OidType.OID_INSTANCE.oid(), OidType.OID_INSTANCE);
TYPE_TABLE.put(DATE.oid(), DATE);
- TYPE_TABLE.put(BYTEA.oid(), BYTEA);
- TYPE_TABLE.put(BPCHAR.oid(), BPCHAR);
+ TYPE_TABLE.put(ByteaType.BYTEA.oid(), ByteaType.BYTEA);
+ TYPE_TABLE.put(BpCharType.BPCHAR.oid(), BpCharType.BPCHAR);
// we handle all unspecified type as text type.
TYPE_TABLE.put(0, TEXT);
- TYPE_TABLE.put(INET.oid(), INET);
- TYPE_TABLE.put(EMPTY_RECORD.oid(), EMPTY_RECORD);
+ TYPE_TABLE.put(InetType.INET.oid(), InetType.INET);
+ TYPE_TABLE.put(RecordType.EMPTY_RECORD.oid(), RecordType.EMPTY_RECORD);
// Just need a fake instance to do type mapping. We never use the field.
TYPE_TABLE.put(HSTORE.oid(), HSTORE);
- TYPE_TABLE.put(UUID.oid(), UUID);
+ TYPE_TABLE.put(UuidType.UUID.oid(), UuidType.UUID);
ImmutableMap.Builder innerToPgTypeBuilder = ImmutableMap.builder();
// initial collection types
@@ -92,7 +80,7 @@ public final class PGTypes
TYPES = new HashSet<>(TYPE_TABLE.values());
// the following polymorphic types are added manually,
// because there are no corresponding data types in Cannerflow
- TYPES.add(ANY);
+ TYPES.add(AnyType.ANY);
}
public static Iterable> pgTypes()
diff --git a/core/cml-main/src/main/java/io/cml/type/PgDatetimeUtils.java b/core/cml-spi/src/main/java/io/cml/spi/type/PgDatetimeUtils.java
similarity index 98%
rename from core/cml-main/src/main/java/io/cml/type/PgDatetimeUtils.java
rename to core/cml-spi/src/main/java/io/cml/spi/type/PgDatetimeUtils.java
index 59616899e..e080794f2 100644
--- a/core/cml-main/src/main/java/io/cml/type/PgDatetimeUtils.java
+++ b/core/cml-spi/src/main/java/io/cml/spi/type/PgDatetimeUtils.java
@@ -12,7 +12,7 @@
* limitations under the License.
*/
-package io.cml.type;
+package io.cml.spi.type;
public final class PgDatetimeUtils
{
diff --git a/core/cml-main/src/main/java/io/cml/type/PgOidVectorType.java b/core/cml-spi/src/main/java/io/cml/spi/type/PgOidVectorType.java
similarity index 97%
rename from core/cml-main/src/main/java/io/cml/type/PgOidVectorType.java
rename to core/cml-spi/src/main/java/io/cml/spi/type/PgOidVectorType.java
index 7aac3dc1a..cc32b0163 100644
--- a/core/cml-main/src/main/java/io/cml/type/PgOidVectorType.java
+++ b/core/cml-spi/src/main/java/io/cml/spi/type/PgOidVectorType.java
@@ -12,10 +12,9 @@
* limitations under the License.
*/
-package io.cml.type;
+package io.cml.spi.type;
import com.google.common.base.Joiner;
-import io.cml.spi.type.PGType;
import io.netty.buffer.ByteBuf;
import java.nio.charset.StandardCharsets;
diff --git a/core/cml-main/src/main/java/io/cml/type/RealType.java b/core/cml-spi/src/main/java/io/cml/spi/type/RealType.java
similarity index 97%
rename from core/cml-main/src/main/java/io/cml/type/RealType.java
rename to core/cml-spi/src/main/java/io/cml/spi/type/RealType.java
index 19174cf58..00cc788e1 100644
--- a/core/cml-main/src/main/java/io/cml/type/RealType.java
+++ b/core/cml-spi/src/main/java/io/cml/spi/type/RealType.java
@@ -12,9 +12,8 @@
* limitations under the License.
*/
-package io.cml.type;
+package io.cml.spi.type;
-import io.cml.spi.type.PGType;
import io.netty.buffer.ByteBuf;
import javax.annotation.Nonnull;
diff --git a/core/cml-main/src/main/java/io/cml/type/RecordType.java b/core/cml-spi/src/main/java/io/cml/spi/type/RecordType.java
similarity index 97%
rename from core/cml-main/src/main/java/io/cml/type/RecordType.java
rename to core/cml-spi/src/main/java/io/cml/spi/type/RecordType.java
index ad1997d72..f01be1d94 100644
--- a/core/cml-main/src/main/java/io/cml/type/RecordType.java
+++ b/core/cml-spi/src/main/java/io/cml/spi/type/RecordType.java
@@ -12,17 +12,16 @@
* limitations under the License.
*/
-package io.cml.type;
+package io.cml.spi.type;
import com.carrotsearch.hppc.ByteArrayList;
-import io.cml.spi.type.PGType;
import io.netty.buffer.ByteBuf;
import java.util.List;
import java.util.Map;
import static com.google.common.collect.ImmutableList.toImmutableList;
-import static io.cml.type.PGArray.EMPTY_RECORD_ARRAY;
+import static io.cml.spi.type.PGArray.EMPTY_RECORD_ARRAY;
public class RecordType
extends PGType