Hi,

For now, I see two ways of solving this issue:

1. Find minimum JDK build version where this issue is fixed and specify it
in requireJavaVersion tag in maven-enforcer-plugin:
https://maven.apache.org/enforcer/enforcer-rules/requireJavaVersion.html
So build will fail with a clear error message instead of compilation error.

2. Explicitly specify RuntimeException type in generic for method, add the
corresponding comment and suppression to avoid warnings in IDE. (If someone
has checked that it works. See my previous email.)

Kind regards,
Volodymyr Vysotskyi


On Tue, Apr 2, 2019 at 6:35 PM Charles Givre <[email protected]> wrote:

> All,
> I tried this on another machine with a higher version of Java and it
> worked without the changes below.  So it would seem that this probably is a
> bug in JDK. How do we proceed?
>
> > On Apr 1, 2019, at 17:12, Sorabh Hamirwasia <[email protected]>
> wrote:
> >
> > I am not seeing any issue with latest maven and with below java version.
> As
> > Vova suggested this could be a JDK bug.
> >
> > *# mvn --version*
> > *Java HotSpot(TM) 64-Bit Server VM warning: ignoring option
> > MaxPermSize=256m; support was removed in 8.0*
> > *Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3;
> > 2018-10-24T11:41:47-07:00)*
> > *Maven home: /opt/maven/apache-maven-3.6.0*
> > *Java version: 1.8.0_131, vendor: Oracle Corporation, runtime:
> > /opt/jdk1.8.0_131/jre*
> >
> > @Charles/Hanu,
> > Can you upgrade your JDK version and try once ?
> >
> > Thanks,
> > Sorabh
> >
> > On Mon, Apr 1, 2019 at 1:53 PM hanu mapr <[email protected]> wrote:
> >
> >> Hello Vova,
> >>
> >> Here is the java version on my laptop.
> >>
> >> HMADURI-E597:drill hmaduri$ java -version
> >> java version "1.8.0_91"
> >> Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
> >> Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)
> >> HMADURI-E597:drill hmaduri$ javac -version
> >> javac 1.8.0_91
> >>
> >> Thanks,
> >> -Hanu
> >>
> >> On Mon, Apr 1, 2019 at 1:45 PM Charles Givre <[email protected]> wrote:
> >>
> >>> Hi Volodmyr,
> >>> I’m on a Mac OSX Mohave, java version 1.8.0_65, maven version 3.6.0.
> >>>
> >>> In order to get Drill to build I had to make the following changes:
> >>>
> >>> org/apache/drill/exec/store/parquet/TestParquetFilterPushDown.java (add
> >>> try/catch)
> >>>
> >>> private void
> >>> testParquetRowGroupFilterEval(MetadataBase.ParquetTableMetadataBase
> >> footer,
> >>> final int rowGroupIndex, final LogicalExpression filterExpr, RowsMatch
> >>> canDropExpected) {
> >>> try {
> >>>   RowsMatch canDrop = FilterEvaluatorUtils.evalFilter(filterExpr,
> >> footer,
> >>> rowGroupIndex, fragContext.getOptions(), fragContext);
> >>>   Assert.assertEquals(canDropExpected, canDrop);
> >>> } catch (Exception e) {
> >>>   fail();
> >>> }
> >>> }
> >>>
> >>> and
> >>>
> >>> org/apache/drill/exec/store/parquet/FilterEvaluatorUtils.java
> >>>
> >>> public static RowsMatch evalFilter(LogicalExpression expr,
> >>> MetadataBase.ParquetTableMetadataBase footer,
> >>>                                  int rowGroupIndex, OptionManager
> >>> options, FragmentContext fragmentContext) throws Exception {
> >>>
> >>> where I added throws Exception.
> >>>
> >>>
> >>>> On Apr 1, 2019, at 16:11, Vova Vysotskyi <[email protected]> wrote:
> >>>>
> >>>> Hi all,
> >>>>
> >>>> Looking into the code, I don't see a reason for compilation failure,
> >>> since
> >>>> the exception type should be inferred from *FieldReferenceFinder*,
> >> which
> >>>> contains *RuntimeException*.
> >>>>
> >>>> Perhaps it may be JDK bug, something like this
> >>>> https://bugs.openjdk.java.net/browse/JDK-8066974.
> >>>> Charles, Hanu, could you please share you JDK versions, on my
> >>>> machine 1.8.0_191 and everything works fine.
> >>>>
> >>>> Also, could you please check whether specifying types explicitly will
> >>> help:
> >>>> *expr.accept(new FieldReferenceFinder(), null)* *->*
> >>> *expr.<Set<SchemaPath>,
> >>>> Void, RuntimeException>accept(new FieldReferenceFinder(), null)*
> >>>>
> >>>> Kind regards,
> >>>> Volodymyr Vysotskyi
> >>>>
> >>>>
> >>>> On Mon, Apr 1, 2019 at 10:40 PM Charles Givre <[email protected]>
> >> wrote:
> >>>>
> >>>>> Hi Hanu,
> >>>>> I posted code that fixed this to the list.  Once I did that, it
> worked
> >>>>> fine.
> >>>>> —C
> >>>>>
> >>>>>> On Apr 1, 2019, at 15:39, hanu mapr <[email protected]> wrote:
> >>>>>>
> >>>>>> Hello All,
> >>>>>>
> >>>>>> The exact function which is causing this error is the following.
> >>>>>>
> >>>>>> public static RowsMatch evalFilter(LogicalExpression expr,
> >>>>>> MetadataBase.ParquetTableMetadataBase footer,
> >>>>>>                                 int rowGroupIndex, OptionManager
> >>>>>> options, FragmentContext fragmentContext) throws Exception {
> >>>>>>
> >>>>>> and also for the caller functions in TestParquetFilterPushDown all
> >>> along.
> >>>>>>
> >>>>>> I think evalFilter needs to catch the Exception or throw an
> >> Exception.
> >>>>>> I just tried this, didn't put much thought into it. So I think this
> >>>>>> Exception needs to be handled properly.
> >>>>>>
> >>>>>>
> >>>>>> Thanks,
> >>>>>>
> >>>>>> -Hanu
> >>>>>>
> >>>>>>
> >>>>>> On Mon, Apr 1, 2019 at 12:20 PM hanu mapr <[email protected]>
> >> wrote:
> >>>>>>
> >>>>>>> Hello All,
> >>>>>>>
> >>>>>>> I am also getting the same error which Charles got on compilation
> of
> >>> the
> >>>>>>> latest build.
> >>>>>>>
> >>>>>>>
> >>>>>>> Here is the message which I got.
> >>>>>>>
> >>>>>>> [ERROR]
> >>>>>>>
> >>>>>
> >>>
> >>
> /Users/hmaduri/contribs/APACHE/drill/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/FilterEvaluatorUtils.java:[59,68]
> >>>>>>> error: unreported exception E; must be caught or declared to be
> >> thrown
> >>>>>>> where E,T,V are type-variables:
> >>>>>>>  E extends Exception declared in method
> >>>>>>> <T,V,E>accept(ExprVisitor<T,V,E>,V)
> >>>>>>>  T extends Object declared in method
> >>>>> <T,V,E>accept(ExprVisitor<T,V,E>,V)
> >>>>>>>  V extends Object declared in method
> >>>>> <T,V,E>accept(ExprVisitor<T,V,E>,V)
> >>>>>>>
> >>>>>>> Thanks,
> >>>>>>> -Hanu
> >>>>>>>
> >>>>>>> On Mon, Apr 1, 2019 at 11:09 AM Abhishek Girish <
> [email protected]
> >>>
> >>>>>>> wrote:
> >>>>>>>
> >>>>>>>> Hey Charles,
> >>>>>>>>
> >>>>>>>> On the latest apache/drill master, I don't see any errors during
> >>> build
> >>>>> /
> >>>>>>>> running unit tests. But sometimes I've seen this issue with stale
> >>>>>>>> artifacts.. Can you clear all maven artifacts from your local
> maven
> >>>>> repo
> >>>>>>>> cache and build master again (or with -U option)?
> >>>>>>>>
> >>>>>>>> On Mon, Apr 1, 2019 at 10:46 AM Charles Givre <[email protected]>
> >>>>> wrote:
> >>>>>>>>
> >>>>>>>>> Hello all,
> >>>>>>>>> There does seem to be some regression here…
> >>>>>>>>>
> >>>>>>>>> In order to get Drill to build I had to make the following
> >> changes:
> >>>>>>>>>
> >>>>>>>>>
> org/apache/drill/exec/store/parquet/TestParquetFilterPushDown.java
> >>>>> (add
> >>>>>>>>> try/catch)
> >>>>>>>>>
> >>>>>>>>> private void
> >>>>>>>>>
> >> testParquetRowGroupFilterEval(MetadataBase.ParquetTableMetadataBase
> >>>>>>>> footer,
> >>>>>>>>> final int rowGroupIndex, final LogicalExpression filterExpr,
> >>> RowsMatch
> >>>>>>>>> canDropExpected) {
> >>>>>>>>> try {
> >>>>>>>>>  RowsMatch canDrop = FilterEvaluatorUtils.evalFilter(filterExpr,
> >>>>>>>>> footer, rowGroupIndex, fragContext.getOptions(), fragContext);
> >>>>>>>>>  Assert.assertEquals(canDropExpected, canDrop);
> >>>>>>>>> } catch (Exception e) {
> >>>>>>>>>  fail();
> >>>>>>>>> }
> >>>>>>>>> }
> >>>>>>>>>
> >>>>>>>>> and
> >>>>>>>>>
> >>>>>>>>> org/apache/drill/exec/store/parquet/FilterEvaluatorUtils.java
> >>>>>>>>>
> >>>>>>>>> public static RowsMatch evalFilter(LogicalExpression expr,
> >>>>>>>>> MetadataBase.ParquetTableMetadataBase footer,
> >>>>>>>>>                                 int rowGroupIndex, OptionManager
> >>>>>>>>> options, FragmentContext fragmentContext) throws Exception {
> >>>>>>>>>
> >>>>>>>>> where I added throws Exception.
> >>>>>>>>>
> >>>>>>>>> Once I did that Drill built just fine.
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>> On Apr 1, 2019, at 11:35, Charles Givre <[email protected]>
> >> wrote:
> >>>>>>>>>>
> >>>>>>>>>> Hey Arina,
> >>>>>>>>>> Just some more info…
> >>>>>>>>>> I cloned the repo straight from the Apache/Drill github repo,
> >>>>>>>> attempted
> >>>>>>>>> to build and got the same error.  I’m on a Mac OSX Mohave, java
> >>>>> version
> >>>>>>>>> 1.8.0_65, maven version 3.6.0.
> >>>>>>>>>> Could there be something in my environment that is causing this?
> >>> Can
> >>>>>>>>> anyone else duplicate the problem?
> >>>>>>>>>> — C
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>> On Apr 1, 2019, at 11:03, Charles Givre <[email protected]>
> >> wrote:
> >>>>>>>>>>>
> >>>>>>>>>>> Hey Arina,
> >>>>>>>>>>> Any suggestions on how to fix?  I’ve tried rebasing again to no
> >>>>>>>> avail.
> >>>>>>>>>>>
> >>>>>>>>>>>> On Apr 1, 2019, at 10:28, Arina Yelchiyeva <
> >>>>>>>> [email protected]>
> >>>>>>>>> wrote:
> >>>>>>>>>>>>
> >>>>>>>>>>>> Hi Charles,
> >>>>>>>>>>>>
> >>>>>>>>>>>> Build on the latest commit is successful -
> >>>>>>>>>
> >>>>>>>>
> >>>>>
> >>>
> >>
> https://travis-ci.org/apache/drill/builds/514145219?utm_source=github_status&utm_medium=notification
> >>>>>>>>> <
> >>>>>>>>>
> >>>>>>>>
> >>>>>
> >>>
> >>
> https://travis-ci.org/apache/drill/builds/514145219?utm_source=github_status&utm_medium=notification
> >>>>>>>>>>
> >>>>>>>>>>>> Git does not always rebase smoothly, even if it writes that
> >>> rebase
> >>>>>>>> was
> >>>>>>>>> successful.
> >>>>>>>>>>>>
> >>>>>>>>>>>> Kind regards,
> >>>>>>>>>>>> Arina
> >>>>>>>>>>>>
> >>>>>>>>>>>>> On Apr 1, 2019, at 5:20 PM, Charles Givre <[email protected]>
> >>>>>>>> wrote:
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> All,
> >>>>>>>>>>>>> I just rebased Drill with the latest commits and it no longer
> >>>>>>>>> builds.  I’m getting the following errors:
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> [ERROR] Failed to execute goal
> >>>>>>>>> org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile
> >>>>>>>>> (default-compile) on project drill-java-exec: Compilation failure
> >>>>>>>>>>>>> [ERROR]
> >>>>>>>>>
> >>>>>>>>
> >>>>>
> >>>
> >>
> /Users/cgivre/github/drill-dev/drill/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/FilterEvaluatorUtils.java:[59,68]
> >>>>>>>>> error: unreported exception E; must be caught or declared to be
> >>> thrown
> >>>>>>>>>>>>> [ERROR]   where E,T,V are type-variables:
> >>>>>>>>>>>>> [ERROR]     E extends Exception declared in method
> >>>>>>>>> <T,V,E>accept(ExprVisitor<T,V,E>,V)
> >>>>>>>>>>>>> [ERROR]     T extends Object declared in method
> >>>>>>>>> <T,V,E>accept(ExprVisitor<T,V,E>,V)
> >>>>>>>>>>>>> [ERROR]     V extends Object declared in method
> >>>>>>>>> <T,V,E>accept(ExprVisitor<T,V,E>,V)
> >>>>>>>>>>>>> [ERROR]
> >>>>>>>>>>>>> [ERROR] -> [Help 1]
> >>>>>>>>>>>>> [ERROR]
> >>>>>>>>>>>>> [ERROR] To see the full stack trace of the errors, re-run
> >> Maven
> >>>>>>>> with
> >>>>>>>>> the -e switch.
> >>>>>>>>>>>>> [ERROR] Re-run Maven using the -X switch to enable full debug
> >>>>>>>> logging.
> >>>>>>>>>>>>> [ERROR]
> >>>>>>>>>>>>> [ERROR] For more information about the errors and possible
> >>>>>>>> solutions,
> >>>>>>>>> please read the following articles:
> >>>>>>>>>>>>> [ERROR] [Help 1]
> >>>>>>>>>
> >>> http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
> >>>>>>>>>>>>> [ERROR]
> >>>>>>>>>>>>> [ERROR] After correcting the problems, you can resume the
> >> build
> >>>>>>>> with
> >>>>>>>>> the command
> >>>>>>>>>>>>> [ERROR]   mvn <goals> -rf :drill-java-exec
> >>>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>
> >>>>>>>
> >>>>>
> >>>>>
> >>>
> >>>
> >>
>
>

Reply via email to