anshulsingh-py commented on PR #19853:
URL: https://github.com/apache/hudi/pull/19853#issuecomment-5601454605

   Addressed the readability nit and dug into the cross-version concern:
   
   - Extracted the nested match-in-match into a named `resolveOrFallback` 
helper.
   - Added test coverage confirming the `PatternSyntaxException`/regex-error 
widening is intentional for the hardcoded-table path too 
(`rlike`/`regexp_extract`), not just the registry one — matches what the 
equivalent Spark query does.
   - For the `current_timestamp` cross-version concern: I checked Spark's 
actual source directly (3.5.5 and 4.1.1) rather than guessing, since I can only 
build/test against 3.5 locally. `CurrentTimestampLike` extends `LeafExpression 
with CodegenFallback` on both versions — identical, no 
`Unevaluable`/`FoldableUnevaluable` involved either way. `FoldableUnevaluable` 
does exist in Spark (SPARK-52014), but it's for Hive UDF evaluation, unrelated 
to `current_timestamp`. So this specific scenario doesn't reproduce as far as I 
can tell from source — happy to be corrected if I'm missing something. I still 
added `isUsableOutsideQueryPlan`'s `EmptyRow` probe as a general safety net 
regardless: for any foldable result, it verifies via a real `eval()` call 
rather than a trait check, which is version-agnostic and catches this class of 
issue however it manifests, on any version, without needing to enumerate every 
marker trait by name.
   - Also separately verified (via Spark's actual 4.1.1 source) that 
`TypeCoercion`/`AnsiTypeCoercion` still extend `TypeCoercionBase` there with 
`ConcatCoercion`/`IfCoercion`/`FunctionArgumentConversion`/`ImplicitTypeCasts` 
all present unchanged, so the coercion-broadening from the last commit compiles 
across the same Spark 3.3-4.2 range as the rest of the file.
   
   Full `procedure` package suite: 269/269 passing, BUILD SUCCESS. Rebased onto 
current master.


-- 
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]

Reply via email to