Hi,

I have submitted a PR for SPARK-11962 (
https://github.com/apache/spark/pull/12708). I have most of it ready except
I am not able to pin point the cause for a particular bug.

In the PR I've added two major methods to Row, `attempt` and `getOption`.
The former returns a `Try` while the latter returns an `Option`.

   - `attempt` was added after a comment was made in PR #10247
   <https://github.com/apache/spark/pull/10247>, where it was suggested I
   not return `None` when certain exceptions are thrown. But in my opinion,
   throwing exceptions from a function which returns an `Option` is not a
   good use case.
   - I am not in love with the method name, `attempt`. Would welcome
   suggestions. I wanted to use `try` but it's a keyword.
   - So about the failing tests (which shouldn't fail in my opinion), in
   `RowTest`, all new tests testing for `ClassCastException` fail. I have
   modified tests as comments in the code blocks (with TODOs) which work, but
   should behave the same way as the actual test from what I can see. I am
   not sure what I am doing wrong in the code here.

Would appreciate some feedback.

Thanks,

Arun

P. S. I have sent similar emails to the dev mailing list before but I don't
see them in the dev archives. I am guessing they were not received as I was
not subscribed to the dev list. Hopefully this would work as I have
subscribed now.

Reply via email to