You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by sr...@apache.org on 2015/10/27 18:08:10 UTC

[6/9] storm git commit: Remove the native code compiler.

Remove the native code compiler.


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/024c146c
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/024c146c
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/024c146c

Branch: refs/heads/STORM-1040
Commit: 024c146cc5daa6506354847f2364f2ef12e19491
Parents: 7397491
Author: Haohui Mai <wh...@apache.org>
Authored: Thu Oct 22 17:05:18 2015 -0700
Committer: Haohui Mai <wh...@apache.org>
Committed: Thu Oct 22 23:26:48 2015 -0700

----------------------------------------------------------------------
 .travis.yml                                     |    12 -
 external/sql/storm-sql-core/pom.xml             |    45 -
 .../sql/compiler/CalcitePlanSerializer.java     |   156 -
 .../storm/sql/compiler/ExprSerializer.java      |   133 -
 .../storm/sql/compiler/TridentCompiler.java     |    38 -
 .../storm/sql/compiler/TypeSerializer.java      |    34 -
 .../storm-sql-core/src/native/CMakeLists.txt    |    53 -
 .../src/native/bindings/CMakeLists.txt          |    18 -
 .../src/native/bindings/jni/CMakeLists.txt      |    22 -
 .../src/native/bindings/jni/jni.cc              |    59 -
 .../src/native/cmake/FindLLVM.cmake             |    48 -
 .../src/native/include/stormsql/stormsql.h      |    36 -
 .../src/native/lib/CMakeLists.txt               |    21 -
 .../src/native/lib/compiler/CMakeLists.txt      |    19 -
 .../src/native/lib/compiler/expr_compiler.cc    |   163 -
 .../src/native/lib/compiler/expr_compiler.h     |    55 -
 .../src/native/lib/compiler/expr_visitor.cc     |    43 -
 .../src/native/lib/compiler/expr_visitor.h      |    77 -
 .../src/native/lib/compiler/typesystem.cc       |   101 -
 .../src/native/lib/compiler/typesystem.h        |    66 -
 .../src/native/lib/tool/CMakeLists.txt          |    19 -
 .../src/native/lib/tool/facade.cc               |    36 -
 .../src/native/test/CMakeLists.txt              |    18 -
 .../src/native/test/compiler/CMakeLists.txt     |    23 -
 .../native/test/compiler/expr_compiler_test.cc  |   145 -
 .../src/native/third_party/CMakeLists.txt       |    20 -
 .../third_party/gmock-1.7.0/CMakeLists.txt      |     2 -
 .../src/native/third_party/gmock-1.7.0/LICENSE  |    28 -
 .../third_party/gmock-1.7.0/gmock-gtest-all.cc  | 11443 ----------
 .../third_party/gmock-1.7.0/gmock/gmock.h       | 14198 ------------
 .../third_party/gmock-1.7.0/gmock_main.cc       |    54 -
 .../third_party/gmock-1.7.0/gtest/gtest.h       | 20061 -----------------
 .../native/third_party/json11/CMakeLists.txt    |    19 -
 .../native/third_party/json11/json11/json11.cpp |   705 -
 .../native/third_party/json11/json11/json11.hpp |   200 -
 .../sql/compiler/TestCalcitePlanSerializer.java |   155 -
 .../storm/sql/compiler/TestTridentCompiler.java |    36 -
 37 files changed, 48361 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/024c146c/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index f08c07b..6d864d5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -11,17 +11,6 @@
 #  limitations under the License.
 language: java
 
-addons:
-  apt:
-    sources:
-      - ubuntu-toolchain-r-test
-      - llvm-toolchain-precise-3.6
-    packages:
-      - clang-3.6
-      - llvm-3.6
-      - llvm-3.6-dev
-      - libedit-dev
-
 jdk:
   - oraclejdk7
   - oraclejdk8
@@ -30,7 +19,6 @@ before_install:
   - rvm use 2.1.5 --install
   - nvm install 0.12.2
   - nvm use 0.12.2
-  - export CXX="clang++-3.6"
 
 install: /bin/bash ./dev-tools/travis/travis-install.sh `pwd`
 

http://git-wip-us.apache.org/repos/asf/storm/blob/024c146c/external/sql/storm-sql-core/pom.xml
----------------------------------------------------------------------
diff --git a/external/sql/storm-sql-core/pom.xml b/external/sql/storm-sql-core/pom.xml
index 64ee25b..562f12f 100644
--- a/external/sql/storm-sql-core/pom.xml
+++ b/external/sql/storm-sql-core/pom.xml
@@ -212,51 +212,6 @@
                 </executions>
             </plugin>
             <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>native-maven-plugin</artifactId>
-                <version>1.0-alpha-8</version>
-                <executions>
-                    <execution>
-                        <phase>compile</phase>
-                        <goals>
-                            <goal>javah</goal>
-                        </goals>
-                        <configuration>
-                            <javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
-                            <javahClassNames>
-                                <javahClassName>org.apache.storm.sql.compiler.TridentCompiler</javahClassName>
-                            </javahClassNames>
-                            <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-antrun-plugin</artifactId>
-                <version>1.8</version>
-                <executions>
-                    <execution>
-                        <id>make</id>
-                        <phase>compile</phase>
-                        <goals><goal>run</goal></goals>
-                        <configuration>
-                            <target>
-                                <exec executable="cmake" dir="${project.build.directory}/native" failonerror="true">
-                                    <arg line="${basedir}/src/native -DGENERATED_JAVAH=${project.build.directory}/native/javah"/>
-                                </exec>
-                                <exec executable="make" dir="${project.build.directory}/native" failonerror="true"/>
-                                <copy todir="${project.build.directory}/lib">
-                                    <fileset dir="${project.build.directory}/native/bindings/jni">
-                                        <include name="libstormsql.*"/>
-                                    </fileset>
-                                </copy>
-                            </target>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-plugin</artifactId>
                 <configuration>

http://git-wip-us.apache.org/repos/asf/storm/blob/024c146c/external/sql/storm-sql-core/src/jvm/org/apache/storm/sql/compiler/CalcitePlanSerializer.java
----------------------------------------------------------------------
diff --git a/external/sql/storm-sql-core/src/jvm/org/apache/storm/sql/compiler/CalcitePlanSerializer.java b/external/sql/storm-sql-core/src/jvm/org/apache/storm/sql/compiler/CalcitePlanSerializer.java
deleted file mode 100644
index ee117f7..0000000
--- a/external/sql/storm-sql-core/src/jvm/org/apache/storm/sql/compiler/CalcitePlanSerializer.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/**
- * 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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.storm.sql.compiler;
-
-import com.fasterxml.jackson.core.JsonFactory;
-import com.fasterxml.jackson.core.JsonGenerator;
-import com.google.common.base.Joiner;
-import org.apache.calcite.rel.RelNode;
-import org.apache.calcite.rel.core.Filter;
-import org.apache.calcite.rel.core.Project;
-import org.apache.calcite.rel.core.TableScan;
-import org.apache.calcite.rel.type.RelDataType;
-import org.apache.calcite.rel.type.RelDataTypeFactory;
-import org.apache.calcite.rel.type.RelDataTypeField;
-import org.apache.calcite.rel.type.RelDataTypeSystem;
-import org.apache.calcite.rex.RexNode;
-import org.apache.calcite.schema.SchemaPlus;
-import org.apache.calcite.schema.Table;
-import org.apache.calcite.sql.type.SqlTypeFactoryImpl;
-import org.apache.calcite.util.Pair;
-
-import java.io.IOException;
-import java.io.StringWriter;
-
-public class CalcitePlanSerializer extends PostOrderRelNodeVisitor<Void> {
-  private final TypeSerializer typeSerializer = new TypeSerializer();
-  private final ExprSerializer exprSerializer = new ExprSerializer(
-      typeSerializer);
-  private final RelDataTypeFactory sqlTypeFactory = new SqlTypeFactoryImpl(
-      RelDataTypeSystem.DEFAULT);
-
-  private final SchemaPlus schema;
-  private final RelNode tree;
-  private JsonGenerator jg;
-
-  public CalcitePlanSerializer(SchemaPlus schema, RelNode tree) {
-    this.schema = schema;
-    this.tree = tree;
-  }
-
-  public String toJson() throws Exception {
-    StringWriter sw = new StringWriter();
-    JsonFactory jsonFactory = new JsonFactory();
-    try {
-      jg = jsonFactory.createGenerator(sw);
-      jg.writeStartObject();
-      jg.writeNumberField("result", tree.getId());
-      jg.writeArrayFieldStart("tables");
-      serializeDependency(tree);
-      jg.writeEndArray();
-      jg.writeArrayFieldStart("stages");
-      traverse(tree);
-      jg.writeEndArray();
-      jg.writeEndObject();
-    } finally {
-      jg.close();
-    }
-    return sw.toString();
-  }
-
-  private void serializeDependency(RelNode root)
-      throws IOException {
-    if (root == null) {
-      return;
-    }
-    for (RelNode n : root.getInputs()) {
-      serializeDependency(n);
-    }
-    if (root instanceof TableScan) {
-      jg.writeStartObject();
-      String name = Joiner.on('.').join(root.getTable().getQualifiedName());
-      jg.writeStringField("name", name);
-      jg.writeArrayFieldStart("fields");
-      Table t = schema.getTable(name);
-      RelDataType type = t.getRowType(sqlTypeFactory);
-      for (RelDataTypeField field : type.getFieldList()) {
-        jg.writeStartObject();
-        jg.writeStringField("name", field.getName());
-        jg.writeFieldName("type");
-        typeSerializer.serialize(jg, field.getType());
-        jg.writeEndObject();
-      }
-      jg.writeEndArray();
-      jg.writeEndObject();
-    }
-  }
-
-  @Override
-  Void defaultValue(RelNode n) {
-    throw new UnsupportedOperationException("Unsupported RelNode: " + n
-        .getClass().getSimpleName());
-  }
-
-  @Override
-  Void visitFilter(Filter filter) throws Exception {
-    jg.writeStartObject();
-    writeCommonFieldsForRelNode(jg, filter);
-    jg.writeFieldName("expr");
-    exprSerializer.serialize(jg, filter.getCondition());
-    jg.writeEndObject();
-    return null;
-  }
-
-  @Override
-  Void visitProject(Project project) throws Exception {
-    jg.writeStartObject();
-    writeCommonFieldsForRelNode(jg, project);
-    jg.writeArrayFieldStart("exprs");
-    for (Pair<RexNode, String> p : project.getNamedProjects()) {
-      jg.writeStartObject();
-      jg.writeStringField("name", p.getValue());
-      jg.writeFieldName("expr");
-      exprSerializer.serialize(jg, p.getKey());
-      jg.writeEndObject();
-    }
-    jg.writeEndArray();
-    jg.writeEndObject();
-    return null;
-  }
-
-  @Override
-  Void visitTableScan(TableScan scan) throws Exception {
-    jg.writeStartObject();
-    writeCommonFieldsForRelNode(jg, scan);
-    jg.writeStringField("table",
-                        Joiner.on(",").join(scan.getTable().getQualifiedName()));
-    jg.writeEndObject();
-    return null;
-  }
-
-  private void writeCommonFieldsForRelNode(
-      JsonGenerator jg, RelNode n) throws IOException {
-    jg.writeStringField("type", n.getClass().getSimpleName());
-    jg.writeNumberField("id", n.getId());
-    jg.writeArrayFieldStart("inputs");
-    for (RelNode input : n.getInputs()) {
-      jg.writeNumber(input.getId());
-    }
-    jg.writeEndArray();
-  }
-}

http://git-wip-us.apache.org/repos/asf/storm/blob/024c146c/external/sql/storm-sql-core/src/jvm/org/apache/storm/sql/compiler/ExprSerializer.java
----------------------------------------------------------------------
diff --git a/external/sql/storm-sql-core/src/jvm/org/apache/storm/sql/compiler/ExprSerializer.java b/external/sql/storm-sql-core/src/jvm/org/apache/storm/sql/compiler/ExprSerializer.java
deleted file mode 100644
index a98a2d6..0000000
--- a/external/sql/storm-sql-core/src/jvm/org/apache/storm/sql/compiler/ExprSerializer.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/**
- * 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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.storm.sql.compiler;
-
-import com.fasterxml.jackson.core.JsonGenerator;
-import org.apache.calcite.rex.RexCall;
-import org.apache.calcite.rex.RexCorrelVariable;
-import org.apache.calcite.rex.RexDynamicParam;
-import org.apache.calcite.rex.RexFieldAccess;
-import org.apache.calcite.rex.RexInputRef;
-import org.apache.calcite.rex.RexLiteral;
-import org.apache.calcite.rex.RexLocalRef;
-import org.apache.calcite.rex.RexNode;
-import org.apache.calcite.rex.RexOver;
-import org.apache.calcite.rex.RexRangeRef;
-import org.apache.calcite.rex.RexVisitor;
-
-import java.io.IOException;
-
-class ExprSerializer {
-  private final TypeSerializer typeSerializer;
-
-  public ExprSerializer(TypeSerializer typeSerializer) {
-    this.typeSerializer = typeSerializer;
-  }
-
-  public void serialize(JsonGenerator jg, RexNode n) throws IOException {
-    new Serializer(jg).serialize(n);
-  }
-
-  private class Serializer implements RexVisitor<Void> {
-    private final JsonGenerator jg;
-
-    private Serializer(JsonGenerator jg) {
-      this.jg = jg;
-    }
-
-    private void serialize(RexNode n) throws IOException {
-      jg.writeStartObject();
-      jg.writeFieldName("type");
-      typeSerializer.serialize(jg, n.getType());
-      jg.writeObjectFieldStart("value");
-      n.accept(this);
-      jg.writeEndObject();
-      jg.writeEndObject();
-    }
-
-    @Override
-    public Void visitInputRef(RexInputRef inputRef) {
-      try {
-        jg.writeStringField("inst", "inputref");
-        jg.writeNumberField("idx", inputRef.getIndex());
-      } catch (IOException e) {
-        throw new RuntimeException(e);
-      }
-      return null;
-    }
-
-    @Override
-    public Void visitLocalRef(RexLocalRef localRef) {
-      throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public Void visitLiteral(RexLiteral literal) {
-      try {
-        jg.writeStringField("inst", "literal");
-        jg.writeStringField("value", literal.getValue().toString());
-      } catch (IOException e) {
-        throw new RuntimeException(e);
-      }
-      return null;
-    }
-
-    @Override
-    public Void visitCall(RexCall call) {
-      try {
-        jg.writeStringField("inst", "call");
-        jg.writeStringField("operator", call.getOperator().getName());
-        jg.writeArrayFieldStart("operands");
-        for (RexNode operand : call.getOperands()) {
-          serialize(operand);
-        }
-        jg.writeEndArray();
-      } catch (IOException e) {
-        throw new RuntimeException(e);
-      }
-      return null;
-    }
-
-    @Override
-    public Void visitOver(RexOver over) {
-      throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public Void visitCorrelVariable(
-        RexCorrelVariable correlVariable) {
-      throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public Void visitDynamicParam(
-        RexDynamicParam dynamicParam) {
-      throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public Void visitRangeRef(RexRangeRef rangeRef) {
-      throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public Void visitFieldAccess(RexFieldAccess fieldAccess) {
-      throw new UnsupportedOperationException();
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/storm/blob/024c146c/external/sql/storm-sql-core/src/jvm/org/apache/storm/sql/compiler/TridentCompiler.java
----------------------------------------------------------------------
diff --git a/external/sql/storm-sql-core/src/jvm/org/apache/storm/sql/compiler/TridentCompiler.java b/external/sql/storm-sql-core/src/jvm/org/apache/storm/sql/compiler/TridentCompiler.java
deleted file mode 100644
index da4b193..0000000
--- a/external/sql/storm-sql-core/src/jvm/org/apache/storm/sql/compiler/TridentCompiler.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * 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.storm.sql.compiler;
-
-import java.io.File;
-import java.io.IOException;
-
-public class TridentCompiler {
-  static {
-    System.loadLibrary("stormsql");
-  }
-
-  public void compile(File workingDir, String plan) throws IOException {
-    String[] s = new String[1];
-    int r = compile(plan, workingDir.getAbsolutePath(), s);
-    if (r != 0) {
-      throw new IOException(s[0]);
-    }
-  }
-
-  private static native int compile(String plan, String workingDir, String[]
-      msg);
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/storm/blob/024c146c/external/sql/storm-sql-core/src/jvm/org/apache/storm/sql/compiler/TypeSerializer.java
----------------------------------------------------------------------
diff --git a/external/sql/storm-sql-core/src/jvm/org/apache/storm/sql/compiler/TypeSerializer.java b/external/sql/storm-sql-core/src/jvm/org/apache/storm/sql/compiler/TypeSerializer.java
deleted file mode 100644
index dfffe86..0000000
--- a/external/sql/storm-sql-core/src/jvm/org/apache/storm/sql/compiler/TypeSerializer.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.storm.sql.compiler;
-
-import com.fasterxml.jackson.core.JsonGenerator;
-import org.apache.calcite.rel.type.RelDataType;
-import org.apache.calcite.sql.type.BasicSqlType;
-
-import java.io.IOException;
-
-class TypeSerializer {
-  public void serialize(JsonGenerator jg, RelDataType type) throws IOException {
-    if (type instanceof BasicSqlType) {
-      jg.writeString(type.getSqlTypeName().getName());
-    } else {
-      throw new UnsupportedOperationException();
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/storm/blob/024c146c/external/sql/storm-sql-core/src/native/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/external/sql/storm-sql-core/src/native/CMakeLists.txt b/external/sql/storm-sql-core/src/native/CMakeLists.txt
deleted file mode 100644
index e722c4f..0000000
--- a/external/sql/storm-sql-core/src/native/CMakeLists.txt
+++ /dev/null
@@ -1,53 +0,0 @@
-#
-# 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.
-#
-cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-
-if(POLICY CMP0042)
-  cmake_policy(SET CMP0042 NEW)
-endif()
-
-list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
-
-find_package(JNI REQUIRED)
-find_package(LLVM REQUIRED)
-
-# The caller must specify where the generated headers have been placed.
-if(NOT GENERATED_JAVAH)
-    message(FATAL_ERROR "You must set the CMake variable GENERATED_JAVAH")
-endif()
-
-enable_testing()
-
-if(UNIX)
-set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -std=c++11 -g -fPIC -fno-strict-aliasing -fno-exceptions -fno-rtti")
-endif()
-
-if(APPLE)
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
-endif()
-
-include_directories(
-  include
-  lib
-  third_party/gmock-1.7.0
-  third_party/json11)
-
-add_subdirectory(lib)
-add_subdirectory(third_party)
-add_subdirectory(bindings)
-add_subdirectory(test)

http://git-wip-us.apache.org/repos/asf/storm/blob/024c146c/external/sql/storm-sql-core/src/native/bindings/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/external/sql/storm-sql-core/src/native/bindings/CMakeLists.txt b/external/sql/storm-sql-core/src/native/bindings/CMakeLists.txt
deleted file mode 100644
index 95c452a..0000000
--- a/external/sql/storm-sql-core/src/native/bindings/CMakeLists.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# 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.
-#
-add_subdirectory(jni)

http://git-wip-us.apache.org/repos/asf/storm/blob/024c146c/external/sql/storm-sql-core/src/native/bindings/jni/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/external/sql/storm-sql-core/src/native/bindings/jni/CMakeLists.txt b/external/sql/storm-sql-core/src/native/bindings/jni/CMakeLists.txt
deleted file mode 100644
index 308d5bc..0000000
--- a/external/sql/storm-sql-core/src/native/bindings/jni/CMakeLists.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# 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.
-#
-
-include_directories(${JNI_INCLUDE_DIRS} ${GENERATED_JAVAH})
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
-add_library(stormsql SHARED jni.cc)
-target_link_libraries(stormsql tool ${JAVA_JVM_LIBRARY})

http://git-wip-us.apache.org/repos/asf/storm/blob/024c146c/external/sql/storm-sql-core/src/native/bindings/jni/jni.cc
----------------------------------------------------------------------
diff --git a/external/sql/storm-sql-core/src/native/bindings/jni/jni.cc b/external/sql/storm-sql-core/src/native/bindings/jni/jni.cc
deleted file mode 100644
index 609c769..0000000
--- a/external/sql/storm-sql-core/src/native/bindings/jni/jni.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * 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.
- */
-
-#include "stormsql/stormsql.h"
-#include "org_apache_storm_sql_compiler_TridentCompiler.h"
-
-using namespace stormsql;
-
-#undef JNIEXPORT
-#define JNIEXPORT __attribute__ ((visibility ("default")))
-
-static inline std::string GetString(JNIEnv *env, jstring str) {
-  const char *ptr = env->GetStringUTFChars(str, nullptr);
-  jsize length = env->GetStringUTFLength(str);
-  std::string plan(ptr, length);
-  env->ReleaseStringUTFChars(str, ptr);
-  return plan;
-}
-
-JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void*)
-{
-  JNIEnv* env;
-  if (vm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6) != JNI_OK) {
-    return -1;
-  }
-
-  return JNI_VERSION_1_6;
-}
-
-JNIEXPORT jint JNICALL
-Java_org_apache_storm_sql_compiler_TridentCompiler_compile(JNIEnv *env, jclass,
-                                                           jstring plan,
-                                                           jstring working_dir,
-                                                           jobjectArray err) {
-  std::string msg;
-  int ret = CompilePlanToTrident(GetString(env, plan),
-                                 GetString(env, working_dir), &msg);
-  if (ret) {
-    jstring s = env->NewStringUTF(msg.c_str());
-    env->SetObjectArrayElement(err, 0, s);
-  }
-  return ret;
-}
-

http://git-wip-us.apache.org/repos/asf/storm/blob/024c146c/external/sql/storm-sql-core/src/native/cmake/FindLLVM.cmake
----------------------------------------------------------------------
diff --git a/external/sql/storm-sql-core/src/native/cmake/FindLLVM.cmake b/external/sql/storm-sql-core/src/native/cmake/FindLLVM.cmake
deleted file mode 100644
index affa0ca..0000000
--- a/external/sql/storm-sql-core/src/native/cmake/FindLLVM.cmake
+++ /dev/null
@@ -1,48 +0,0 @@
-#
-# 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.
-#
-
-if (LLVM_INCLUDE_DIR)
-  set(LLVM_FOUND TRUE)
-endif()
-
-set(LLVM_CONFIG_NAMES llvm-config-3.7 llvm-config37
-                      llvm-config-3.6 llvm-config36
-                      llvm-config)
-
-if (NOT LLVM_FOUND)
-  if (NOT LLVM_CONFIG)
-    find_program(LLVM_CONFIG NAMES ${LLVM_CONFIG_NAMES} DOC "llvm-config executable")
-    if (${LLVM_CONFIG} STREQUAL LLVM_CONFIG-NOTFOUND)
-      message(FATAL_ERROR "Cannot find llvm-config")
-    endif()
-    mark_as_advanced(LLVM_CONFIG)
-  endif ()
-
-  execute_process(COMMAND ${LLVM_CONFIG} --cxxflags OUTPUT_VARIABLE LLVM_CXXFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE)
-  execute_process(COMMAND ${LLVM_CONFIG} --ldflags OUTPUT_VARIABLE LLVM_LDFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE)
-  execute_process(COMMAND ${LLVM_CONFIG} --libs core OUTPUT_VARIABLE LLVM_LIBRARIES OUTPUT_STRIP_TRAILING_WHITESPACE)
-  execute_process(COMMAND ${LLVM_CONFIG} --system-libs OUTPUT_VARIABLE LLVM_SYSTEM_LIBRARIES OUTPUT_STRIP_TRAILING_WHITESPACE)
-  mark_as_advanced(LLVM_LIBRARIES)
-
-  execute_process(COMMAND ${LLVM_CONFIG} --version OUTPUT_VARIABLE LLVM_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
-  message(STATUS "Using LLVM ${LLVM_VERSION}")
-else()
-  if (LLVM_FIND_REQUIRED)
-    message(FATAL_ERROR "Could not find LLVM")
-  endif()
-ENDIF()

http://git-wip-us.apache.org/repos/asf/storm/blob/024c146c/external/sql/storm-sql-core/src/native/include/stormsql/stormsql.h
----------------------------------------------------------------------
diff --git a/external/sql/storm-sql-core/src/native/include/stormsql/stormsql.h b/external/sql/storm-sql-core/src/native/include/stormsql/stormsql.h
deleted file mode 100644
index 1840c50..0000000
--- a/external/sql/storm-sql-core/src/native/include/stormsql/stormsql.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * 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.
- */
-
-#ifndef STORMSQL_STORM_SQL_H_
-#define STORMSQL_STORM_SQL_H_
-
-#include <string>
-
-namespace stormsql {
-
-/**
- * Compile the Calcite execution plan in JSON format into a lists of Java source
- * files in the working directory.
- *
- * Return 0 if succeeds.
- **/
-int CompilePlanToTrident(const std::string &plan,
-                         const std::string &working_dir, std::string *err);
-}
-
-#endif

http://git-wip-us.apache.org/repos/asf/storm/blob/024c146c/external/sql/storm-sql-core/src/native/lib/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/external/sql/storm-sql-core/src/native/lib/CMakeLists.txt b/external/sql/storm-sql-core/src/native/lib/CMakeLists.txt
deleted file mode 100644
index 2e7475c..0000000
--- a/external/sql/storm-sql-core/src/native/lib/CMakeLists.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# 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.
-#
-
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LLVM_CXXFLAGS}")
-add_subdirectory(compiler)
-add_subdirectory(tool)

http://git-wip-us.apache.org/repos/asf/storm/blob/024c146c/external/sql/storm-sql-core/src/native/lib/compiler/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/external/sql/storm-sql-core/src/native/lib/compiler/CMakeLists.txt b/external/sql/storm-sql-core/src/native/lib/compiler/CMakeLists.txt
deleted file mode 100644
index 440301e..0000000
--- a/external/sql/storm-sql-core/src/native/lib/compiler/CMakeLists.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# 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.
-#
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LLVM_CXXFLAGS}")
-add_library(compiler typesystem.cc expr_visitor.cc expr_compiler.cc)

http://git-wip-us.apache.org/repos/asf/storm/blob/024c146c/external/sql/storm-sql-core/src/native/lib/compiler/expr_compiler.cc
----------------------------------------------------------------------
diff --git a/external/sql/storm-sql-core/src/native/lib/compiler/expr_compiler.cc b/external/sql/storm-sql-core/src/native/lib/compiler/expr_compiler.cc
deleted file mode 100644
index d897848..0000000
--- a/external/sql/storm-sql-core/src/native/lib/compiler/expr_compiler.cc
+++ /dev/null
@@ -1,163 +0,0 @@
-/**
- * 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.
- */
-
-#include "expr_compiler.h"
-
-#include <llvm/IR/Constants.h>
-#include <functional>
-
-using json11::Json;
-using llvm::cast;
-using llvm::APFloat;
-using llvm::BinaryOperator;
-using llvm::CmpInst;
-using llvm::ConstantDataArray;
-using llvm::ConstantFP;
-using llvm::ConstantInt;
-using llvm::Function;
-using llvm::IntegerType;
-using llvm::SMDiagnostic;
-using llvm::SourceMgr;
-using llvm::Type;
-using llvm::Value;
-using std::back_inserter;
-using std::map;
-using std::vector;
-using std::string;
-using std::to_string;
-using std::transform;
-
-namespace stormsql {
-
-const map<CmpInst::Predicate, CmpInst::Predicate>
-    ExprCompiler::floating_op_predicates_ = {
-        {CmpInst::Predicate::ICMP_EQ, CmpInst::Predicate::FCMP_OEQ},
-        {CmpInst::Predicate::ICMP_NE, CmpInst::Predicate::FCMP_ONE},
-        {CmpInst::Predicate::ICMP_SGT, CmpInst::Predicate::FCMP_OGT},
-        {CmpInst::Predicate::ICMP_SGE, CmpInst::Predicate::FCMP_OGE},
-        {CmpInst::Predicate::ICMP_SLT, CmpInst::Predicate::FCMP_OLT},
-        {CmpInst::Predicate::ICMP_SLE, CmpInst::Predicate::FCMP_OLE}};
-
-const map<BinaryOperator::BinaryOps, BinaryOperator::BinaryOps>
-    ExprCompiler::floating_binary_op_ = {
-        {BinaryOperator::BinaryOps::Add, BinaryOperator::BinaryOps::FAdd},
-        {BinaryOperator::BinaryOps::Sub, BinaryOperator::BinaryOps::FSub},
-        {BinaryOperator::BinaryOps::Mul, BinaryOperator::BinaryOps::FMul},
-        {BinaryOperator::BinaryOps::SDiv, BinaryOperator::BinaryOps::FDiv}};
-
-ExprCompiler::ExprCompiler(const string &err_ctx, TypeSystem *typesystem,
-                           llvm::IRBuilder<> *builder, SMDiagnostic *err)
-    : err_ctx_(err_ctx), typesystem_(typesystem), builder_(builder), err_(err) {
-}
-
-Value *ExprCompiler::CompileValue(const Json &value) {
-  Value *v = Visit(value);
-  if (!v) {
-    *err_ = SMDiagnostic(err_ctx_, SourceMgr::DK_Error,
-                         "Failed to compile expression " + value.dump());
-  }
-  return v;
-}
-
-Value *ExprCompiler::VisitBinaryOperator(BinaryOperator::BinaryOps opcode,
-                                         const Json &LHS, const Json &RHS) {
-  Value *L, *R;
-  if (!(L = CompileValue(LHS)) || !(R = CompileValue(RHS))) {
-    return nullptr;
-  }
-
-  Type *t = L->getType();
-  BinaryOperator::BinaryOps op = opcode;
-  if (t == builder_->getFloatTy() || t == builder_->getDoubleTy()) {
-    op = floating_binary_op_.at(opcode);
-  }
-  return builder_->CreateBinOp(op, L, R);
-}
-
-Value *ExprCompiler::VisitCmp(CmpInst::Predicate predicate, const Json &LHS,
-                              const Json &RHS) {
-  Value *L, *R;
-  if (!(L = CompileValue(LHS)) || !(R = CompileValue(RHS))) {
-    return nullptr;
-  }
-
-  // Assuming that the type promotion has been done
-  TypeSystem::SqlType type_id = typesystem_->GetSqlTypeId(LHS["type"]);
-  Value *v = nullptr;
-  switch (type_id) {
-  case TypeSystem::kBooleanTy:
-  case TypeSystem::kIntegerTy:
-    v = builder_->CreateICmp(predicate, L, R);
-    break;
-  case TypeSystem::kDecimalTy:
-    v = builder_->CreateFCmp(floating_op_predicates_.at(predicate), L, R);
-    break;
-  case TypeSystem::kStringTy: {
-    if (predicate != CmpInst::Predicate::ICMP_EQ &&
-        predicate != CmpInst::Predicate::ICMP_NE) {
-      *err_ =
-          SMDiagnostic(err_ctx_, SourceMgr::DK_Error,
-                       "Invalid predicate for string " + to_string(predicate));
-      v = nullptr;
-    } else {
-      Function *f = typesystem_->equals();
-      Value *CL = builder_->CreateBitCast(L, typesystem_->llvm_string_type());
-      Value *CR = builder_->CreateBitCast(R, typesystem_->llvm_string_type());
-      v = builder_->CreateCall(f, {CL, CR});
-      if (predicate == CmpInst::Predicate::ICMP_NE) {
-        v = builder_->CreateNot(v);
-      }
-    }
-  } break;
-  }
-  return v;
-}
-
-Value *ExprCompiler::VisitInputRef(const Json &type, int index) {
-  Function *F = builder_->GetInsertBlock()->getParent();
-  auto AI = F->arg_begin();
-  for (int i = 0; i < index; ++i) {
-    ++AI;
-  }
-  Type *ty = typesystem_->GetLLVMType(type);
-  assert(ty == AI->getType());
-  return AI;
-}
-
-Value *ExprCompiler::VisitLiteral(const Json &type, const Json &value) {
-  TypeSystem::SqlType sql_ty = typesystem_->GetSqlTypeId(type);
-  Type *ty = typesystem_->GetLLVMType(type);
-  switch (sql_ty) {
-  case TypeSystem::kIntegerTy: {
-    long long v = strtoll(value.string_value().c_str(), nullptr, 0);
-    return ConstantInt::get(cast<IntegerType>(ty), v);
-  }
-  case TypeSystem::kBooleanTy: {
-    return value.string_value() == "true" ? ConstantInt::getTrue(ty)
-                                          : ConstantInt::getFalse(ty);
-  }
-  case TypeSystem::kDecimalTy: {
-    APFloat fp(APFloat::IEEEdouble, value.string_value());
-    return ConstantFP::get(ty->getContext(), fp);
-  }
-  case TypeSystem::kStringTy: {
-    return typesystem_->GetOrInsertString(value.string_value());
-  }
-  }
-}
-}

http://git-wip-us.apache.org/repos/asf/storm/blob/024c146c/external/sql/storm-sql-core/src/native/lib/compiler/expr_compiler.h
----------------------------------------------------------------------
diff --git a/external/sql/storm-sql-core/src/native/lib/compiler/expr_compiler.h b/external/sql/storm-sql-core/src/native/lib/compiler/expr_compiler.h
deleted file mode 100644
index 19ede61..0000000
--- a/external/sql/storm-sql-core/src/native/lib/compiler/expr_compiler.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * 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.
- */
-#ifndef STORM_SQL_COMPILER_EXPR_COMPILER_H_
-#define STORM_SQL_COMPILER_EXPR_COMPILER_H_
-
-#include "expr_visitor.h"
-#include "typesystem.h"
-#include <llvm/IR/IRBuilder.h>
-#include <llvm/Support/SourceMgr.h>
-#include <map>
-
-namespace stormsql {
-
-/**
- * Compile a SQL expression down to LLVM IR
- **/
-class ExprCompiler : public ExprVisitor<ExprCompiler, llvm::Value *> {
-public:
-  explicit ExprCompiler(const std::string &err_ctx, TypeSystem *typesystem,
-                        llvm::IRBuilder<> *builder, llvm::SMDiagnostic *err);
-  llvm::Value *VisitBinaryOperator(llvm::BinaryOperator::BinaryOps opcode,
-                                   const Json &LHS, const Json &RHS);
-  llvm::Value *VisitCmp(llvm::CmpInst::Predicate predicate, const Json &LHS,
-                        const Json &RHS);
-  llvm::Value *VisitInputRef(const Json &type, int index);
-  llvm::Value *VisitLiteral(const Json &type, const Json &value);
-
-private:
-  llvm::Value *CompileValue(const Json &v);
-  const std::string err_ctx_;
-  TypeSystem *typesystem_;
-  llvm::IRBuilder<> *builder_;
-  llvm::SMDiagnostic *err_;
-  static const std::map<llvm::CmpInst::Predicate, llvm::CmpInst::Predicate>
-      floating_op_predicates_;
-  static const std::map<llvm::BinaryOperator::BinaryOps,
-                        llvm::BinaryOperator::BinaryOps> floating_binary_op_;
-};
-}
-#endif

http://git-wip-us.apache.org/repos/asf/storm/blob/024c146c/external/sql/storm-sql-core/src/native/lib/compiler/expr_visitor.cc
----------------------------------------------------------------------
diff --git a/external/sql/storm-sql-core/src/native/lib/compiler/expr_visitor.cc b/external/sql/storm-sql-core/src/native/lib/compiler/expr_visitor.cc
deleted file mode 100644
index c5c322c..0000000
--- a/external/sql/storm-sql-core/src/native/lib/compiler/expr_visitor.cc
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * 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.
- */
-
-#include "expr_visitor.h"
-
-using llvm::BinaryOperator;
-using llvm::CmpInst;
-using std::map;
-using std::string;
-
-namespace stormsql {
-const map<string, CmpInst::Predicate> ExprVisitorBase::kCmpPredicates = {
-    {"=", CmpInst::Predicate::ICMP_EQ},
-    {"<>", CmpInst::Predicate::ICMP_NE},
-    {">", CmpInst::Predicate::ICMP_SGT},
-    {">=", CmpInst::Predicate::ICMP_SGE},
-    {"<", CmpInst::Predicate::ICMP_SLT},
-    {"<=", CmpInst::Predicate::ICMP_SLE}};
-
-const map<string, BinaryOperator::BinaryOps> ExprVisitorBase::kBinaryOps = {
-    {"+", BinaryOperator::BinaryOps::Add},
-    {"-", BinaryOperator::BinaryOps::Sub},
-    {"*", BinaryOperator::BinaryOps::Mul},
-    {"/", BinaryOperator::BinaryOps::SDiv},
-    {"/INT", BinaryOperator::BinaryOps::SDiv},
-    {"AND", BinaryOperator::BinaryOps::And},
-    {"OR", BinaryOperator::BinaryOps::Or}};
-}

http://git-wip-us.apache.org/repos/asf/storm/blob/024c146c/external/sql/storm-sql-core/src/native/lib/compiler/expr_visitor.h
----------------------------------------------------------------------
diff --git a/external/sql/storm-sql-core/src/native/lib/compiler/expr_visitor.h b/external/sql/storm-sql-core/src/native/lib/compiler/expr_visitor.h
deleted file mode 100644
index 64c1ef9..0000000
--- a/external/sql/storm-sql-core/src/native/lib/compiler/expr_visitor.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * 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 copyrighRetTy ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may noRetTy use this file excepRetTy 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,
- * WITHOURetTy WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef STORM_SQL_COMPILER_EXPR_VISITOR_H_
-#define STORM_SQL_COMPILER_EXPR_VISITOR_H_
-
-#include <json11/json11.hpp>
-#include <llvm/IR/InstrTypes.h>
-#include <cassert>
-#include <map>
-
-namespace stormsql {
-
-class ExprVisitorBase {
-protected:
-  static const std::map<std::string, llvm::CmpInst::Predicate> kCmpPredicates;
-  static const std::map<std::string, llvm::BinaryOperator::BinaryOps>
-      kBinaryOps;
-};
-
-template <class SubClass, class RetTy = void>
-class ExprVisitor : ExprVisitorBase {
-public:
-  typedef json11::Json Json;
-  RetTy Visit(const Json &json) {
-    const Json &value = json["value"];
-    const Json &type = json["type"];
-    std::string inst = value["inst"].string_value();
-    if (inst == "call") {
-      const std::string &op = value["operator"].string_value();
-      if (kCmpPredicates.count(op)) {
-        return static_cast<SubClass *>(this)->VisitCmp(
-            kCmpPredicates.at(op), value["operands"][0], value["operands"][1]);
-      } else if (kBinaryOps.count(op)) {
-        return static_cast<SubClass *>(this)->VisitBinaryOperator(
-            kBinaryOps.at(op), value["operands"][0], value["operands"][1]);
-      }
-    } else if (inst == "literal") {
-      return static_cast<SubClass *>(this)->VisitLiteral(type, value["value"]);
-    } else if (inst == "inputref") {
-      return static_cast<SubClass *>(this)
-          ->VisitInputRef(type, value["idx"].int_value());
-    } else {
-      assert(0 && "Unknown expression!");
-    }
-    return RetTy();
-  }
-
-  RetTy VisitBinaryOperator(llvm::BinaryOperator::BinaryOps opcdoe,
-                            const Json &LHS, const Json &RHS) {
-    return RetTy();
-  }
-
-  RetTy VisitCmp(llvm::CmpInst::Predicate predicate, const Json &LHS,
-                 const Json &RHS) {
-    return RetTy();
-  }
-
-  RetTy VisitInputRef(const Json &type, int index) { return RetTy(); }
-  RetTy VisitLiteral(const Json &type, const Json &value) { return RetTy(); }
-};
-}
-#endif

http://git-wip-us.apache.org/repos/asf/storm/blob/024c146c/external/sql/storm-sql-core/src/native/lib/compiler/typesystem.cc
----------------------------------------------------------------------
diff --git a/external/sql/storm-sql-core/src/native/lib/compiler/typesystem.cc b/external/sql/storm-sql-core/src/native/lib/compiler/typesystem.cc
deleted file mode 100644
index 4eea586..0000000
--- a/external/sql/storm-sql-core/src/native/lib/compiler/typesystem.cc
+++ /dev/null
@@ -1,101 +0,0 @@
-/**
- * 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.
- */
-
-#include "typesystem.h"
-#include <llvm/IR/Constants.h>
-#include <llvm/IR/DerivedTypes.h>
-#include <llvm/IR/GlobalVariable.h>
-#include <array>
-#include <cassert>
-
-using json11::Json;
-using llvm::cast;
-using llvm::Constant;
-using llvm::ConstantDataArray;
-using llvm::Function;
-using llvm::FunctionType;
-using llvm::GlobalValue;
-using llvm::GlobalVariable;
-using llvm::LLVMContext;
-using llvm::Module;
-using llvm::Type;
-using std::array;
-using std::map;
-using std::make_pair;
-using std::string;
-
-namespace stormsql {
-
-const map<string, TypeSystem::SqlType> TypeSystem::sql_type_map_ = {
-    {"INTEGER", TypeSystem::SqlType::kIntegerTy},
-    {"BOOLEAN", TypeSystem::SqlType::kBooleanTy},
-    {"DECIMAL", TypeSystem::SqlType::kDecimalTy},
-    {"CHAR", TypeSystem::SqlType::kStringTy}};
-
-Table::Table(std::vector<Field> &&fields) : fields_(std::move(fields)) {}
-
-TypeSystem::TypeSystem(Module *module) : module_(module) {
-  LLVMContext &ctx = module_->getContext();
-  Type *PtrTy = Type::getInt8PtrTy(ctx);
-  FunctionType *EQTy =
-      FunctionType::get(Type::getInt1Ty(ctx), {PtrTy, PtrTy}, false);
-  equals_ =
-      cast<Function>(module_->getOrInsertFunction("stormsql.equals", EQTy));
-  string_equals_ignore_case_ = cast<Function>(
-      module_->getOrInsertFunction("stormsql.string.equals_ignore_case", EQTy));
-}
-
-TypeSystem::SqlType TypeSystem::GetSqlTypeId(const Json &type) {
-  auto it = sql_type_map_.find(type.string_value());
-  assert(it != sql_type_map_.end() && "Unsupported type");
-  return it->second;
-}
-
-Type *TypeSystem::GetLLVMType(const Json &type) {
-  LLVMContext &ctx = module_->getContext();
-  switch (GetSqlTypeId(type)) {
-  case kIntegerTy:
-    return Type::getInt32Ty(ctx);
-  case kBooleanTy:
-    return Type::getInt1Ty(ctx);
-  case kDecimalTy:
-    // SQL supports arbitary precision decimal type. For now the type system
-    // returns a double
-    return Type::getDoubleTy(ctx);
-  case kStringTy:
-    return Type::getInt8PtrTy(ctx);
-  }
-}
-
-Type *TypeSystem::llvm_string_type() const {
-  LLVMContext &ctx = module_->getContext();
-  return Type::getInt8PtrTy(ctx);
-}
-
-Constant *TypeSystem::GetOrInsertString(const string &str) {
-  auto it = string_map_.find(str);
-  if (it != string_map_.end()) {
-    return it->second;
-  }
-  auto c = ConstantDataArray::getString(module_->getContext(), str);
-  auto v = new GlobalVariable(*module_, c->getType(), true,
-                              GlobalValue::PrivateLinkage, c);
-  string_map_.insert(make_pair(str, v));
-  return v;
-}
-}

http://git-wip-us.apache.org/repos/asf/storm/blob/024c146c/external/sql/storm-sql-core/src/native/lib/compiler/typesystem.h
----------------------------------------------------------------------
diff --git a/external/sql/storm-sql-core/src/native/lib/compiler/typesystem.h b/external/sql/storm-sql-core/src/native/lib/compiler/typesystem.h
deleted file mode 100644
index b1ced62..0000000
--- a/external/sql/storm-sql-core/src/native/lib/compiler/typesystem.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * 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.
- */
-
-#ifndef STORM_SQL_COMPILER_TYPESYSTEM_H_
-#define STORM_SQL_COMPILER_TYPESYSTEM_H_
-
-#include <json11/json11.hpp>
-#include <llvm/IR/Function.h>
-#include <llvm/IR/Module.h>
-#include <llvm/IR/Type.h>
-
-#include <map>
-#include <memory>
-#include <vector>
-
-namespace stormsql {
-
-class Table {
-public:
-  typedef std::pair<std::string, llvm::Type *> Field;
-  explicit Table(std::vector<Field> &&fields);
-  const std::vector<Field> &fields() const { return fields_; }
-
-private:
-  std::vector<Field> fields_;
-};
-
-class TypeSystem {
-public:
-  enum SqlType { kIntegerTy, kDecimalTy, kBooleanTy, kStringTy };
-  explicit TypeSystem(llvm::Module *module);
-  llvm::Type *GetLLVMType(const json11::Json &type);
-  static SqlType GetSqlTypeId(const json11::Json &type);
-  llvm::Module *module() const { return module_; }
-  llvm::Function *equals() const { return equals_; }
-  llvm::Function *string_equals_ignore_case() const {
-    return string_equals_ignore_case_;
-  }
-  llvm::Type *llvm_string_type() const;
-  llvm::Constant *GetOrInsertString(const std::string &str);
-
-private:
-  llvm::Module *module_;
-  llvm::Function *equals_;
-  llvm::Function *string_equals_ignore_case_;
-  static const std::map<std::string, SqlType> sql_type_map_;
-  std::map<std::string, llvm::Constant *> string_map_;
-};
-}
-
-#endif

http://git-wip-us.apache.org/repos/asf/storm/blob/024c146c/external/sql/storm-sql-core/src/native/lib/tool/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/external/sql/storm-sql-core/src/native/lib/tool/CMakeLists.txt b/external/sql/storm-sql-core/src/native/lib/tool/CMakeLists.txt
deleted file mode 100644
index f54d62a..0000000
--- a/external/sql/storm-sql-core/src/native/lib/tool/CMakeLists.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# 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.
-#
-
-add_library(tool facade.cc)

http://git-wip-us.apache.org/repos/asf/storm/blob/024c146c/external/sql/storm-sql-core/src/native/lib/tool/facade.cc
----------------------------------------------------------------------
diff --git a/external/sql/storm-sql-core/src/native/lib/tool/facade.cc b/external/sql/storm-sql-core/src/native/lib/tool/facade.cc
deleted file mode 100644
index 66148b5..0000000
--- a/external/sql/storm-sql-core/src/native/lib/tool/facade.cc
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * 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.
- */
-
-#include "stormsql/stormsql.h"
-
-namespace stormsql {
-
-/**
- * Compile the Calcite execution plan in JSON format into a lists of Java source
- * files in the working directory.
- *
- * Return 0 if succeeds.
- **/
-int CompilePlanToTrident(const std::string &plan,
-                         const std::string &working_dir, std::string *err) {
-  (void)plan;
-  (void)working_dir;
-  (void)err;
-  return 0;
-}
-}

http://git-wip-us.apache.org/repos/asf/storm/blob/024c146c/external/sql/storm-sql-core/src/native/test/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/external/sql/storm-sql-core/src/native/test/CMakeLists.txt b/external/sql/storm-sql-core/src/native/test/CMakeLists.txt
deleted file mode 100644
index 56cf46f..0000000
--- a/external/sql/storm-sql-core/src/native/test/CMakeLists.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# 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.
-#
-add_subdirectory(compiler)

http://git-wip-us.apache.org/repos/asf/storm/blob/024c146c/external/sql/storm-sql-core/src/native/test/compiler/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/external/sql/storm-sql-core/src/native/test/compiler/CMakeLists.txt b/external/sql/storm-sql-core/src/native/test/compiler/CMakeLists.txt
deleted file mode 100644
index 9f9416e..0000000
--- a/external/sql/storm-sql-core/src/native/test/compiler/CMakeLists.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-# 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.
-#
-
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LLVM_CXXFLAGS}")
-set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${LLVM_LDFLAGS}")
-add_executable(expr_compiler_test expr_compiler_test.cc)
-target_link_libraries(expr_compiler_test compiler json11 gmock_main ${LLVM_LIBRARIES}  ${LLVM_SYSTEM_LIBRARIES})
-add_test(expr_compiler expr_compiler_test)

http://git-wip-us.apache.org/repos/asf/storm/blob/024c146c/external/sql/storm-sql-core/src/native/test/compiler/expr_compiler_test.cc
----------------------------------------------------------------------
diff --git a/external/sql/storm-sql-core/src/native/test/compiler/expr_compiler_test.cc b/external/sql/storm-sql-core/src/native/test/compiler/expr_compiler_test.cc
deleted file mode 100644
index c62b574..0000000
--- a/external/sql/storm-sql-core/src/native/test/compiler/expr_compiler_test.cc
+++ /dev/null
@@ -1,145 +0,0 @@
-/**
- * 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.
- */
-
-#include "compiler/typesystem.h"
-#include "compiler/expr_compiler.h"
-
-#include <llvm/IR/Constants.h>
-#include <llvm/IR/DerivedTypes.h>
-#include <llvm/IR/Function.h>
-#include <llvm/IR/Module.h>
-#include <llvm/IR/Verifier.h>
-
-#include <gtest/gtest.h>
-#include <memory>
-
-using llvm::dyn_cast;
-using llvm::verifyModule;
-using llvm::APFloat;
-using llvm::BasicBlock;
-using llvm::CallInst;
-using llvm::ConstantDataSequential;
-using llvm::ConstantInt;
-using llvm::ConstantFP;
-using llvm::FCmpInst;
-using llvm::Function;
-using llvm::FunctionType;
-using llvm::GlobalValue;
-using llvm::GlobalVariable;
-using llvm::ICmpInst;
-using llvm::LLVMContext;
-using llvm::Module;
-using llvm::SMDiagnostic;
-using llvm::Type;
-using llvm::Value;
-using json11::Json;
-using std::map;
-using std::string;
-using std::to_string;
-using std::unique_ptr;
-using std::vector;
-
-using namespace stormsql;
-
-static inline Json GetLiteral(const string &type, const string &value) {
-  map<string, Json> v({{"inst", "literal"}, {"value", value}});
-  map<string, Json> r({{"type", type}, {"value", Json(v)}});
-  return Json(r);
-}
-static inline Json LiteralBool(bool v) {
-  return GetLiteral("BOOLEAN", v ? "true" : "false");
-}
-static inline Json LiteralInt(int v) {
-  return GetLiteral("INTEGER", to_string(v));
-}
-static inline Json LiteralDouble(double v) {
-  return GetLiteral("DECIMAL", to_string(v));
-}
-static inline Json LiteralString(const string &v) {
-  return GetLiteral("CHAR", v);
-}
-static inline Json CallExpr(const string &type, const string &op,
-                            const vector<Json> &operands) {
-  map<string, Json> v(
-      {{"inst", "call"}, {"operator", op}, {"operands", operands}});
-  map<string, Json> r({{"type", type}, {"value", Json(v)}});
-  return Json(r);
-}
-static inline Json InputRef(const string &type, int idx) {
-  map<string, Json> v({{"inst", "inputref"}, {"idx", idx}});
-  map<string, Json> r({{"type", type}, {"value", Json(v)}});
-  return Json(r);
-}
-
-TEST(TestExprCompiler, TestLiteral) {
-  LLVMContext ctx;
-  unique_ptr<Module> M(new Module("test-literal", ctx));
-  unique_ptr<BasicBlock> BB(BasicBlock::Create(ctx));
-  llvm::IRBuilder<> builder(BB.get());
-  TypeSystem ts(M.get());
-  SMDiagnostic err;
-  ExprCompiler compiler("TestLiteral", &ts, &builder, &err);
-  Value *v = compiler.Visit(LiteralBool(1));
-  ConstantInt *CI = dyn_cast<ConstantInt>(v);
-  ASSERT_TRUE(CI && CI == ConstantInt::getTrue(CI->getType()));
-
-  v = compiler.Visit(LiteralInt(1));
-  CI = dyn_cast<ConstantInt>(v);
-  ASSERT_TRUE(CI && CI->getValue() == 1);
-
-  v = compiler.Visit(LiteralDouble(1.0));
-  ConstantFP *CF = dyn_cast<ConstantFP>(v);
-  ASSERT_TRUE(CF &&
-              CF->getValueAPF().compare(APFloat(1.0)) == APFloat::cmpEqual);
-
-  v = compiler.Visit(LiteralString("foo"));
-  GlobalVariable *GV = dyn_cast<GlobalVariable>(v);
-  ASSERT_TRUE(GV && GV->isConstant());
-  ConstantDataSequential *CDS =
-      dyn_cast<ConstantDataSequential>(GV->getInitializer());
-  ASSERT_TRUE(CDS && CDS->getAsCString() == "foo");
-}
-
-TEST(TestExprCompiler, TestCompare) {
-  LLVMContext ctx;
-  unique_ptr<Module> M(new Module("test-compare", ctx));
-  TypeSystem ts(M.get());
-  FunctionType *FTy = FunctionType::get(
-      Type::getVoidTy(ctx),
-      {Type::getInt32Ty(ctx), ts.llvm_string_type(), Type::getDoubleTy(ctx)},
-      false);
-  Function *F =
-      Function::Create(FTy, GlobalValue::PrivateLinkage, "dummy", M.get());
-  BasicBlock *BB = BasicBlock::Create(ctx, "entry", F);
-  llvm::IRBuilder<> builder(BB);
-  SMDiagnostic err;
-  ExprCompiler compiler("TestCompare", &ts, &builder, &err);
-  Value *v = compiler.Visit(
-      CallExpr("BOOLEAN", "<", {InputRef("INTEGER", 0), LiteralInt(2)}));
-  ICmpInst *IC = dyn_cast<ICmpInst>(v);
-  ASSERT_TRUE(IC && IC->getPredicate() == ICmpInst::ICMP_SLT);
-  v = compiler.Visit(
-      CallExpr("BOOLEAN", "=", {InputRef("CHAR", 1), LiteralString("2")}));
-  CallInst *CI = dyn_cast<CallInst>(v);
-  ASSERT_TRUE(CI && CI->getCalledFunction() == ts.equals());
-  v = compiler.Visit(
-      CallExpr("BOOLEAN", "<>", {InputRef("DECIMAL", 2), LiteralDouble(2)}));
-  FCmpInst *FC = dyn_cast<FCmpInst>(v);
-  ASSERT_TRUE(FC && FC->getPredicate() == FCmpInst::FCMP_ONE);
-  ASSERT_TRUE(verifyModule(*M));
-}

http://git-wip-us.apache.org/repos/asf/storm/blob/024c146c/external/sql/storm-sql-core/src/native/third_party/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/external/sql/storm-sql-core/src/native/third_party/CMakeLists.txt b/external/sql/storm-sql-core/src/native/third_party/CMakeLists.txt
deleted file mode 100644
index efc9e97..0000000
--- a/external/sql/storm-sql-core/src/native/third_party/CMakeLists.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-#
-# 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.
-#
-
-add_subdirectory(json11)
-add_subdirectory(gmock-1.7.0)

http://git-wip-us.apache.org/repos/asf/storm/blob/024c146c/external/sql/storm-sql-core/src/native/third_party/gmock-1.7.0/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/external/sql/storm-sql-core/src/native/third_party/gmock-1.7.0/CMakeLists.txt b/external/sql/storm-sql-core/src/native/third_party/gmock-1.7.0/CMakeLists.txt
deleted file mode 100644
index 57934a6..0000000
--- a/external/sql/storm-sql-core/src/native/third_party/gmock-1.7.0/CMakeLists.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-missing-field-initializers -Wno-unused-const-variable")
-add_library(gmock_main gmock-gtest-all.cc gmock_main.cc)

http://git-wip-us.apache.org/repos/asf/storm/blob/024c146c/external/sql/storm-sql-core/src/native/third_party/gmock-1.7.0/LICENSE
----------------------------------------------------------------------
diff --git a/external/sql/storm-sql-core/src/native/third_party/gmock-1.7.0/LICENSE b/external/sql/storm-sql-core/src/native/third_party/gmock-1.7.0/LICENSE
deleted file mode 100644
index 1941a11..0000000
--- a/external/sql/storm-sql-core/src/native/third_party/gmock-1.7.0/LICENSE
+++ /dev/null
@@ -1,28 +0,0 @@
-Copyright 2008, Google Inc.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-    * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
-    * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.