Skip to content

Commit 6613d6c

Browse files
authored
fix: Update native protocol code updates and apply format fixes missed in previous PRs. (#43)
1 parent 56b7211 commit 6613d6c

File tree

4 files changed

+18
-8
lines changed

4 files changed

+18
-8
lines changed

presto-native-execution/CMakeLists.txt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ message("Appending CMAKE_CXX_FLAGS with ${SCRIPT_CXX_FLAGS}")
3030
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SCRIPT_CXX_FLAGS}")
3131

3232
# Known warnings that are benign can be disabled:
33-
# - `restrict` since it triggers a bug in gcc 12. See
33+
#
34+
# * `restrict` since it triggers a bug in gcc 12. See
3435
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105651
3536
set(DISABLED_WARNINGS
3637
"-Wno-nullability-completeness \
@@ -69,9 +70,10 @@ option(PRESTO_ENABLE_JWT "Enable JWT (JSON Web Token) authentication" OFF)
6970

7071
option(PRESTO_ENABLE_ARROW_FLIGHT_CONNECTOR "Enable Arrow Flight connector" OFF)
7172

72-
# Set all Velox options below
73-
# Make sure that if we include folly headers or other dependency headers
74-
# that include folly headers we turn off the coroutines and turn on int128.
73+
# Set all Velox options below.
74+
75+
# Make sure that if we include folly headers or other dependency headers that
76+
# include folly headers we turn off the coroutines and turn on int128.
7577
add_compile_definitions(FOLLY_HAVE_INT128_T=1 FOLLY_CFG_NO_COROUTINES)
7678

7779
if(PRESTO_ENABLE_S3)
@@ -199,7 +201,8 @@ find_package(wangle CONFIG)
199201
find_package(FBThrift)
200202
include_directories(SYSTEM ${FBTHRIFT_INCLUDE_DIR})
201203

202-
set(PROXYGEN_LIBRARIES ${PROXYGEN_HTTP_SERVER} ${PROXYGEN} ${WANGLE} ${FIZZ} ${MVFST_EXCEPTION})
204+
set(PROXYGEN_LIBRARIES ${PROXYGEN_HTTP_SERVER} ${PROXYGEN} ${WANGLE} ${FIZZ}
205+
${MVFST_EXCEPTION})
203206
find_path(PROXYGEN_DIR NAMES include/proxygen)
204207
set(PROXYGEN_INCLUDE_DIR "${PROXYGEN_DIR}/include/proxygen")
205208

presto-native-execution/presto_cpp/main/CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,12 @@ set_property(TARGET presto_server_lib PROPERTY JOB_POOL_LINK
111111

112112
add_executable(presto_server PrestoMain.cpp)
113113

114-
# velox_tpch_connector is an OBJECT target in Velox and so needs to be linked
115-
# to the executable or use TARGET_OBJECT linkage for the presto_server_lib target.
114+
# velox_tpch_connector is an OBJECT target in Velox and so needs to be linked to
115+
# the executable or use TARGET_OBJECT linkage for the presto_server_lib target.
116116
# However, we also would need to add its dependencies (tpch_gen etc).
117-
# TODO change the target in Velox to a library target then we can move this to the
117+
#
118+
# TODO change the target in Velox to a library target then we can move this to
119+
# the presto_server_lib.
118120
# presto_server_lib.
119121
target_link_libraries(presto_server presto_server_lib velox_tpch_connector)
120122

presto-native-execution/presto_cpp/presto_protocol/connector/hive/presto_protocol_hive.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -790,6 +790,8 @@ namespace facebook::presto::protocol::hive {
790790

791791
void to_json(json& j, const Table& p) {
792792
j = json::object();
793+
to_json_key(
794+
j, "catalogName", p.catalogName, "Table", "String", "catalogName");
793795
to_json_key(
794796
j, "databaseName", p.databaseName, "Table", "String", "databaseName");
795797
to_json_key(j, "tableName", p.tableName, "Table", "String", "tableName");
@@ -830,6 +832,8 @@ void to_json(json& j, const Table& p) {
830832
}
831833

832834
void from_json(const json& j, Table& p) {
835+
from_json_key(
836+
j, "catalogName", p.catalogName, "Table", "String", "catalogName");
833837
from_json_key(
834838
j, "databaseName", p.databaseName, "Table", "String", "databaseName");
835839
from_json_key(j, "tableName", p.tableName, "Table", "String", "tableName");

presto-native-execution/presto_cpp/presto_protocol/connector/hive/presto_protocol_hive.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ void from_json(const json& j, Storage& p);
180180
} // namespace facebook::presto::protocol::hive
181181
namespace facebook::presto::protocol::hive {
182182
struct Table {
183+
std::shared_ptr<String> catalogName = {};
183184
String databaseName = {};
184185
String tableName = {};
185186
String owner = {};

0 commit comments

Comments
 (0)