You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/10/11 20:06:27 UTC
[GitHub] [spark] ueshin commented on a change in pull request #34227: [SPARK-36961][PYTHON] Use PEP526 style variable type hints
ueshin commented on a change in pull request #34227:
URL: https://github.com/apache/spark/pull/34227#discussion_r726538712
##########
File path: python/pyspark/pandas/internal.py
##########
@@ -664,14 +664,14 @@ def __init__(
NATURAL_ORDER_COLUMN_NAME, F.monotonically_increasing_id()
)
- self._sdf = spark_frame # type: SparkDataFrame
+ self._sdf: SparkDataFrame = spark_frame
Review comment:
It's just make sure the type.
##########
File path: python/pyspark/pandas/namespace.py
##########
@@ -1378,11 +1383,11 @@ def read_sql_table(
reader.options(**options)
sdf = reader.format("jdbc").load()
index_spark_columns, index_names = _get_index_map(sdf, index_col)
- psdf = DataFrame(
+ psdf: DataFrame = DataFrame(
Review comment:
Actually without it, `psdf` is inferred as `Any` for some reason.
Have you experienced such a thing before?
--
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-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org