Github user davies commented on a diff in the pull request:

    https://github.com/apache/spark/pull/6686#discussion_r32806501
  
    --- Diff: python/pyspark/sql/types.py ---
    @@ -56,6 +56,32 @@ def __eq__(self, other):
         def __ne__(self, other):
             return not self.__eq__(other)
     
    +    def from_string(self, data_type):
    +        assert(isinstance(data_type, str))
    +
    +        if data_type == "byte":
    +            return "ByteType"
    +        elif data_type == "long":
    +            return "LongType"
    +        elif data_type == "float":
    +            return "FloatType"
    +        elif data_type == "int" or data_type == "integer":
    +            return "IntegerType"
    +        elif data_type == "double" or data_type == "numeric":
    +            return "DoubleType"
    +        elif data_type == "string" or data_type == "character":
    --- End diff --
    
    This is Python, we don't need to have R types here (numeric and character)


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to