remove ExtractionFn.apply(Object) method#2405
Conversation
|
I think we should keep apply(Object), I have a patch WIP that enables long/float dimensions, and it uses that interface: https://github.com/jon-wei/druid/tree/flex_dims_pt2 If we are to change the ExtractionFn interface, I think it actually makes more sense to collapse all of the apply() functions to apply(Object). "Stringy" extraction functions like Regex can call .toString() to convert the Object as needed, and other extraction functions like Javascript that are capable of accepting Object should have an interface to do so (JavascriptExtractionFn currently converts Objects to String, but the compiled function is able to accept Object) |
|
Yes, it would be better to have multiple methods for each type or only one generic(Object) method. But currently it's not either and that induces confusing. Anyway I've understood current state and thinking of closing this. One last question. Would it be worse to have, with |
|
With above change, TimeExtractionFunction will have a method like, |
|
This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@druid.apache.org list. Thank you for your contributions. |
|
This pull request has been closed due to lack of activity. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time. |
It's really trivial but I think worth to be looked. Afaik it's applied to dimension, which is mostly string type and long type for time dimension. But it takes Object as argument, making me dizzy thinking what this possibly can be when implementing the function. Can we remove that? I think in someday, we would need something like
apply(Object value, ValueType type)but for now, it seemed to much.