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/09/29 19:47:59 UTC

[GitHub] [spark] zero323 commented on a change in pull request #34133: [SPARK-36881][PYTHON] Inline type hints for python/pyspark/sql/catalog.py

zero323 commented on a change in pull request #34133:
URL: https://github.com/apache/spark/pull/34133#discussion_r718833451



##########
File path: python/pyspark/sql/catalog.py
##########
@@ -29,31 +31,35 @@
 Column = namedtuple("Column", "name description dataType nullable isPartition isBucket")
 Function = namedtuple("Function", "name description className isTemporary")

Review comment:
       We should probably have these two (as well as `Database` and `Table`)  annotated here. If we're going to in-line all annotations, it will require choosing a convention. Personally, I prefer 3.6 syntax:
   
   ```python
   class Coulumn(NamedTuple):
       name: str
       description: str
       dataType: str
       nullable: bool
       isPartition: bool
       isBucket: bool
   ```




-- 
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