Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11444#discussion_r55467820
  
    --- Diff: python/pyspark/sql/types.py ---
    @@ -681,6 +681,129 @@ def __eq__(self, other):
                               for v in [ArrayType, MapType, StructType])
     
     
    +_FIXED_DECIMAL = re.compile("decimal\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\)")
    +
    +
    +_BRACKETS = {'(': ')', '[': ']', '{': '}'}
    +
    +
    +def _parse_basic_datatype_string(s):
    +    if s in _all_atomic_types.keys():
    +        return _all_atomic_types[s]()
    +    elif s == "int":
    +        return IntegerType()
    +    elif _FIXED_DECIMAL.match(s):
    +        m = _FIXED_DECIMAL.match(s)
    --- End diff --
    
    I think so, the code is copied from 
https://github.com/apache/spark/blob/master/python/pyspark/sql/types.py#L860-L864,
 we can improve them later


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