Github user dondrake commented on the pull request:
https://github.com/apache/spark/pull/4521#issuecomment-73984131
@rxin, after thinking about it some more, I agree with @marmbrus . Let me
make another change so _type mappings looks like this:
```
_type_mappings = {
type(None): NullType,
bool: BooleanType,
int: LongType,
long: LongType,
float: DoubleType,
str: StringType,
unicode: StringType,
bytearray: BinaryType,
decimal.Decimal: DecimalType,
datetime.date: DateType,
datetime.datetime: TimestampType,
datetime.time: TimestampType,
}
```
I'll remove my if statement and add some comments around that as well.
This also reduces the risk of the inference seeing a small sample and
choosing IntegerType.
---
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]