risinga opened a new pull request #34359:
URL: https://github.com/apache/spark/pull/34359


   ### What changes were proposed in this pull request?
   These are the following proposed improvements:
   1 - ability to retrieve from StructType, the field's name and schema in one 
single call, requesting to return a tupple by index. 
   2 - Allowing for a dataset to be created from a schema, and passing the 
corresponding internal rows which the internal types map with the schema 
already defined externally. 
   
   
   ### Why are the changes needed?
   Explanations provided for the respective changes mentioned earlier
   1- Avoids two client calls/loops to obtain consolidated field info, when 
looping through a schema and updating field values on a genericRow data type.
   2 - This allows to create Spark fields based on any data structure, without 
depending on Spark's internal conversions (in particular for Json parsing), and 
improves performance by skipping the CatalystConverts job of converting native 
Java types into Spark types.
   
   
   
   ### Does this PR introduce _any_ user-facing change?
   This PR augments the current DataSet API and the StructType object 
manipulation. 
   
   
   ### How was this patch tested?
   Unit tests were added (included in the PR), and bench tests were done 
locally to validate the performance of the new dataset API call. 
   


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