Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19792#discussion_r154630463
  
    --- Diff: python/pyspark/sql/session.py ---
    @@ -337,7 +338,7 @@ def _inferSchemaFromList(self, data):
             if type(first) is dict:
                 warnings.warn("inferring schema from dict is deprecated,"
                               "please use pyspark.sql.Row instead")
    -        schema = reduce(_merge_type, map(_infer_schema, data))
    +        schema = reduce(_merge_type, [_infer_schema(row, names) for row in 
data])
    --- End diff --
    
    Not a big deal but let's use generator expression -> `(_infer_schema(row, 
names) for row in data)`


---

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

Reply via email to