Repository navigation
[SPARK-3904] [SQL] add constant objectinspector support for udfs - #2762
chenghao-intel wants to merge 8 commits into
Conversation
|
Can one of the admins verify this patch? |
|
test this please. |
|
QA tests have started for PR 2762 at commit
|
|
QA tests have started for PR 2762 at commit
|
There was a problem hiding this comment.
I think you should put it after "udf_month"
There was a problem hiding this comment.
Thanks, moved.
|
QA tests have finished for PR 2762 at commit
|
|
Test FAILed. |
|
QA tests have finished for PR 2762 at commit
|
|
Test FAILed. |
|
QA tests have started for PR 2762 at commit
|
|
QA tests have finished for PR 2762 at commit
|
|
Test FAILed. |
335a952 to
cb97576
Compare
|
QA tests have started for PR 2762 at commit
|
|
QA tests have finished for PR 2762 at commit
|
|
Test PASSed. |
cb97576 to
bda7b5a
Compare
|
Thanks, I've rebased the latest master, and solved the issues you guys raised. |
|
test this please. |
There was a problem hiding this comment.
argumentInspector can be set once during deferedObjects creation, rather than execution per row.
|
unfortunately :( I also have worked and implemented the same as part of #2802 |
|
Thank you @gvramana , I've updated the code as you suggested. |
|
retest this please |
|
QA tests have started for PR 2762 at commit
|
|
QA tests have finished for PR 2762 at commit
|
|
test this please |
|
Test build #22345 has started for PR 2762 at commit
|
|
Test build #22345 has finished for PR 2762 at commit
|
|
Test FAILed. |
|
It passed the unit test in my local with the master rebased. Seems weird. |
|
retest this please. @liancheng :) |
|
Test build #490 has started for PR 2762 at commit
|
|
Also, this needs to be updated again (I think it conflicted with your CTAS patch). |
|
Test build #490 has finished for PR 2762 at commit
|
…the DeferredObject
782722f to
bcacfd7
Compare
|
Rebased! |
|
test this please |
There was a problem hiding this comment.
Seems that the Writable related code was reverted after rebase?
There was a problem hiding this comment.
Yes, currently the oi is should not be "preferWritable" as toInspector doesn't return that. Even if we return an new instance of Writable here, it's the same as the preferWritable ObjectInspector does internally.
As you suggested we don't want to dynamically check the oi type, I will keep that for future improvement, and to reuse the writable object.
|
Test build #22404 has started for PR 2762 at commit
|
|
Test build #22404 has finished for PR 2762 at commit
|
|
Test PASSed. |
|
Thanks for working on this. Merged to master. |
In HQL, we convert all of the data type into normal
ObjectInspectors for UDFs, most of cases it works, however, some of the UDF actually requires its childrenObjectInspectorto be theConstantObjectInspector, which will cause exception.e.g.
select named_struct("x", "str") from src limit 1;
I updated the method
wrapby adding the one more parameterObjectInspector(to describe what it expects to wrap to, for example: java.lang.Integer or IntWritable).As well as the
unwrapmethod by providing the inputObjectInspector.