Github user HyukjinKwon commented on a diff in the pull request: https://github.com/apache/spark/pull/16824#discussion_r99727033 --- Diff: python/pyspark/sql/dataframe.py --- @@ -218,8 +228,10 @@ def writeStream(self): def schema(self): """Returns the schema of this :class:`DataFrame` as a :class:`pyspark.sql.types.StructType`. + >>> from pyspark.sql import Row + >>> df = spark.createDataFrame([Row(name='Alice', age=2), Row(name='Bob', age=5)]) >>> df.schema - StructType(List(StructField(age,IntegerType,true),StructField(name,StringType,true))) + StructType(List(StructField(age,LongType,true),StructField(name,StringType,true))) --- End diff -- This happened to be `LongType` as it seems numbers become a long type by default via PySpark.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org