You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Chia-Ping Tsai (JIRA)" <ji...@apache.org> on 2018/07/02 03:31:00 UTC

[jira] [Commented] (SPARK-24714) AnalysisSuite should use ClassTag to check the runtime instance

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

Chia-Ping Tsai commented on SPARK-24714:
----------------------------------------

I have no permission to assign this Jira to myself. need helps.

> AnalysisSuite should use ClassTag to check the runtime instance
> ---------------------------------------------------------------
>
>                 Key: SPARK-24714
>                 URL: https://issues.apache.org/jira/browse/SPARK-24714
>             Project: Spark
>          Issue Type: Test
>          Components: SQL
>    Affects Versions: 2.3.1
>            Reporter: Chia-Ping Tsai
>            Priority: Minor
>
> {code:java}
> test("SPARK-22614 RepartitionByExpression partitioning") {
> def checkPartitioning[T <: Partitioning](numPartitions: Int, exprs: Expression*): Unit = {
>   val partitioning = RepartitionByExpression(exprs, testRelation2, numPartitions).partitioning
>   assert(partitioning.isInstanceOf[T]) // it always be true because of type erasure
> }{code}
> Spark support the scala 2.10 and 2.11 so it is ok to introduce ClassTag to correct the type check.
>  



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

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