Test and fix cast from bigint to varchar#10090
Merged
kasiafi merged 5 commits intotrinodb:masterfrom Dec 1, 2021
Merged
Conversation
The used values 37 and 0 were interpreted as Integer, and so the operators for the Integer type were used instead of the operators for the Bigint type.
f126f15 to
85a942b
Compare
findepi
approved these changes
Nov 29, 2021
Member
There was a problem hiding this comment.
It's never legitimate that a function throws something else than TrinoException, isn't it?
I understand why this is useful for interim state when fixing things, but i wonder how we can convey that intention to future users of this assert. assertFunctionThrowsIncorrectly? Mark @deprecated?
Member
There was a problem hiding this comment.
add @Language("SQL") on projection
and @Language("RegExp") on message
Member
Author
There was a problem hiding this comment.
I decided on renaming both methods to assertFunctionThrowsIncorrectly.
The initial idea was to remove them altogether after casts to varchar are fixed, but we might actually consider keeping them for future use.
core/trino-main/src/test/java/io/trino/operator/scalar/AbstractTestFunctions.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/test/java/io/trino/sql/TestExpressionInterpreter.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/type/BigintOperators.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/type/BigintOperators.java
Outdated
Show resolved
Hide resolved
Enable testing functions which throw an exception other than TrinoException.
Fail if the resulting string does not fit in the bounded length of the varchar type.
85a942b to
f9aba95
Compare
Member
Author
|
@findepi ac |
findepi
approved these changes
Dec 1, 2021
v-jizhang
added a commit
to v-jizhang/presto
that referenced
this pull request
Feb 3, 2022
Cherry-pick of trinodb/trino#10090 Co-authored-by: kasiafi <30203062+kasiafi@users.noreply.github.com>
highker
pushed a commit
to prestodb/presto
that referenced
this pull request
Feb 7, 2022
Cherry-pick of trinodb/trino#10090 Co-authored-by: kasiafi <30203062+kasiafi@users.noreply.github.com>
This file contains hidden or 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
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.
For #552