Skip to content

Commit

Permalink
[native] Add proxygen endpoint for expression evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
pramodsatya committed Sep 4, 2024
1 parent c778704 commit 822f79f
Show file tree
Hide file tree
Showing 14 changed files with 1,201 additions and 22 deletions.
2 changes: 2 additions & 0 deletions presto-native-execution/presto_cpp/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ add_subdirectory(operators)
add_subdirectory(types)
add_subdirectory(http)
add_subdirectory(common)
add_subdirectory(eval)
add_subdirectory(thrift)

add_library(
Expand Down Expand Up @@ -49,6 +50,7 @@ target_link_libraries(
presto_exception
presto_http
presto_operators
presto_expr_eval
velox_aggregates
velox_caching
velox_common_base
Expand Down
3 changes: 3 additions & 0 deletions presto-native-execution/presto_cpp/main/PrestoServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,9 @@ void PrestoServer::run() {
taskManager_->getQueryContextManager()->getSessionProperties();
http::sendOkResponse(downstream, sessionProperties.serialize());
});

prestoExprEval_ = std::make_unique<eval::PrestoExprEval>(pool_);
prestoExprEval_->registerUris(*httpServer_);
}

std::string taskUri;
Expand Down
2 changes: 2 additions & 0 deletions presto-native-execution/presto_cpp/main/PrestoServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "presto_cpp/main/PeriodicHeartbeatManager.h"
#include "presto_cpp/main/PrestoExchangeSource.h"
#include "presto_cpp/main/PrestoServerOperations.h"
#include "presto_cpp/main/eval/PrestoExprEval.h"
#include "presto_cpp/main/types/VeloxPlanValidator.h"
#include "velox/common/caching/AsyncDataCache.h"
#include "velox/common/memory/MemoryAllocator.h"
Expand Down Expand Up @@ -277,6 +278,7 @@ class PrestoServer {
std::string address_;
std::string nodeLocation_;
folly::SSLContextPtr sslContext_;
std::unique_ptr<eval::PrestoExprEval> prestoExprEval_;
};

} // namespace facebook::presto
33 changes: 33 additions & 0 deletions presto-native-execution/presto_cpp/main/eval/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright (c) Facebook, Inc. and its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
add_library(presto_expr_eval PrestoExprEval.cpp)

target_link_libraries(
presto_expr_eval
presto_type_converter
presto_types
presto_protocol
presto_http
velox_coverage_util
velox_parse_expression
velox_parse_parser
velox_presto_serializer
velox_serialization
velox_type_parser
${FOLLY_WITH_DEPENDENCIES}
${PROXYGEN_LIBRARIES})

if(PRESTO_ENABLE_TESTING)
add_subdirectory(tests)
endif()
Loading

0 comments on commit 822f79f

Please sign in to comment.