pan3793 opened a new issue, #4316: URL: https://github.com/apache/kyuubi/issues/4316
### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) ### Search before asking - [X] I have searched in the [issues](https://github.com/apache/kyuubi/issues?q=is%3Aissue) and found no similar issues. ### Describe the bug Run the following SQL, Kyuubi returns different results w/ `spark-sql` and `STS` ``` SELECT to_timestamp('2023-02-08 22:17:33.123456'); ``` Kyuubi: `2023-02-08 22:17:33.123` `spark-sql` and `STS`: `2023-02-08 22:17:33.123456` ### Affects Version(s) master/1.7/1.6 ### Kyuubi Server Log Output _No response_ ### Kyuubi Engine Log Output _No response_ ### Kyuubi Server Configurations _No response_ ### Kyuubi Engine Configurations _No response_ ### Additional context All of Kyuubi, `spark-sql` and `STS` render the timestamp value on the Spark Driver side, but Kyuubi uses `org.apache.kyuubi.engine.spark.schema#toHiveString` to render the timestamp value as the String instead of `org.apache.spark.sql.execution#toHiveString` which is used by `spark-sql` and `STS`, this causes inconsistent result in some cases. Note, `org.apache.spark.sql.execution#toHiveString` is not a public API, and [SPARK-32006](https://issues.apache.org/jira/browse/SPARK-32006)(fixed version 3.1.0) change the method signature. Currently, Kyuubi officially supports Spark 3.1 and above, life is simple if we don't consider Spark 3.0 here. ### Are you willing to submit PR? - [ ] Yes. I would be willing to submit a PR with guidance from the Kyuubi community to fix. - [ ] No. I cannot submit a PR at this time. -- 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]
