wushilin opened a new issue, #65741:
URL: https://github.com/apache/doris/issues/65741

   ### Search before asking
   
   - [x] I had searched in the 
[issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Version
   
   When using arrow to execute sql:
   SELECT CAST('2026-07-02 01:36:22.069504' AS DATETIME(6)) AS ts
   
   
   
   
   
   ### What's Wrong?
   
   The result is automatically converted to UTC.
   2026-07-02 01:36:22.069504+00:00
   
   ### What You Expected?
   
   The result sould be 
   2026-07-02 01:36:22.069504
   
   This is the wrong assumption. the original timestamp might be local timezone 
timestamp.
   
   
   ### How to Reproduce?
   
   Execute 
   SELECT CAST('2026-07-02 01:36:22.069504' AS DATETIME(6)) AS ts
   
   in python:
   import adbc_driver_flightsql.dbapi as flightsql
   from adbc_driver_manager import DatabaseOptions
   from q_secrets import get_connection_details
   
   details = get_connection_details("doris", flightsql=True)
   connection = flightsql.connect(
       uri=f"{details['driver']}://{details['hostname']}:{details['port']}",
       db_kwargs={
           DatabaseOptions.USERNAME.value: details["username"],
           DatabaseOptions.PASSWORD.value: details["pwd"],
       },
   )
   
   with connection.cursor() as cursor:
       cursor.execute("SELECT CAST('2026-07-02 01:36:22.069504' AS DATETIME(6)) 
AS ts")
       table = cursor.fetch_arrow_table()
   
   field = table.schema.field("ts")
   print("Arrow field:", field)
   print("Field metadata:", field.metadata)
   print("Value:", table["ts"].to_pylist())
   
   connection.close()
   
    
   
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


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