Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect string cast for time and interval types #342

Open
linhr opened this issue Jan 7, 2025 · 2 comments
Open

Incorrect string cast for time and interval types #342

linhr opened this issue Jan 7, 2025 · 2 comments
Labels
good first issue Good for newcomers

Comments

@linhr
Copy link
Contributor

linhr commented Jan 7, 2025

The string representation for time and interval types does not match the Spark behavior in cast(a AS string).

These test cases are related:

  • test_create_data_frame_to_pandas_day_time_internal
  • test_create_data_frame_to_pandas_timestamp_ntz
@linhr linhr added the good first issue Good for newcomers label Jan 7, 2025
@SemyonSinchenko
Copy link

I'm just interesting, why not to use apache datafusion comet crate? It already contains implementations for most spark-compatible expressions & operators. For example, this part should cover that issue: https://github.com/apache/datafusion-comet/blob/main/native/spark-expr/src/conversion_funcs/cast.rs

@linhr
Copy link
Contributor Author

linhr commented Feb 6, 2025

I'm just interesting, why not to use apache datafusion comet crate? It already contains implementations for most spark-compatible expressions & operators. For example, this part should cover that issue: https://github.com/apache/datafusion-comet/blob/main/native/spark-expr/src/conversion_funcs/cast.rs

Glad you brought up this! It's possible to depend on Comet directly but there would be some maintenance work due to different release schedule of Comet and DataFusion. (The DataFusion version in Comet and Sail must be the same.)

We have been part of the ongoing conversation to move Spark functions and expressions from Comet to the core DataFusion repo. Once the crate is set up, we can depend on it to support missing features in Sail. The hope is that Sail and other interested parties would also contribute to the shared Spark functions crate in DataFusion.

Here are the related discussions in DataFusion:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants