You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (JIRA)" <ji...@apache.org> on 2018/12/27 14:28:00 UTC

[jira] [Resolved] (SPARK-25892) AttributeReference.withMetadata method should have return type AttributeReference

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

Hyukjin Kwon resolved SPARK-25892.
----------------------------------
       Resolution: Fixed
    Fix Version/s: 3.0.0

Issue resolved by pull request 22918
[https://github.com/apache/spark/pull/22918]

> AttributeReference.withMetadata method should have return type AttributeReference
> ---------------------------------------------------------------------------------
>
>                 Key: SPARK-25892
>                 URL: https://issues.apache.org/jira/browse/SPARK-25892
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 2.4.0
>            Reporter: Jari Kujansuu
>            Assignee: kevin yu
>            Priority: Trivial
>             Fix For: 3.0.0
>
>
> AttributeReference.withMetadata method should have return type AttributeReference instead of Attribute.
> AttributeReference overrides withMetadata method defined in Attribute super class and returns AttributeReference instance but method's return type is Attribute unlike in other with... methods overridden by AttributeReference.
> In some cases you have to cast the return value back to AttributeReference.
> For example if you want to modify metadata for AttributeReference in LogicalRelation you have to cast return value of withMetadata back to AttributeReference because LogicalRelation takes Seq[AttributeReference] as argument.



--
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