shanretoo opened a new pull request, #10476:
URL: https://github.com/apache/datafusion/pull/10476

   ## Which issue does this PR close?
   
   Closes #10471.
   
   ## Rationale for this change
   
   Fallback to `Parsed::to_naive_date` when 
`Parsed::to_naive_datetime_with_offset` failed if there is only date in format 
string.
   
   ## What changes are included in this PR?
   
   Same as above.
   
   ## Are these changes tested?
   
   <!--
   We typically require tests for all PRs in order to:
   1. Prevent the code from being accidentally broken by subsequent changes
   2. Serve as another way to document the expected behavior of the code
   
   If tests are not included in your PR, please explain why (for example, are 
they covered by existing tests)?
   -->
   
   1. Add unit test
   The timestamp of "2022-01-23" is `1642896000000000000` as written in the 
test.
   <img width="670" alt="Screenshot 2024-05-13 at 1 09 45 PM" 
src="https://github.com/apache/datafusion/assets/169244206/a1cc9649-6bcd-4ee8-91f7-906726009cdb";>
   
   2. Test using datafusion-cli
   <img width="375" alt="Screenshot 2024-05-13 at 1 01 13 PM" 
src="https://github.com/apache/datafusion/assets/169244206/c6f803f6-0e86-4b02-bef6-7779744b86e6";>
   
   


-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to