spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From BryanCutler <...@git.apache.org>
Subject [GitHub] spark pull request #22140: [SPARK-25072][PySpark] Forbid extra value for cus...
Date Wed, 05 Sep 2018 17:19:23 GMT
Github user BryanCutler commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22140#discussion_r215356501
  
    --- Diff: python/pyspark/sql/types.py ---
    @@ -1397,6 +1397,8 @@ def _create_row_inbound_converter(dataType):
     
     
     def _create_row(fields, values):
    +    if len(values) > len(fields):
    +        raise ValueError("Can not create %s by %s" % (fields, values))
    --- End diff --
    
    I'd like to improve this message a little, maybe "Can not create Row with fields %s, expected
%d values but got %s" % (fields, len(fields), values)


---

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


Mime
View raw message