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

Uses INT and BIGINT as default 32-bit and 64-bit integer names #38

Merged
merged 1 commit into from
May 28, 2024

Conversation

rchowell
Copy link
Contributor

@rchowell rchowell commented May 28, 2024

Issue #, if available:

partiql/partiql-lang-kotlin#1471 and #35

Description of changes:

Scribe had been using INT4 and INT8 for the 32-bit and 64-bit integer names, but our target systems use INT and BIGINT respectively. This PR adds an AST workaround to alias INT to INT4, but then emits INT as the default name for INT/INT4.

Similarly, this PR updates AST output to use BIGINT as the default name rather than INT8.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@rchowell rchowell requested a review from yliuuuu May 28, 2024 16:21
Comment on lines +48 to +54
// TODO: REMOVE ME
// PartiQL came from Ion SQL which uses the INT name for the unbounded integer.
// In SQL, the INT name must have some finite precision and most systems use a 32-bit integer.
// Scribe is built to interface with other systems, so we must change all occurrences of the INT
// type name with INT4. In short, all systems do INT = INT4 but PartiQL has INT4 != INT.
// >>>> ISSUE — https://github.com/partiql/partiql-lang-kotlin/issues/1471
ast = replaceIntWithInt4(ast)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice temporary work around.

@rchowell rchowell merged commit 3084162 into main May 28, 2024
@rchowell rchowell deleted the redshift-int4 branch May 28, 2024 21:35
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