You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "vinoyang (Jira)" <ji...@apache.org> on 2021/01/09 10:40:00 UTC

[jira] [Closed] (HUDI-1514) Avoid raw type use for parameter of interface

     [ https://issues.apache.org/jira/browse/HUDI-1514?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

vinoyang closed HUDI-1514.
--------------------------
    Resolution: Fixed

Fixed via master branch: 1a836f9a84f0191fe4e40017308af95d872767db

> Avoid  raw type use for parameter of interface 
> -----------------------------------------------
>
>                 Key: HUDI-1514
>                 URL: https://issues.apache.org/jira/browse/HUDI-1514
>             Project: Apache Hudi
>          Issue Type: Improvement
>          Components: Utilities
>            Reporter: puyvqi
>            Assignee: puyvqi
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 0.7.0
>
>         Attachments: image-2021-01-07-17-23-46-202.png
>
>
> org.apache.hudi.utilities.transform.Transformer  method api:
> Dataset {color:#ffc66d}apply{color}(JavaSparkContext jsc{color:#cc7832}, {color}SparkSession sparkSession{color:#cc7832}, {color}Dataset<Row> rowDataset{color:#cc7832}, {color}TypedProperties properties){color:#cc7832};{color}
> {color:#172b4d}it's a bad idea to use raw type parameter(without a type parameter or wildcard) in interface ,especially Dataset[T] is define in scala,when implementing this interface in scala. it turn out to be an compilation error:
> {color}
> {code:java}
> //overriding method apply in trait Transformer of type (x$1: org.apache.spark.api.java.JavaSparkContext, x$2: org.apache.spark.sql.SparkSession, x$3: org.apache.spark.sql.Dataset[org.apache.spark.sql.Row], x$4: org.apache.hudi.common.config.TypedProperties)org.apache.spark.sql.Dataset;
> method apply has incompatible type
>   override def apply(jsc: JavaSparkContext, sparkSession: SparkSession, rowDataset: Dataset[Row], properties: TypedProperties): Dataset[_] = rowDataset
> {code}
> {code:java}
> //method apply has incompatible type
>   override def apply(jsc: JavaSparkContext, sparkSession: SparkSession, rowDataset: Dataset[Row], properties: TypedProperties): Dataset[Row] = rowDataset
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)