You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by jf...@apache.org on 2018/12/25 21:16:06 UTC

[incubator-plc4x] branch develop updated: [CALCITE] Fixed failing test (moved calcite model.yml to json).

This is an automated email from the ASF dual-hosted git repository.

jfeinauer pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git


The following commit(s) were added to refs/heads/develop by this push:
     new 4def181  [CALCITE] Fixed failing test (moved calcite model.yml to json).
4def181 is described below

commit 4def1813e3159a88f40929b2382e3bed8aa90e60
Author: Julian Feinauer <j....@pragmaticminds.de>
AuthorDate: Tue Dec 25 22:16:01 2018 +0100

    [CALCITE] Fixed failing test (moved calcite model.yml to json).
---
 integrations/apache-calcite/pom.xml                | 19 ----------
 .../java/org/apache/plc4x/DriverManagerTest.java   |  5 ++-
 .../apache-calcite/src/test/resources/model.json   | 40 ++++++++++++++++++++++
 .../apache-calcite/src/test/resources/model.yml    | 33 ------------------
 4 files changed, 42 insertions(+), 55 deletions(-)

diff --git a/integrations/apache-calcite/pom.xml b/integrations/apache-calcite/pom.xml
index 91942ad..0bed053 100644
--- a/integrations/apache-calcite/pom.xml
+++ b/integrations/apache-calcite/pom.xml
@@ -67,25 +67,6 @@
     <plugins>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-assembly-plugin</artifactId>
-        <version>3.0.0</version>
-        <configuration>
-          <descriptorRefs>
-            <descriptorRef>jar-with-dependencies</descriptorRef>
-          </descriptorRefs>
-        </configuration>
-        <executions>
-          <execution>
-            <id>assemble-all</id>
-            <phase>package</phase>
-            <goals>
-              <goal>single</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-dependency-plugin</artifactId>
         <configuration>
           <usedDependencies>
diff --git a/integrations/apache-calcite/src/test/java/org/apache/plc4x/DriverManagerTest.java b/integrations/apache-calcite/src/test/java/org/apache/plc4x/DriverManagerTest.java
index d647dce..e86f44f 100644
--- a/integrations/apache-calcite/src/test/java/org/apache/plc4x/DriverManagerTest.java
+++ b/integrations/apache-calcite/src/test/java/org/apache/plc4x/DriverManagerTest.java
@@ -50,10 +50,9 @@ public class DriverManagerTest implements WithAssertions {
     @Test
     void query2() throws IOException, SQLException {
         Driver driver = new Driver();
-        Connection connection = driver.connect("jdbc:calcite:model=src/test/resources/model.yml;lex=MYSQL_ANSI", new Properties());
+        Connection connection = driver.connect("jdbc:calcite:model=src/test/resources/model.json", new Properties());
 
-        // ResultSet rs = connection.prepareStatement("SELECT STREAM \"test\", \"test\" * 2, \"test2\" FROM \"plc4x\".\"job1\"").executeQuery();
-        ResultSet rs = connection.prepareStatement("SELECT * FROM \"plc4x-tables\".\"job1\"").executeQuery();
+        ResultSet rs = connection.prepareStatement("SELECT * FROM \"PLC4X-TABLES\".\"job1\"").executeQuery();
 
         validateResult(rs);
 
diff --git a/integrations/apache-calcite/src/test/resources/model.json b/integrations/apache-calcite/src/test/resources/model.json
new file mode 100644
index 0000000..c19be91
--- /dev/null
+++ b/integrations/apache-calcite/src/test/resources/model.json
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+{
+  "version": 1,
+  "defaultSchema": "PLC4X",
+  "schemas": [
+  {
+    "name": "PLC4X",
+    "type": "custom",
+    "factory": "org.apache.plc4x.Plc4xSchemaFactory",
+    "operand": {
+      "config": "src/test/resources/example.yml",
+      "limit": -1
+    }
+  },
+  {
+    "name": "PLC4X-TABLES",
+    "type": "custom",
+    "factory": "org.apache.plc4x.Plc4xSchemaFactory",
+    "operand": {
+      "config": "src/test/resources/example.yml",
+      "limit": 100
+    }
+  }
+  ]
+}
\ No newline at end of file
diff --git a/integrations/apache-calcite/src/test/resources/model.yml b/integrations/apache-calcite/src/test/resources/model.yml
deleted file mode 100644
index 07b7479..0000000
--- a/integrations/apache-calcite/src/test/resources/model.yml
+++ /dev/null
@@ -1,33 +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.
-#
-# A JSON model of a simple Calcite schema.
-#
-version: 1.0
-defaultSchema: PLC4X
-schemas:
-- name: PLC4X
-  type: custom
-  factory: org.apache.plc4x.Plc4xSchemaFactory
-  operand:
-    config:  /Users/julian/Develop/incubator-plc4x/integrations/apache-calcite/src/test/resources/example.yml
-    limit: -1
-- name: PLC4X-TABLES
-  type: custom
-  factory: org.apache.plc4x.Plc4xSchemaFactory
-  operand:
-    config:  /Users/julian/Develop/incubator-plc4x/integrations/apache-calcite/src/test/resources/example.yml
-    limit: 100
\ No newline at end of file