You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When spark.sql.legacy.charVarcharAsString is true, SparkSQL will treat char as strings and no padding is added for char literal.
Then the result is wrong.
createtablemy_char(name char(20)) using orc;
insert into my_char values ('Nemon');
selectcount(*) from my_char where name ='Nemon';
+--------+
|count(1)|
+--------+
|1 |
+--------+setspark.sql.legacy.charVarcharAsString=true;
selectcount(*) from my_char where name ='Nemon';
+--------+
|count(1)|
+--------+
|0 |
+--------+
When spark.sql.legacy.charVarcharAsString is true, SparkSQL will treat char as strings and no padding is added for char literal.
Then the result is wrong.
The plan
Notice that DataFilters in NativeFileScan is (name#7 = Nemon), no padding.
The text was updated successfully, but these errors were encountered: