HyukjinKwon commented on issue #24614: [SPARK-27712][PySpark][SQL] Returns 
correct schema even under different column order when creating dataframe
URL: https://github.com/apache/spark/pull/24614#issuecomment-492880929
 
 
   yea, I think actually I discussed this with @BryanCutler somewhere before. I 
forget what we ended up with. Bryan, do you remember which one we considered as 
the correct case?
   
   ```
   >>> spark.createDataFrame([Row(A="1", B="2")], "B string, A string").first()
   Row(B='2', A='1') # correct
   >>> spark.createDataFrame(spark.sparkContext.parallelize([Row(A="1", 
B="2")]), "B string, A string").first()
   Row(B='1', A='2') # incorrect        
   ```
   
   I remember we considered `__from_dict__` is being mistakenly lost and 
therefore it should be considered as a dict but maybe I am recalling wrongly.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to