You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by gu...@apache.org on 2018/12/27 14:26:49 UTC

[spark] branch master updated: [SPARK-25892][SQL] Change AttributeReference.withMetadata's return type to AttributeReference

This is an automated email from the ASF dual-hosted git repository.

gurwls223 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new add287f  [SPARK-25892][SQL] Change AttributeReference.withMetadata's return type to AttributeReference
add287f is described below

commit add287f397d41c1725464dff89d4a555ffc9db04
Author: Kevin Yu <qy...@us.ibm.com>
AuthorDate: Thu Dec 27 22:26:37 2018 +0800

    [SPARK-25892][SQL] Change AttributeReference.withMetadata's return type to AttributeReference
    
    ## What changes were proposed in this pull request?
    
    Currently the `AttributeReference.withMetadata` method have return type `Attribute`, the rest of with methods in the `AttributeReference` return type are `AttributeReference`, as the [spark-25892](https://issues.apache.org/jira/browse/SPARK-25892?jql=project%20%3D%20SPARK%20AND%20component%20in%20(ML%2C%20PySpark%2C%20SQL)) mentioned.
    This PR will change `AttributeReference.withMetadata` method's return type from `Attribute` to `AttributeReference`.
    ## How was this patch tested?
    
    Run all `sql/test,` `catalyst/test` and `org.apache.spark.sql.execution.streaming.*`
    
    Closes #22918 from kevinyu98/spark-25892.
    
    Authored-by: Kevin Yu <qy...@us.ibm.com>
    Signed-off-by: Hyukjin Kwon <gu...@apache.org>
---
 .../org/apache/spark/sql/catalyst/expressions/namedExpressions.scala    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/namedExpressions.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/namedExpressions.scala
index 131459b..7ebb171 100644
--- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/namedExpressions.scala
+++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/namedExpressions.scala
@@ -311,7 +311,7 @@ case class AttributeReference(
     }
   }
 
-  override def withMetadata(newMetadata: Metadata): Attribute = {
+  override def withMetadata(newMetadata: Metadata): AttributeReference = {
     AttributeReference(name, dataType, nullable, newMetadata)(exprId, qualifier)
   }
 


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