diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml
index b5d3cbf2d8c..0bf2f3df223 100644
--- a/phoenix-core/pom.xml
+++ b/phoenix-core/pom.xml
@@ -89,6 +89,53 @@
+
+ maven-resources-plugin
+
+
+ copy-fmpp-resources
+ initialize
+
+ copy-resources
+
+
+ ${project.build.directory}/codegen
+
+
+ src/main/codegen
+ false
+
+
+
+
+
+
+
+ com.googlecode.fmpp-maven-plugin
+ fmpp-maven-plugin
+ 1.0
+
+
+ org.freemarker
+ freemarker
+ 2.3.19
+
+
+
+
+ generate-fmpp-sources
+ generate-sources
+
+ generate
+
+
+ ${project.build.directory}/codegen/config.fmpp
+ target/generated-sources
+ ${project.build.directory}/codegen/templates
+
+
+
+
org.codehaus.mojo
build-helper-maven-plugin
@@ -108,6 +155,29 @@
+
+ org.codehaus.mojo
+ javacc-maven-plugin
+ 2.4
+
+
+ generate-sources
+ javacc
+
+ javacc
+
+
+ ${project.build.directory}/generated-sources/
+
+ **/Parser.jj
+
+ 2
+ false
+ ${project.build.directory}/generated-sources/
+
+
+
+
org.antlr
@@ -208,6 +278,27 @@
maven-dependency-plugin
+
+
+ unpack-parser-template
+ initialize
+
+ unpack
+
+
+
+
+ org.apache.calcite
+ calcite-core
+ jar
+ true
+ ${project.build.directory}/
+ **/Parser.jj
+
+
+
+
create-phoenix-generated-classpath
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/calcite/CalciteTest.java b/phoenix-core/src/it/java/org/apache/phoenix/calcite/CalciteTest.java
index b96c2a20db2..bc236382a10 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/calcite/CalciteTest.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/calcite/CalciteTest.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); 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
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.phoenix.calcite;
import com.google.common.collect.Lists;
@@ -10,6 +27,7 @@
import org.apache.phoenix.schema.TableAlreadyExistsException;
import org.apache.phoenix.util.PropertiesUtil;
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Test;
import java.io.File;
@@ -120,6 +138,18 @@ public Sql explainIs(String expected) {
return this;
}
+
+ public boolean execute() {
+ try {
+ final Statement statement = start.getConnection().createStatement();
+ final boolean execute = statement.execute(sql);
+ statement.close();
+ return execute;
+ } catch (SQLException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
public List