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
Issue #2213 - PostgreSQL: Strict typing requires explicit type casts #2234
Open
homedirectory
wants to merge
252
commits into
develop
Choose a base branch
from
Issue-#2213
base: develop
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A canonical representation serves as a reference, thus it is written in a human-readable form.
This also includes complex ones, such as caseWhen.
…son and quantified
…s declaring multiple parameters
… resulting parse tree is more manageable
Introduce a separate rule for "like" operators and replace inheritance relationship by alternation between quantified and comparison operators.
…building it This gives us more control over the BNF representation which will assist with the transformation into ANTLR grammar format (among other ones).
This is to avoid 2 placeholder types from different contexts being accidentally considered equal.
- Add documentation - Implement toString() methods to facilitate reasoning - Reduce visibility of PropType constructor (static method should be used)
…ions This is achieved by casting the NULL to the type of the other operand
In general, this approach of asserting that an exception is thrown is far from the best because it ignores potential exceptions that may be thrown for unexpected reasons. Being more specific and expecting only a certain type of exceptions doesn't work either since the exception gets rethrown at some higher level, effectively becoming a cause of another exception. Should we be making assertions about the stack trace at this point? I don't think so.
The converstion itself was also slightly modified: * Use an unbounded VARCHAR by default instead of setting the limit to 255 chars, which has no clear basis. * Optimise for Integers by limiting the VARCHAR length to 10 chars.
And for all DB back-ends, not just PostgreSQL and SQL Server.
… with string type Wheels of EQL3 are turning so the workaround is no longer needed. Moreover, we can now be confident that the null type is never taken for the string type by mistake, which is vastly important for PostgreSQL.
* Use a sealed interface with inner classes to facilitate pattern matching with switch. * Instead of inserting type casts conditionally, depending on the database, always insert them. The conditional approach likely relied on implicit type conversion performed by some DBs. Although, endAsInt() worked correctly only with H2, which had gone unnoticed as its usage has been scarce.
This assertion reports list contents in case of failure.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Resolve #2213
Summary of changes:
StreamUtils
, requirestg-libs
to be recompiled.