Repository: calcite
Updated Branches:
  refs/heads/master 9085b6010 -> d73f24b64


[CALCITE-2261] Switch core module to JDK 8 (Enrico Olivelli)

Now it is possible to use Java 8 language features such as lambdas.

We had to work around a Janino issue,
https://github.com/janino-compiler/janino/issues/47.

Close apache/calcite#667


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

Branch: refs/heads/master
Commit: af5d85bbe07c696da33b8a46b129dee7e9f44696
Parents: 9085b60
Author: Enrico Olivelli <[email protected]>
Authored: Tue Apr 17 17:08:13 2018 +0200
Committer: Julian Hyde <[email protected]>
Committed: Thu Apr 19 13:52:30 2018 -0700

----------------------------------------------------------------------
 core/pom.xml                                                 | 4 ++--
 core/src/main/java/org/apache/calcite/schema/SchemaPlus.java | 7 ++++++-
 pom.xml                                                      | 4 ++--
 3 files changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/calcite/blob/af5d85bb/core/pom.xml
----------------------------------------------------------------------
diff --git a/core/pom.xml b/core/pom.xml
index c72c3cc..811df7e 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -176,8 +176,8 @@ limitations under the License.
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-compiler-plugin</artifactId>
         <configuration>
-          <source>1.7</source>
-          <target>1.7</target>
+          <source>8</source>
+          <target>8</target>
           <excludes>
             
<exclude>org/apache/calcite/sql/parser/parserextensiontesting/*.java</exclude>
           </excludes>

http://git-wip-us.apache.org/repos/asf/calcite/blob/af5d85bb/core/src/main/java/org/apache/calcite/schema/SchemaPlus.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/schema/SchemaPlus.java 
b/core/src/main/java/org/apache/calcite/schema/SchemaPlus.java
index ee5c02c..27576ca 100644
--- a/core/src/main/java/org/apache/calcite/schema/SchemaPlus.java
+++ b/core/src/main/java/org/apache/calcite/schema/SchemaPlus.java
@@ -17,6 +17,7 @@
 package org.apache.calcite.schema;
 
 import org.apache.calcite.materialize.Lattice;
+import org.apache.calcite.util.Bug;
 
 import com.google.common.collect.ImmutableList;
 
@@ -56,7 +57,11 @@ public interface SchemaPlus extends Schema {
   String getName();
 
   // override with stricter return
-  SchemaPlus getSubSchema(String name);
+  default SchemaPlus getSubSchema(String name) {
+    Bug.upgrade("janino 2.7.6 does not work without this method,"
+                + "see https://github.com/janino-compiler/janino/issues/47";);
+    throw new UnsupportedOperationException();
+  }
 
   /** Adds a schema as a sub-schema of this schema, and returns the wrapped
    * object. */

http://git-wip-us.apache.org/repos/asf/calcite/blob/af5d85bb/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 51bc1e6..04d7a07 100644
--- a/pom.xml
+++ b/pom.xml
@@ -616,8 +616,8 @@ limitations under the License.
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-compiler-plugin</artifactId>
         <configuration>
-          <source>1.8</source>
-          <target>1.8</target>
+          <source>8</source>
+          <target>8</target>
           <compilerArgument>-Xlint:deprecation</compilerArgument>
         </configuration>
       </plugin>

Reply via email to