HyukjinKwon commented on code in PR #36640: URL: https://github.com/apache/spark/pull/36640#discussion_r880031452
########## python/pyspark/sql/session.py: ########## @@ -611,7 +611,7 @@ def _inferSchema( :class:`pyspark.sql.types.StructType` """ first = rdd.first() - if not first: + if first != 0 and not first: Review Comment: Oh got it. What about we check if it is `collections.abc.Sized`, and if the size is `0` here instead? -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org