You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Sergey Shelukhin (JIRA)" <ji...@apache.org> on 2018/06/30 01:42:00 UTC

[jira] [Commented] (HIVE-20030) Fix Java compile errors that show up in IntelliJ from ConvertJoinMapJoin.java and AnnotateRunTimeStatsOptimizer.java

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

Sergey Shelukhin commented on HIVE-20030:
-----------------------------------------

Could this be Java version related? IIRC I've seen errors with generics inference when using Java 7 that I don't get with Java 8, although the errors were different.

> Fix Java compile errors that show up in IntelliJ from ConvertJoinMapJoin.java and AnnotateRunTimeStatsOptimizer.java
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-20030
>                 URL: https://issues.apache.org/jira/browse/HIVE-20030
>             Project: Hive
>          Issue Type: Task
>            Reporter: Andrew Sherman
>            Assignee: Andrew Sherman
>            Priority: Major
>         Attachments: HIVE-20030.1.patch
>
>
> For some reason the Java compiler in IntellJ is more strict that the Oracle jdk compiler. Maybe this is something that can be configured away, but as it is simple I propose to make the code more type correct. 
> {code}
> /Users/asherman/git/asf/hive2/ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConvertJoinMapJoin.java
> Error:(613, 24) java: no suitable method found for findOperatorsUpstream(java.util.List<org.apache.hadoop.hive.ql.exec.Operator<? extends org.apache.hadoop.hive.ql.plan.OperatorDesc>>,java.lang.Class<org.apache.hadoop.hive.ql.exec.ReduceSinkOperator>)
>     method org.apache.hadoop.hive.ql.exec.OperatorUtils.<T>findOperatorsUpstream(org.apache.hadoop.hive.ql.exec.Operator<?>,java.lang.Class<T>) is not applicable
>       (cannot infer type-variable(s) T
>         (argument mismatch; java.util.List<org.apache.hadoop.hive.ql.exec.Operator<? extends org.apache.hadoop.hive.ql.plan.OperatorDesc>> cannot be converted to org.apache.hadoop.hive.ql.exec.Operator<?>))
>     method org.apache.hadoop.hive.ql.exec.OperatorUtils.<T>findOperatorsUpstream(java.util.Collection<org.apache.hadoop.hive.ql.exec.Operator<?>>,java.lang.Class<T>) is not applicable
>       (cannot infer type-variable(s) T
>         (argument mismatch; java.util.List<org.apache.hadoop.hive.ql.exec.Operator<? extends org.apache.hadoop.hive.ql.plan.OperatorDesc>> cannot be converted to java.util.Collection<org.apache.hadoop.hive.ql.exec.Operator<?>>))
>     method org.apache.hadoop.hive.ql.exec.OperatorUtils.<T>findOperatorsUpstream(org.apache.hadoop.hive.ql.exec.Operator<?>,java.lang.Class<T>,java.util.Set<T>) is not applicable
>       (cannot infer type-variable(s) T
>         (actual and formal argument lists differ in length))
> {code}
> and
> {code}
> /Users/asherman/git/asf/hive2/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/AnnotateRunTimeStatsOptimizer.java
> Error:(76, 12) java: no suitable method found for addAll(java.util.List<org.apache.hadoop.hive.ql.exec.Operator<?>>)
>     method java.util.Collection.addAll(java.util.Collection<? extends org.apache.hadoop.hive.ql.exec.Operator<? extends org.apache.hadoop.hive.ql.plan.OperatorDesc>>) is not applicable
>       (argument mismatch; java.util.List<org.apache.hadoop.hive.ql.exec.Operator<?>> cannot be converted to java.util.Collection<? extends org.apache.hadoop.hive.ql.exec.Operator<? extends org.apache.hadoop.hive.ql.plan.OperatorDesc>>)
>     method java.util.Set.addAll(java.util.Collection<? extends org.apache.hadoop.hive.ql.exec.Operator<? extends org.apache.hadoop.hive.ql.plan.OperatorDesc>>) is not applicable
>       (argument mismatch; java.util.List<org.apache.hadoop.hive.ql.exec.Operator<?>> cannot be converted to java.util.Collection<? extends org.apache.hadoop.hive.ql.exec.Operator<? extends org.apache.hadoop.hive.ql.plan.OperatorDesc>>)
> Error:(80, 14) java: no suitable method found for addAll(java.util.Set<org.apache.hadoop.hive.ql.exec.Operator<?>>)
>     method java.util.Collection.addAll(java.util.Collection<? extends org.apache.hadoop.hive.ql.exec.Operator<? extends org.apache.hadoop.hive.ql.plan.OperatorDesc>>) is not applicable
>       (argument mismatch; java.util.Set<org.apache.hadoop.hive.ql.exec.Operator<?>> cannot be converted to java.util.Collection<? extends org.apache.hadoop.hive.ql.exec.Operator<? extends org.apache.hadoop.hive.ql.plan.OperatorDesc>>)
>     method java.util.Set.addAll(java.util.Collection<? extends org.apache.hadoop.hive.ql.exec.Operator<? extends org.apache.hadoop.hive.ql.plan.OperatorDesc>>) is not applicable
>       (argument mismatch; java.util.Set<org.apache.hadoop.hive.ql.exec.Operator<?>> cannot be converted to java.util.Collection<? extends org.apache.hadoop.hive.ql.exec.Operator<? extends org.apache.hadoop.hive.ql.plan.OperatorDesc>>)
> Error:(85, 14) java: no suitable method found for addAll(java.util.Set<org.apache.hadoop.hive.ql.exec.Operator<?>>)
>     method java.util.Collection.addAll(java.util.Collection<? extends org.apache.hadoop.hive.ql.exec.Operator<? extends org.apache.hadoop.hive.ql.plan.OperatorDesc>>) is not applicable
>       (argument mismatch; java.util.Set<org.apache.hadoop.hive.ql.exec.Operator<?>> cannot be converted to java.util.Collection<? extends org.apache.hadoop.hive.ql.exec.Operator<? extends org.apache.hadoop.hive.ql.plan.OperatorDesc>>)
>     method java.util.Set.addAll(java.util.Collection<? extends org.apache.hadoop.hive.ql.exec.Operator<? extends org.apache.hadoop.hive.ql.plan.OperatorDesc>>) is not applicable
>       (argument mismatch; java.util.Set<org.apache.hadoop.hive.ql.exec.Operator<?>> cannot be converted to java.util.Collection<? extends org.apache.hadoop.hive.ql.exec.Operator<? extends org.apache.hadoop.hive.ql.plan.OperatorDesc>>)
> /Users/asherman/git/asf/hive2/ql/target/generated-sources/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/IntervalYearMonthScalarAddTimestampColumn.java
> {code}



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