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

Support alternate format for Int64 unparsing (SIGNED for MySQL) #22

Merged
merged 1 commit into from
Jul 19, 2024

Conversation

sgrebnov
Copy link

@sgrebnov sgrebnov commented Jul 19, 2024

Which issue does this PR close?

PR addresses Int64 unparser issue producing invalid CAST(col AS BigInt) SQL for MySQL.

MySQL cast function does not support BigInt and requires SIGNED for CAST

SIGNED [INTEGER]
Produces a signed BIGINT value.

Note: INTEGER does not work, requires SIGNED

sqlparser crate does not have Signed type so we construct ast::DataType::Custom

@sgrebnov sgrebnov self-assigned this Jul 19, 2024
@sgrebnov sgrebnov merged commit 790f9c6 into spiceai-40 Jul 19, 2024
@sgrebnov sgrebnov deleted the sgrebnov/fix-int64-cast-mysql branch July 19, 2024 17:40
y-f-u pushed a commit that referenced this pull request Jul 29, 2024
* Configurable date field extraction style for unparsing (#21)

* Add support for IntervalStyle::MySQL (#18)

* Support alternate format for Int64 unparsing (SIGNED for MySQL) (#22)

* Alternate format support for Timestamp casting (DATETIME for MySQL) (#23)

* Improve

* Fix clippy and docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants