spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [spark] HyukjinKwon opened a new pull request #27788: [WIP][SPARK-31036][SQL] Use stringArgs in Expression.toString to respect hidden parameters
Date Wed, 04 Mar 2020 09:19:25 GMT
HyukjinKwon opened a new pull request #27788: [WIP][SPARK-31036][SQL] Use stringArgs in Expression.toString
to respect hidden parameters
URL: https://github.com/apache/spark/pull/27788
 
 
   ### What changes were proposed in this pull request?
   
   This PR proposes to respect hidden parameters by using `stringArgs`  in `Expression.toString
`. By this, we can show the strings properly in some cases such as `NonSQLExpression`.
   
   ### Why are the changes needed?
   
   To respect "hidden" arguments in the string representation.
   
   ### Does this PR introduce any user-facing change?
   
   Yes, for example, on the top of https://github.com/apache/spark/pull/27657, 
   
   ```scala
   val identify = udf((input: Seq[Int]) => input)
   spark.range(10).select(identify(array("id"))).show()
   ```
   
   shows hidden parameter `useStringTypeWhenEmpty`.
   
   ```
   +---------------------+
   |UDF(array(id, false))|
   +---------------------+
   |                  [0]|
   |                  [1]|
   ...
   ```
   
   whereas:
   
   ```scala
   spark.range(10).select(array("id")).show()
   ```
   
   ```
   +---------+
   |array(id)|
   +---------+
   |      [0]|
   |      [1]|
   ...
   ```
   
   ### How was this patch tested?
   
   By existing tests.

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


Mime
View raw message