Skip to content
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

[native] Add proxygen endpoint for expression evaluation #22927

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pramodsatya
Copy link
Contributor

@pramodsatya pramodsatya commented Jun 5, 2024

Adds proxygen endpoint for expression evaluation in the native sidecar, the
expression is delegated to the sidecar by changes in #23331 .
Depends on facebookincubator/velox#10657 .

@pramodsatya pramodsatya changed the title [WIP] Add proxygen endpoint for expression evaluation [native] Add proxygen endpoint for expression evaluation Aug 5, 2024
@tdcmeehan tdcmeehan self-assigned this Aug 5, 2024
@pramodsatya pramodsatya force-pushed the expr_endpt branch 2 times, most recently from 822f79f to 2352cd4 Compare September 11, 2024 14:52
Copy link
Contributor

@aditi-pandit aditi-pandit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pramodsatya : Have done a first round of comments. Will read your tests more closely once you address the comments here.

presto-native-execution/presto_cpp/main/PrestoServer.cpp Outdated Show resolved Hide resolved
functions::prestosql::registerAllScalarFunctions("presto.default.");
exec::registerFunctionCallToSpecialForms();

auto httpServer = std::make_unique<http::HttpServer>(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can test RowExpressionEvaluator without all this http stubing if abstracting as suggested. That is cleaner.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please share how to get rid of this http stubbing? I wasn't quite able to follow how it can be refactored.

Copy link
Contributor Author

@pramodsatya pramodsatya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback @aditi-pandit, addressed the comments. Could you please take another look?

void RowExpressionEvaluator::evaluateExpression(
const std::vector<std::unique_ptr<folly::IOBuf>>& body,
proxygen::ResponseHandler* downstream) {
try {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion, added helper functions and updated accordingly. I could not find a similar utility function in the codebase. Could you please take another look?

functions::prestosql::registerAllScalarFunctions("presto.default.");
exec::registerFunctionCallToSpecialForms();

auto httpServer = std::make_unique<http::HttpServer>(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please share how to get rid of this http stubbing? I wasn't quite able to follow how it can be refactored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants