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/02/25 15:48:36 UTC

[GitHub] MichaelChirico opened a new pull request #23888: Add a clarifying note to str_to_map documentation

MichaelChirico opened a new pull request #23888: Add a clarifying note to str_to_map documentation
URL: https://github.com/apache/spark/pull/23888
 
 
   I was quite surprised by the following behavior:
   
   `SELECT str_to_map('1:2|3:4', '|')`
   
   vs
   
   `SELECT str_to_map(replace('1:2|3:4', '|', ','))`
   
   The documentation does not make clear at all what's going on here, but a [dive into the source code shows](https://github.com/apache/spark/blob/fa0d4bf69929c5acd676d602e758a969713d19d8/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/complexTypeCreator.scala#L461-L466) that `split` is being used and in turn the interpretation of `split`'s arguments as RegEx is clearly documented.
   
   ## What changes were proposed in this pull request?
   
   (Please fill in changes proposed in this fix)
   
   ## How was this patch tested?
   
   (Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)
   (If this patch involves UI changes, please attach a screenshot; otherwise, remove this)
   
   Please review http://spark.apache.org/contributing.html before opening a pull request.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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