https://github.com/apache/spark
Revision c7733d35c35748f0953ab371f515619c2db420ef authored by fhygh on 18 April 2022, 15:11:32 UTC, committed by Wenchen Fan on 18 April 2022, 15:19:33 UTC
after add ApplyCharTypePadding rule, when predicate query column data type is char, if column value length is less then defined,  will be right-padding, then query will get incorrect result

fix query incorrect issue when predicate column data type is char, so in this case when charVarcharAsString is true, we should skip the rpadding rule.

before this fix, if we query with char data type for predicate, then we should be careful to set charVarcharAsString to true.

add new UT.

Closes #36187 from fhygh/charpredicatequery.

Authored-by: fhygh <283452027@qq.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
(cherry picked from commit c1ea8b446d00dd0123a0fad93a3e143933419a76)
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
1 parent 95fb780
History
Tip revision: c7733d35c35748f0953ab371f515619c2db420ef authored by fhygh on 18 April 2022, 15:11:32 UTC
[SPARK-37643][SQL] when charVarcharAsString is true, for char datatype predicate query should skip rpadding rule
Tip revision: c7733d3

README.md

back to top