-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Change character literal treatment and char/varchar coercion #9031
Comments
Also very importantly, current comparison semantics (trailing space insensitive between char/varchars) should be preserved. Some old design doc about it: https://docs.google.com/document/d/1UngGirjV_I7nPnIGU6G7SDS0cY8j7N_Jb3Wk3EoHChc/edit?usp=sharing. |
The doc seem to focus on INSERT, which today is handled explicitly see #2061 cc @kasiafi @sopel39 Are there other parts of this doc, which i should still read carefully? |
Related: #4394 |
More on this topic, Concat previously can take free combinations of char(n) and varchar within the limit of the number of parameters. In ConcatFunction.java class, Trino constructs a FunctionMetadata with signature that has input type of varchar, and output type of varchar, and the number of inputs can be varied, and not exceeding 254. In SignatureBinder.java, expandVarargFormalTypeSignature method would generate 253 (2,3,4,....254) different TypeSignatures for inputs and binding to functions. |
…set operation In case of dealing with Hive views which make use of set operation (e.g. UNION) ensure that the `char` fields from the inner SELECT statements have the same type as the output field types of the set operation. Due to wrong coercion between `varchar` and `char` in Trino, as described in trinodb/trino#9031 , a work-around needs to be applied in case of translating Hive views which contain a UNION dealing with char and varchar types. The work-around consists in the explicit cast of the field having char type towards varchar type corresponding of the set operation output type.
…set operation In case of dealing with Hive views which make use of set operation (e.g. UNION) ensure that the `char` fields from the inner SELECT statements have the same type as the output field types of the set operation. Due to wrong coercion between `varchar` and `char` in Trino, as described in trinodb/trino#9031 , a work-around needs to be applied in case of translating Hive views which contain a UNION dealing with char and varchar types. The work-around consists in the explicit cast of the field having char type towards varchar type corresponding of the set operation output type.
…set operation In case of dealing with Hive views which make use of set operation (e.g. UNION) ensure that the `char` fields from the inner SELECT statements have the same type as the output field types of the set operation. Due to wrong coercion between `varchar` and `char` in Trino, as described in trinodb/trino#9031 , a work-around needs to be applied in case of translating Hive views which contain a UNION dealing with char and varchar types. The work-around consists in the explicit cast of the field having char type towards varchar type corresponding of the set operation output type.
…set operation In case of dealing with Hive views which make use of set operation (e.g. UNION) ensure that the `char` fields from the inner SELECT statements have the same type as the output field types of the set operation. Due to wrong coercion between `varchar` and `char` in Trino, as described in trinodb/trino#9031 , a work-around needs to be applied in case of translating Hive views which contain a UNION dealing with char and varchar types. The work-around consists in the explicit cast of the field having char type towards varchar type corresponding of the set operation output type.
…set operation In case of dealing with Hive views which make use of set operation (e.g. UNION) ensure that the `char` fields from the inner SELECT statements have the same type as the output field types of the set operation. Due to wrong coercion between `varchar` and `char` in Trino, as described in trinodb/trino#9031 , a work-around needs to be applied in case of translating Hive views which contain a UNION dealing with char and varchar types. The work-around consists in the explicit cast of the field having char type towards varchar type corresponding of the set operation output type.
…set operation In case of dealing with Hive views which make use of set operation (e.g. UNION) ensure that the `char` fields from the inner SELECT statements have the same type as the output field types of the set operation. Due to wrong coercion between `varchar` and `char` in Trino, as described in trinodb/trino#9031 , a work-around needs to be applied in case of translating Hive views which contain a UNION dealing with char and varchar types. The work-around consists in the explicit cast of the field having char type towards varchar type corresponding of the set operation output type.
…set operation In case of dealing with Hive views which make use of set operation (e.g. UNION) ensure that the `char` fields from the inner SELECT statements have the same type as the output field types of the set operation. Due to wrong coercion between `varchar` and `char` in Trino, as described in trinodb/trino#9031 , a work-around needs to be applied in case of translating Hive views which contain a UNION dealing with char and varchar types. The work-around consists in the explicit cast of the field having char type towards varchar type corresponding of the set operation output type.
…set operation In case of dealing with Hive views which make use of set operation (e.g. UNION) ensure that the `char` fields from the inner SELECT statements have the same type as the output field types of the set operation. Due to wrong coercion between `varchar` and `char` in Trino, as described in trinodb/trino#9031 , a work-around needs to be applied in case of translating Hive views which contain a UNION dealing with char and varchar types. The work-around consists in the explicit cast of the field having char type towards varchar type corresponding of the set operation output type.
…set operation In case of dealing with Hive views which make use of set operation (e.g. UNION) ensure that the `char` fields from the inner SELECT statements have the same type as the output field types of the set operation. Due to wrong coercion between `varchar` and `char` in Trino, as described in trinodb/trino#9031 , a work-around needs to be applied in case of translating Hive views which contain a UNION dealing with char and varchar types. The work-around consists in the explicit cast of the field having char type towards varchar type corresponding of the set operation output type.
…set operation In case of dealing with Hive views which make use of set operation (e.g. UNION) ensure that the `char` fields from the inner SELECT statements have the same type as the output field types of the set operation. Due to wrong coercion between `varchar` and `char` in Trino, as described in trinodb/trino#9031 , a work-around needs to be applied in case of translating Hive views which contain a UNION dealing with char and varchar types. The work-around consists in the explicit cast of the field having char type towards varchar type corresponding of the set operation output type.
…set operation In case of dealing with Hive views which make use of set operation (e.g. UNION) ensure that the `char` fields from the inner SELECT statements have the same type as the output field types of the set operation. Due to wrong coercion between `varchar` and `char` in Trino, as described in trinodb/trino#9031 , a work-around needs to be applied in case of translating Hive views which contain a UNION dealing with char and varchar types. The work-around consists in the explicit cast of the field having char type towards varchar type corresponding of the set operation output type.
…set operation In case of dealing with Hive views which make use of set operation (e.g. UNION) ensure that the `char` fields from the inner SELECT statements have the same type as the output field types of the set operation. Due to wrong coercion between `varchar` and `char` in Trino, as described in trinodb/trino#9031 , a work-around needs to be applied in case of translating Hive views which contain a UNION dealing with char and varchar types. The work-around consists in the explicit cast of the field having char type towards varchar type corresponding of the set operation output type.
…set operation (#442) In case of dealing with Hive views which make use of set operation (e.g. UNION) ensure that the `char` fields from the inner SELECT statements have the same type as the output field types of the set operation. Due to wrong coercion between `varchar` and `char` in Trino, as described in trinodb/trino#9031 , a work-around needs to be applied in case of translating Hive views which contain a UNION dealing with char and varchar types. The work-around consists in the explicit cast of the field having char type towards varchar type corresponding of the set operation output type.
Bump coral to 2.2.14 to support Hive view translation cnsisting of a UNION between a char and a varchar field. Due to wrong coercion between `varchar` and `char` in Trino, as described in trinodb#9031 , a work-around needs to be applied in case of translating Hive views which contain a UNION dealing with char and varchar types. The work-around consists in the explicit cast of the field having char type towards varchar type corresponding of the set operation output type.
Bump coral to 2.2.14 to support Hive view translation cnsisting of a UNION between a char and a varchar field. Due to wrong coercion between `varchar` and `char` in Trino, as described in #9031 , a work-around needs to be applied in case of translating Hive views which contain a UNION dealing with char and varchar types. The work-around consists in the explicit cast of the field having char type towards varchar type corresponding of the set operation output type.
Bump coral to 2.2.14 to support Hive view translation cnsisting of a UNION between a char and a varchar field. Due to wrong coercion between `varchar` and `char` in Trino, as described in trinodb#9031 , a work-around needs to be applied in case of translating Hive views which contain a UNION dealing with char and varchar types. The work-around consists in the explicit cast of the field having char type towards varchar type corresponding of the set operation output type.
Bump coral to 2.2.14 to support Hive view translation cnsisting of a UNION between a char and a varchar field. Due to wrong coercion between `varchar` and `char` in Trino, as described in trinodb#9031 , a work-around needs to be applied in case of translating Hive views which contain a UNION dealing with char and varchar types. The work-around consists in the explicit cast of the field having char type towards varchar type corresponding of the set operation output type.
'...'
literals should be of typechar(n)
, notvarchar(n)
as they are todaychar(n)
should coerce tovarchar(n)
, not the other way aroundvarchar(n > 65536)
being coerced tochar(65536)
which is lossy (Incorrect query results when comparing char values with varchar values longer than 65536 #9030)to be considered
VARCHAR 'abc'
? Currently it's unboundedvarchar
, but maybe it should bevarchar(3)
so that there is a concise literal form forvarchar(n)
values.CharType.MAX_LENGTH
(65536)?Follows https://github.com/trinodb/trino/pull/8984/files#diff-b2201e0a7ed30a2cb81a3672435281f5822574fd25e127010e3aaa58ee62b04dR483
cc @martint @sopel39 @kasiafi @losipiuk @weiatwork
The text was updated successfully, but these errors were encountered: