You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "liyunzhang (JIRA)" <ji...@apache.org> on 2017/11/30 07:40:00 UTC

[jira] [Comment Edited] (SPARK-22660) Use position() and limit() to fix ambiguity issue in scala-2.12 and JDK9

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

liyunzhang edited comment on SPARK-22660 at 11/30/17 7:39 AM:
--------------------------------------------------------------

some new error 
{code}
error] /home/zly/prj/oss/jdk9_HOS_SOURCE/spark_source/sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/ScriptTransformationExec.scala:415: ambiguous reference to overloaded definition,
[error] both method putAll in class Properties of type (x$1: java.util.Map[_, _])Unit
[error] and  method putAll in class Hashtable of type (x$1: java.util.Map[_ <: Object, _ <: Object])Unit
[error] match argument types (java.util.Map[String,String])
[error]     properties.putAll(propsMap.asJava)
[error]                ^
[error] /home/zly/prj/oss/jdk9_HOS_SOURCE/spark_source/sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/ScriptTransformationExec.scala:427: ambiguous reference to overloaded definition,
[error] both method putAll in class Properties of type (x$1: java.util.Map[_, _])Unit
[error] and  method putAll in class Hashtable of type (x$1: java.util.Map[_ <: Object, _ <: Object])Unit
[error] match argument types (java.util.Map[String,String])
[error]       props.putAll(outputSerdeProps.toMap.asJava)
[error]             ^

{code}

The key type is Object instead of String, which is unsafe.


was (Author: kellyzly):
some new error 
{code}
error] /home/zly/prj/oss/jdk9_HOS_SOURCE/spark_source/sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/ScriptTransformationExec.scala:415: ambiguous reference to overloaded definition,
[error] both method putAll in class Properties of type (x$1: java.util.Map[_, _])Unit
[error] and  method putAll in class Hashtable of type (x$1: java.util.Map[_ <: Object, _ <: Object])Unit
[error] match argument types (java.util.Map[String,String])
[error]     properties.putAll(propsMap.asJava)
[error]                ^
[error] /home/zly/prj/oss/jdk9_HOS_SOURCE/spark_source/sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/ScriptTransformationExec.scala:427: ambiguous reference to overloaded definition,
[error] both method putAll in class Properties of type (x$1: java.util.Map[_, _])Unit
[error] and  method putAll in class Hashtable of type (x$1: java.util.Map[_ <: Object, _ <: Object])Unit
[error] match argument types (java.util.Map[String,String])
[error]       props.putAll(outputSerdeProps.toMap.asJava)
[error]             ^

{code}

> Use position() and limit() to fix ambiguity issue in scala-2.12 and JDK9
> ------------------------------------------------------------------------
>
>                 Key: SPARK-22660
>                 URL: https://issues.apache.org/jira/browse/SPARK-22660
>             Project: Spark
>          Issue Type: Improvement
>          Components: Build
>    Affects Versions: 2.2.0
>            Reporter: liyunzhang
>
> Based on SPARK-22659
> 1. compile with -Pscala-2.12 and get the error
> {code}
> Use position() and limit() to fix ambiguity issue
> {code}
> spark_source/core/src/main/scala/org/apache/spark/executor/Executor.scala:455: ambiguous reference to overloaded definition, method limit in class ByteBuffer of type (x$1: Int)java.nio.ByteBuffer
> method limit in class Buffer of type ()Int
> match expected type ?
>      val resultSize = serializedDirectResult.limit
> error                                         
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org