-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Update extending-operators.md #15832
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
hi @xudong963 , i want to ask that did we had to rewrite the part of code https://github.com/apache/datafusion/blob/main/datafusion/core/tests/user_defined/user_defined_plan.rs#L18-L24 afterwards or just had to migrate the whole code into extending-operators . |
I think after migrating them, we don't need to retain the code |
does that mean that I need to migrate all the code from |
Yes, except tests. |
that means above it :
|
Hi @xudong963 , i think it is ready , give it a check |
You can refer to the doc: https://datafusion.apache.org/library-user-guide/custom-table-providers.html. It should contain the real code https://github.com/apache/datafusion/blob/main/datafusion/core/tests/user_defined/user_defined_plan.rs#L458-L916 to describe the process of defining an extending operator, not only an SQL example. |
hey @xudong963 , check it out now . |
You can rebase with main |
Would anyone happen to know how to preview the HTML format for the PR changes? |
doe this solve the issue ? |
You can open the failed CI and see what's wrong:
The error is fixed in main, so rebasing your branch with main will fix the error |
Thank for your help @xudong963 but I think it didn't work for the failing workflow |
Sorry I am on vacation , you can try to fix by the error hints in ci |
i Think we need @alamb help now . could you help ? |
@alamb , please take a look |
could anyone please help here ? |
Hi @alamb thanks for the help , I tried doing so and eventually I understand the problem but couldn't find a complete solution . |
any updates ?? @alamb @xudong963 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Adez017 -- I took a brief look at this and I pushed some small changes.
I think the code will need some more work
…ch-1 :wq sdaklas � : especially if it merges an updated upstream into a topic branch.
@alamb i think it perfect now and working . please take a look |
@alamb @xudong963 gentleman's tis need your attention now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you.
It's very close to the finish line. The last thing that we need is to preview the HTML. cc @alamb , could you please show me how to do the preview?
|
||
Note: DataFusion contains a highly optimized version of the `TopK` operator, but we present a simplified version in this section for explanatory purposes. For more information, see the full implementation in the [DataFusion repository]. | ||
|
||
[DataFusion repository]: https://docs.rs/datafusion/latest/datafusion/physical_plan/struct.TopK.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[DataFusion Doc]?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or maybe it should be a link to the source code - I was trying to avoid some link that would get out of date but maybe that in inevitable
I believe you can follow the steps here: https://github.com/apache/datafusion/tree/main/docs#build--preview |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @Adez017 and @xudong963 -- I agree this is very close.
This current PR also adds a copy of adding a user defined plan. Maybe we can also remove the old copy?
|
||
Note: DataFusion contains a highly optimized version of the `TopK` operator, but we present a simplified version in this section for explanatory purposes. For more information, see the full implementation in the [DataFusion repository]. | ||
|
||
[DataFusion repository]: https://docs.rs/datafusion/latest/datafusion/physical_plan/struct.TopK.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or maybe it should be a link to the source code - I was trying to avoid some link that would get out of date but maybe that in inevitable
} | ||
} | ||
``` | ||
|
||
DataFusion supports extension of operators by transforming logical plan and execution plan through customized [optimizer rules](https://docs.rs/datafusion/latest/datafusion/optimizer/trait.OptimizerRule.html). This section will use the µWheel project to illustrate such capabilities. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section now seems somewhat to duplicate the new sections
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think we can rationalize it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about this ? we can write a separate guide or something for the µWheel
, removing the content from this PR and make it as a separate . if you are agree @alamb , I would love to do the job if possible
@alamb cc: @xudong963 check it now |
hey @alamb @xudong963 since your last visit I had made some changes . please take a look |
Which issue does this PR close?
user_defined_plan.rs
to theextending-operators
doc #15774Rationale for this change
updated the extending-operators.md file