HyukjinKwon opened a new pull request #34565:
URL: https://github.com/apache/spark/pull/34565


   ### What changes were proposed in this pull request?
   
   This PR removes about the reference of ``typeName()`` in PySpark 
documentation. Using `DataType.typeName` is PySpark specific legacy behaviour. 
We should better stick to one format in documentation.
   
   ### Why are the changes needed?
   
   Using `typeName` is not actually correct for DDL parsing. Differences 
between `DataType.typeName` and `DataType.simpleString` are:
   
   - `byte` <> `tinyint`
   - `short` <> `smallint`
   - `decimal` <> `decimal(10,0)`
   - `integer` <> `int`
   
   While other cases are fine, `decimal` will lost precision and scale if we 
encourage to use `DataType.typeName`
   
   The only reason  why `DataType.typeName` was mentioned is about JSON parsing 
(at 
https://github.com/apache/spark/commit/d57daf1f7732a7ac54a91fe112deeda0a254f9ef)
 because internally we use `DataType.typeName` but that format is internal.
   
   ### Does this PR introduce _any_ user-facing change?
   
   It changes documentation in PySpark API documentation.
   
   ### How was this patch tested?
   
   CI in this PR should test it out.
   


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to