shivadarshan-devadiga commented on PR #60756: URL: https://github.com/apache/spark/pull/60756#issuecomment-7044095568
Thanks @gengliangwang, all three are fixed in this push. Like the IN-subquery one, the scalar-subquery one also existed before this PR: `SELECT id FROM t5 WHERE c = (SELECT c FROM t3)` returns nothing on master. Comparisons now pad a scalar subquery of a CHAR column the same way they pad a column. I also went through the comparisons that still aren't padded, so the scope is explicit. Before and after this PR, `ApplyCharTypePadding` pads a CHAR operand that is a column, an outer reference, a scalar subquery or an IN-subquery column. It doesn't pad CHAR values that come out of other expressions, such as `coalesce(c, ...)`, `CASE`, or `IN` with a list mixing columns and other expressions. Comparing those with CHAR values of another length already misses rows today, and I've left them out of this PR. Structs built with `named_struct` from CHAR columns keep their CHAR lengths in their field metadata, not in the raw type of the column, so a union of them keeps the first child's lengths, as before. Can you please re-review? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
