You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by gr...@apache.org on 2016/12/09 08:19:00 UTC
[1/2] phoenix git commit: Bring freemarker version in line with
Calcite
Repository: phoenix
Updated Branches:
refs/heads/calcite fd501521a -> 6f39c1055
Bring freemarker version in line with Calcite
Bump freemarker version up to 2.3.25-incubating to follow Calcite.
This new version supports updated syntax which is now used in
Parser.jj in Calcite, which means Phoenix also needs to use the
same freemarker version in order to process Parser.jj.
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/22b22c87
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/22b22c87
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/22b22c87
Branch: refs/heads/calcite
Commit: 22b22c87fecf5ebbccddbeb45385d0222c264d4b
Parents: fd50152
Author: Gabriel Reid <ga...@ngdata.com>
Authored: Fri Dec 9 08:37:05 2016 +0100
Committer: Gabriel Reid <ga...@ngdata.com>
Committed: Fri Dec 9 08:37:19 2016 +0100
----------------------------------------------------------------------
phoenix-core/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/phoenix/blob/22b22c87/phoenix-core/pom.xml
----------------------------------------------------------------------
diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml
index e1f7768..a846b05 100644
--- a/phoenix-core/pom.xml
+++ b/phoenix-core/pom.xml
@@ -118,7 +118,7 @@
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
- <version>2.3.19</version>
+ <version>2.3.25-incubating</version>
</dependency>
</dependencies>
<executions>
[2/2] phoenix git commit: Compatibility with latest Calcite
0.11.0-SNAPSHOT
Posted by gr...@apache.org.
Compatibility with latest Calcite 0.11.0-SNAPSHOT
Fix compilation errors building with latest Calcite 0.11.0 snapshot,
including:
* addition of source expression list to TableModify
* addition of create and drop statements to parser config
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/6f39c105
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/6f39c105
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/6f39c105
Branch: refs/heads/calcite
Commit: 6f39c105587c67072b7784ddbc47e2cad23f7c8c
Parents: 22b22c8
Author: Gabriel Reid <ga...@ngdata.com>
Authored: Fri Dec 9 09:08:55 2016 +0100
Committer: Gabriel Reid <ga...@ngdata.com>
Committed: Fri Dec 9 09:08:55 2016 +0100
----------------------------------------------------------------------
phoenix-core/src/main/codegen/data/Parser.tdd | 11 ++++++++++-
.../org/apache/calcite/jdbc/PhoenixCalciteFactory.java | 5 +++++
.../apache/phoenix/calcite/rel/PhoenixTableModify.java | 8 ++++++--
.../phoenix/calcite/rules/PhoenixConverterRules.java | 1 +
4 files changed, 22 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/phoenix/blob/6f39c105/phoenix-core/src/main/codegen/data/Parser.tdd
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/codegen/data/Parser.tdd b/phoenix-core/src/main/codegen/data/Parser.tdd
index 0df9d8c..89f8bfc 100644
--- a/phoenix-core/src/main/codegen/data/Parser.tdd
+++ b/phoenix-core/src/main/codegen/data/Parser.tdd
@@ -47,7 +47,6 @@
"ROW_TIMESTAMP"
"SPLIT"
"STATISTICS"
- "REPLACE"
"JAR"
"CONSTANT"
"DEFAULTVALUE"
@@ -97,6 +96,16 @@
alterStatementParserMethods: [
]
+ # List of methods for parsing extensions to "CREATE [OR REPLACE]" calls.
+ # Each must accept arguments "(SqlParserPos pos, boolean replace)".
+ createStatementParserMethods: [
+ ]
+
+ # List of methods for parsing extensions to "DROP" calls.
+ # Each must accept arguments "(SqlParserPos pos)".
+ dropStatementParserMethods: [
+ ]
+
# List of files in @includes directory that have parser method
# implementations for custom SQL statements, literals or types
# given as part of "statementParserMethods", "literalParserMethods" or
http://git-wip-us.apache.org/repos/asf/phoenix/blob/6f39c105/phoenix-core/src/main/java/org/apache/calcite/jdbc/PhoenixCalciteFactory.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/calcite/jdbc/PhoenixCalciteFactory.java b/phoenix-core/src/main/java/org/apache/calcite/jdbc/PhoenixCalciteFactory.java
index ef42737..d094ccd 100644
--- a/phoenix-core/src/main/java/org/apache/calcite/jdbc/PhoenixCalciteFactory.java
+++ b/phoenix-core/src/main/java/org/apache/calcite/jdbc/PhoenixCalciteFactory.java
@@ -630,6 +630,11 @@ public class PhoenixCalciteFactory extends CalciteFactory {
}
@Override
+ public <T> T parserFactory(Class<T> parserFactoryClass, T defaultParserFactory) {
+ return delegate.parserFactory(parserFactoryClass, defaultParserFactory);
+ }
+
+ @Override
public <T> T schemaFactory(Class<T> schemaFactoryClass, T defaultSchemaFactory) {
return delegate.schemaFactory(schemaFactoryClass, defaultSchemaFactory);
}
http://git-wip-us.apache.org/repos/asf/phoenix/blob/6f39c105/phoenix-core/src/main/java/org/apache/phoenix/calcite/rel/PhoenixTableModify.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/calcite/rel/PhoenixTableModify.java b/phoenix-core/src/main/java/org/apache/phoenix/calcite/rel/PhoenixTableModify.java
index 579914a..f13223f 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/calcite/rel/PhoenixTableModify.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/calcite/rel/PhoenixTableModify.java
@@ -16,6 +16,7 @@ import org.apache.calcite.plan.RelTraitSet;
import org.apache.calcite.prepare.Prepare.CatalogReader;
import org.apache.calcite.rel.RelNode;
import org.apache.calcite.rel.core.TableModify;
+import org.apache.calcite.rex.RexNode;
import org.apache.hadoop.hbase.client.Scan;
import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
import org.apache.phoenix.calcite.PhoenixTable;
@@ -61,8 +62,10 @@ public class PhoenixTableModify extends TableModify implements PhoenixRel {
public PhoenixTableModify(RelOptCluster cluster, RelTraitSet traits,
RelOptTable table, CatalogReader catalogReader, RelNode child,
- Operation operation, List<String> updateColumnList, boolean flattened) {
- super(cluster, traits, table, catalogReader, child, operation, updateColumnList, flattened);
+ Operation operation, List<String> updateColumnList, List<RexNode> sourceExpressionList,
+ boolean flattened) {
+ super(cluster, traits, table, catalogReader, child, operation,
+ updateColumnList, sourceExpressionList, flattened);
assert operation == Operation.INSERT || operation == Operation.DELETE;
}
@@ -75,6 +78,7 @@ public class PhoenixTableModify extends TableModify implements PhoenixRel {
sole(inputs),
getOperation(),
getUpdateColumnList(),
+ getSourceExpressionList(),
isFlattened());
}
http://git-wip-us.apache.org/repos/asf/phoenix/blob/6f39c105/phoenix-core/src/main/java/org/apache/phoenix/calcite/rules/PhoenixConverterRules.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/calcite/rules/PhoenixConverterRules.java b/phoenix-core/src/main/java/org/apache/phoenix/calcite/rules/PhoenixConverterRules.java
index 68db713..ca3e60e 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/calcite/rules/PhoenixConverterRules.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/calcite/rules/PhoenixConverterRules.java
@@ -854,6 +854,7 @@ public class PhoenixConverterRules {
modify.getTraitSet().replace(PhoenixConvention.GENERIC)),
modify.getOperation(),
modify.getUpdateColumnList(),
+ modify.getSourceExpressionList(),
modify.isFlattened());
}
}