You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by "LuciferYang (via GitHub)" <gi...@apache.org> on 2026/09/10 17:12:18 UTC

[PR] [KYUUBI #7731][UTIL] Stop re-labeling invocation failures as missing members in ReflectUtils [kyuubi]

LuciferYang opened a new pull request, #7732:
URL: https://github.com/apache/kyuubi/pull/7732

   ### Why are the changes needed?
   
   Closes #7731.
   
   `ReflectUtils.getField` and `invokeAs` wrapped the whole body in one `try` and rewrote any `Exception` as `RuntimeException(s"$clz does not have ...", e)`. Because `bind`/`get`/`invoke` ran inside that same `try`, a failure thrown by the found field or the invoked method itself was relabeled as a missing member, and the real exception survived only as the cause.
   
   This moves the `try`/`catch` to wrap only the lookup (`DynFields`/`DynMethods` `build`/`buildChecked`). The "does not have" message now applies only when the lookup fails; a failure while binding, reading, or invoking the found member keeps its own type and message.
   
   ### How was this patch tested?
   
   Added two `ReflectUtilsSuite` cases: an invoked method that throws `IllegalArgumentException("bad input")` must propagate that exception rather than a "does not have" message, and binding a `Class` target to an instance field must surface the field wrapper's "Cannot bind" `IllegalArgumentException`. Both fail if the catch is widened back over the invocation.
   
   ```
   build/mvn test -pl kyuubi-util-scala -am
   build/mvn scalastyle:check spotless:check -pl kyuubi-util-scala -am
   ```
   
   Module green on Zulu 17.0.18 (23/23), scalastyle 0 errors, spotless clean.
   
   ### Was this patch assisted by generative AI tooling?
   
   Assisted-by: Claude Opus 4.8
   


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


Re: [PR] [KYUUBI #7731][UTIL] Stop re-labeling invocation failures as missing members in ReflectUtils [kyuubi]

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on PR #7732:
URL: https://github.com/apache/kyuubi/pull/7732#issuecomment-6414632470

   Thank you @pan3793 


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


Re: [PR] [KYUUBI #7731][UTIL] Stop re-labeling invocation failures as missing members in ReflectUtils [kyuubi]

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 closed pull request #7732: [KYUUBI #7731][UTIL] Stop re-labeling invocation failures as missing members in ReflectUtils
URL: https://github.com/apache/kyuubi/pull/7732


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


Re: [PR] [KYUUBI #7731][UTIL] Stop re-labeling invocation failures as missing members in ReflectUtils [kyuubi]

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on PR #7732:
URL: https://github.com/apache/kyuubi/pull/7732#issuecomment-6413650310

   **Merge Summary:**
   - merged into master https://github.com/apache/kyuubi/commit/d7ca98566a6eac3de2b53da898f401b2c8a4a84f
   - merged into branch-1.12 https://github.com/apache/kyuubi/commit/08d30cf203f55bb6b3a74da2101dbd878ce2af8e
   
   *Posted by `merge_kyuubi_pr.py`*


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org