Jonathancui123 commented on PR #36871:
URL: https://github.com/apache/spark/pull/36871#issuecomment-1162506485

   I've added a `inferDate` flag that addresses the comments above:
   1. Performance: Logic for date inference during is guarded behind the flag
   2. Parsing behavior inferDate=false: Behavior is identical to prior to 
changes
   3. Parsing behavior inferDate=true: In timestamp columns, we will attempt to 
parse as timestamp and then parse as date if timestamp fails. 
   > This is necessary because we can have columns of Date and Timestamp 
entries inferred as Timestamp. Consider the column of a `DateType` followed by 
a `TimestampType`. We would expect this column to be inferred as a 
`TimestampType` column. Thus, when parsing the column, the timestamp converter 
will fail on the Date entry so we will need to try and convert it with the Date 
converter. If both converters fail, then we will throw an error.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to