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

sql: revisit the typing RFC in the light of sql2011 #4540

Closed
knz opened this issue Feb 21, 2016 · 4 comments
Closed

sql: revisit the typing RFC in the light of sql2011 #4540

knz opened this issue Feb 21, 2016 · 4 comments
Assignees
Labels
A-sql-semantics C-investigation Further steps needed to qualify. C-label will change.
Milestone

Comments

@knz
Copy link
Contributor

knz commented Feb 21, 2016

Found in a comment on #1795:

While SQL:2011 basically leaves much of this as an implementation detail ...

"Every number has a precision (number of digits), and exact numeric types also have a scale (digits after the radix point). Arithmetic operations may be performed on operands of different or the same numeric type, and the result is of a numeric type that depends only on the numeric type of the operands. If the result cannot be represented exactly in the result type, then whether it is rounded or truncated is implementation-defined. An exception condition is raised if the result is outside the range of numeric values of the result type, or if the arithmetic operation is not defined for the operands."

The new typing system might need to make more efforts depending on how much the standard specifies. One should read the standard and see if the RFC conflicts, then adapt accordingly.

@knz knz self-assigned this Feb 21, 2016
@knz knz added the C-investigation Further steps needed to qualify. C-label will change. label Feb 21, 2016
@petermattis petermattis changed the title Revisiting the typing RFC in the light of sql2011 sql: revisit the typing RFC in the light of sql2011 Feb 22, 2016
@petermattis
Copy link
Collaborator

I'm having trouble determining what the text you quoted precludes in the typing RFC. And there is also the question of whether being compliant to the SQL:2011 spec is a goal. Unlike other standards, it seems the compliance to the SQL spec is much looser, with quite a bit left to implementation detail.

@knz
Copy link
Contributor Author

knz commented Feb 22, 2016

OK but I think it's fair to create a doc that acknowledges how we diverge from the standard. That's why I want to read it through and see if there's anything noteworthy in there.

@petermattis
Copy link
Collaborator

Agreed that we should be cognizant of where we diverge from the standard and to document such occurrences.

@petermattis petermattis added this to the 1.0 milestone Feb 29, 2016
@petermattis petermattis modified the milestones: 1.0, Q2, Beta Apr 6, 2016
@knz
Copy link
Contributor Author

knz commented Jun 9, 2016

So @nvanbenschoten and I (mostly nathan) have looked at the spec and observed that it is largely silent about what needs to be done. The only item of note is that it strongly recommends that anything can be compared to anything, which we may not fully support yet. Other than that implementations are largely free to innovate.

@knz knz closed this as completed Jun 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sql-semantics C-investigation Further steps needed to qualify. C-label will change.
Projects
None yet
Development

No branches or pull requests

2 participants