You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2018/04/23 07:13:00 UTC

[jira] [Commented] (CALCITE-2259) Allow Java 8 syntax in source files

    [ https://issues.apache.org/jira/browse/CALCITE-2259?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16447659#comment-16447659 ] 

Julian Hyde commented on CALCITE-2259:
--------------------------------------

Some features that we can use when we're on JDK 8 (copied from CALCITE-2027):

* Migrate sub-classes of {{ThreadLocal}} to use {{ThreadLocal.withSupplier}}.
* Resource references; change {{try (Closeable ignore = foo())}} to {{try (foo())}}, especially uses of {{TryThreadLocal}} and {{Hook.Closeable}}.
* Change uses of SAM interfaces to lambdas:
 ** Calcite: Bindable, Node, SqlTypeTransform, SqlOperandTypeInference, SqlReturnTypeInference, UnboundMetadata, RelRunner, Handler.ResultSink, Frameworks.PlannerAction, Invokable, SqlParserImplFactory;
  ** Guava: Function, Predicate and Supplier;
  ** Linq4j: Function0, Function1, Predicate1, Predicate2;
  ** Java: Iterable, Callable, InvocationHandler, Closeable, Comparator.
* Calls to Iterables.transform "pseudo-functional style" can be converted to streams

> Allow Java 8 syntax in source files
> -----------------------------------
>
>                 Key: CALCITE-2259
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2259
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Julian Hyde
>            Assignee: Julian Hyde
>            Priority: Major
>
> Allow Java 8 syntax in source files.
> In core/pom.xml, I tried changing {{source=1.7 target=1.8}} to {{source=8 target=8}} but I ran into [Janino issue 47|https://github.com/janino-compiler/janino/issues/47]. (Thanks, [~vvysotskyi], for logging that issue.)
> When this is fixed, we will be able to use lambdas ({{->}}).
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)