sarutak commented on PR #60119: URL: https://github.com/apache/spark/pull/60119#issuecomment-6654507423
Thank you for the review. I pushed 26e74113ec3, which fixes the three inline items and the description, and takes the LEGACY casts from `Cast.isNoThrowLegacyCast`: - `cannotFailCast` and `Cast.isNoThrowLegacyCast`: not intended. The LEGACY branch now accepts what `Cast.isNoThrowLegacyCast(from, to)` accepts, and adds only a string to a date, a timestamp or a timestamp without time zone, whose parsers catch their errors and return `None`. So it now also accepts a boolean to a number, a number to a boolean and a string to a plain string, the same pairs that `ConstantFolding` accepts outside ANSI sessions, and the suite evaluates them. I did not change `isNoThrowLegacyCast` itself, to leave `ConstantFolding` as it is in this PR. - The hoisting of streamed-side join conjuncts, the guard of `FILTER` and the normalization of conditional `COUNT(DISTINCT)`: I would like to keep this PR to whether an expression can fail, and leave the cost to each of these optimizations, which already make the same trade-off for plain columns. The one that stands out is the hoisting, since it can now move an expensive expression such as `contains` under an ICU collation to rows without a match. If that matters, I think the place to limit it is `StreamedSideJoinCondition` itself, e.g. by not hoisting expensive conjuncts, rather than this check, which its other callers use for correctness only. The conf that enables it is internal and off by default. -- 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]
