Changes INT/INTEGER to be an alias for INT4 #1473
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Relevant Issues
#1471
Description
Details are in the linked issue. Effectively this PR makes INT an alias for INT4. Today, the typing and handling of the 32-bit integer is covered by INT4, but we have (for historical reasons) had INT as the Ion unbounded integer. This has created a situation in which INT != INT4 and INT has no precision whereas BIGINT does; therefore BIGINT < INT.
The other systems we integrate with all have INT = INT4 because SQL dictates you must have a bound precision for the INTEGER type and pretty much every implementation uses 32-bit precision.
Update
Now, this PR is a somewhat sly half-measure by making INT an alias to INT4 so that I don't have to change any planning/typing logic. John is working on updates to typing logic now, so I've simply made a tiny parser change. For version 1.0 we will flip this and make INT4 an alias for INT.
For the unbounded integer in other systems, we use
DECIMAL(38,0)
as this is typically the maximum size (e.g. Presto, Snowflake, SQL Server, Impala) but some allow higher precision (postgres).Other Information
Updated Unreleased Section in CHANGELOG: [YES/NO]
Yes
Any backward-incompatible changes? [YES/NO]
Yes, behavioral change. Detailed note in changelog.
Any new external dependencies? [YES/NO]
No
Do your changes comply with the Contributing Guidelines
and Code Style Guidelines? [YES/NO]
YEs
License Information
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.