You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/03/12 09:33:45 UTC

[GitHub] [spark] viirya commented on a change in pull request #24051: [SPARK-26879][SQL] Zero based column indexing for struct function

viirya commented on a change in pull request #24051: [SPARK-26879][SQL] Zero based column indexing for struct function
URL: https://github.com/apache/spark/pull/24051#discussion_r264588131
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/complexTypeCreator.scala
 ##########
 @@ -272,7 +272,7 @@ object CreateStruct extends FunctionBuilder {
     CreateNamedStruct(children.zipWithIndex.flatMap {
       case (e: NamedExpression, _) if e.resolved => Seq(Literal(e.name), e)
       case (e: NamedExpression, _) => Seq(NamePlaceholder, e)
-      case (e, index) => Seq(Literal(s"col${index + 1}"), e)
+      case (e, index) => Seq(Literal(s"col$index"), e)
 
 Review comment:
   What functions are affected by this change? Only Inline function?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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