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

feat(api): add StringValue.as_time for parsing strings into times #10278

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

saschahofmann
Copy link
Contributor

@saschahofmann saschahofmann commented Oct 6, 2024

Description of changes

  • Adding as_time method that converts string to TimeValue based on a formatted. By default converts to timestamps and casts to time
  • Implements parse_time for BigQuery and to_date for Snowflake
  • Is it necessary to implement the pyspark_format tests as well, I had the impression that its mostly about dates?

Issues closed

Note

I find it kinda tricky to setup the tests/dev environment e.g. the docker postgres database always collides with my own local postgres so I have to shut it down in order to run the tests. There are also a lot of errors in the VSCode test discovery, I think its because of the two environments with and without Flink on Mac.

For pyspark I am getting this

pyspark.errors.exceptions.base.PySparkRuntimeError: [JAVA_GATEWAY_EXITED] Java gateway process exited before sending its port number.

For duckdb

duckdb.duckdb.IOException: IO Error: No files found that match the pattern "ibis/ci/ibis-testing-data/parquet/geo_wkb.parquet"

@github-actions github-actions bot added tests Issues or PRs related to tests bigquery The BigQuery backend sql Backends that generate SQL labels Oct 6, 2024
Copy link
Contributor

github-actions bot commented Oct 6, 2024

ACTION NEEDED

Ibis follows the Conventional Commits specification for release automation.

The PR title and description are used as the merge commit message.

Please update your PR title and description to match the specification.

@saschahofmann saschahofmann changed the title WIP: feat: Add as_time to StringValue feat: Add as_time to StringValue Oct 6, 2024
@saschahofmann
Copy link
Contributor Author

@deepyaman I finally got around to it and didn't find too many databases with their own implementation so it was quite straightforward

@github-actions github-actions bot added the polars The polars backend label Oct 6, 2024
@cpcloud cpcloud changed the title feat: Add as_time to StringValue feat: add StringValue.as_time for parsing strings into times Oct 8, 2024
@cpcloud cpcloud changed the title feat: add StringValue.as_time for parsing strings into times feat(api): add StringValue.as_time for parsing strings into times Oct 8, 2024
@cpcloud cpcloud added this to the 10.0 milestone Oct 8, 2024
@cpcloud cpcloud added the feature Features or general enhancements label Oct 8, 2024
@cpcloud cpcloud force-pushed the to_time branch 3 times, most recently from 6be114e to f260aaf Compare October 8, 2024 13:41
@cpcloud cpcloud force-pushed the to_time branch 2 times, most recently from c89e679 to 300af4f Compare October 17, 2024 12:07
@cpcloud cpcloud enabled auto-merge (squash) October 17, 2024 15:40
@cpcloud cpcloud merged commit 9134ef5 into ibis-project:main Oct 17, 2024
77 checks passed
@saschahofmann saschahofmann deleted the to_time branch October 21, 2024 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bigquery The BigQuery backend feature Features or general enhancements polars The polars backend sql Backends that generate SQL tests Issues or PRs related to tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: Add to_date and to_time to StringValue
2 participants