Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions presto-native-execution/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ set(CMAKE_CXX_STANDARD_REQUIRED True)
message("Appending CMAKE_CXX_FLAGS with ${SCRIPT_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SCRIPT_CXX_FLAGS}")

# Known warnings that are benign can be disabled:
# - `restrict` since it triggers a bug in gcc 12. See
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105651
# Known warnings that are benign can be disabled: - `restrict` since it triggers
# a bug in gcc 12. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105651
Comment thread
anlowee marked this conversation as resolved.
Resolved
set(DISABLED_WARNINGS
"-Wno-nullability-completeness \
-Wno-deprecated-declarations \
Expand Down Expand Up @@ -69,9 +68,10 @@ option(PRESTO_ENABLE_JWT "Enable JWT (JSON Web Token) authentication" OFF)

option(PRESTO_ENABLE_ARROW_FLIGHT_CONNECTOR "Enable Arrow Flight connector" OFF)

# Set all Velox options below
# Make sure that if we include folly headers or other dependency headers
# that include folly headers we turn off the coroutines and turn on int128.
# Set all Velox options below.

# Make sure that if we include folly headers or other dependency headers that
# include folly headers we turn off the coroutines and turn on int128.
Comment on lines -72 to +76

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I think the orignal comments (in prestodb master branch) are not formatted well so the clang-format is trying to fix this issue. I changed it a bit according to this line: https://github.com/y-scope/presto/pull/43/files#diff-f4770996c945761a121b4351ae31adecae46b00a0767c8c4cb04112731984795R45

add_compile_definitions(FOLLY_HAVE_INT128_T=1 FOLLY_CFG_NO_COROUTINES)

if(PRESTO_ENABLE_S3)
Expand Down Expand Up @@ -199,7 +199,8 @@ find_package(wangle CONFIG)
find_package(FBThrift)
include_directories(SYSTEM ${FBTHRIFT_INCLUDE_DIR})

set(PROXYGEN_LIBRARIES ${PROXYGEN_HTTP_SERVER} ${PROXYGEN} ${WANGLE} ${FIZZ} ${MVFST_EXCEPTION})
set(PROXYGEN_LIBRARIES ${PROXYGEN_HTTP_SERVER} ${PROXYGEN} ${WANGLE} ${FIZZ}
${MVFST_EXCEPTION})
find_path(PROXYGEN_DIR NAMES include/proxygen)
set(PROXYGEN_INCLUDE_DIR "${PROXYGEN_DIR}/include/proxygen")

Expand Down
8 changes: 4 additions & 4 deletions presto-native-execution/presto_cpp/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ set_property(TARGET presto_server_lib PROPERTY JOB_POOL_LINK

add_executable(presto_server PrestoMain.cpp)

# velox_tpch_connector is an OBJECT target in Velox and so needs to be linked
# to the executable or use TARGET_OBJECT linkage for the presto_server_lib target.
# However, we also would need to add its dependencies (tpch_gen etc).
# TODO change the target in Velox to a library target then we can move this to the
# velox_tpch_connector is an OBJECT target in Velox and so needs to be linked to
# the executable or use TARGET_OBJECT linkage for the presto_server_lib target.
# However, we also would need to add its dependencies (tpch_gen etc). TODO
# change the target in Velox to a library target then we can move this to the
Comment thread
anlowee marked this conversation as resolved.
Resolved
# presto_server_lib.
Comment on lines +114 to 120

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Remove stray duplicate comment line.

Line 120 repeats the fragment “presto_server_lib.” that is already covered in the previous sentence and adds no value. Trimming it keeps the comment block tidy.

-# presto_server_lib.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# velox_tpch_connector is an OBJECT target in Velox and so needs to be linked to
# the executable or use TARGET_OBJECT linkage for the presto_server_lib target.
# However, we also would need to add its dependencies (tpch_gen etc).
# TODO change the target in Velox to a library target then we can move this to the
#
# TODO change the target in Velox to a library target then we can move this to
# the presto_server_lib.
# presto_server_lib.
# velox_tpch_connector is an OBJECT target in Velox and so needs to be linked to
# the executable or use TARGET_OBJECT linkage for the presto_server_lib target.
# However, we also would need to add its dependencies (tpch_gen etc).
#
# TODO change the target in Velox to a library target then we can move this to
# the presto_server_lib.
🤖 Prompt for AI Agents
In presto-native-execution/presto_cpp/main/CMakeLists.txt around lines 114 to
120, remove the duplicate fragment "presto_server_lib." on line 120 from the
comment block to avoid redundancy and keep the comments clean and concise.

target_link_libraries(presto_server presto_server_lib velox_tpch_connector)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,8 @@ namespace facebook::presto::protocol::hive {

void to_json(json& j, const Table& p) {
j = json::object();
to_json_key(
j, "catalogName", p.catalogName, "Table", "String", "catalogName");
to_json_key(
j, "databaseName", p.databaseName, "Table", "String", "databaseName");
to_json_key(j, "tableName", p.tableName, "Table", "String", "tableName");
Expand Down Expand Up @@ -830,6 +832,8 @@ void to_json(json& j, const Table& p) {
}

void from_json(const json& j, Table& p) {
from_json_key(
j, "catalogName", p.catalogName, "Table", "String", "catalogName");
from_json_key(
j, "databaseName", p.databaseName, "Table", "String", "databaseName");
from_json_key(j, "tableName", p.tableName, "Table", "String", "tableName");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ void from_json(const json& j, Storage& p);
} // namespace facebook::presto::protocol::hive
namespace facebook::presto::protocol::hive {
struct Table {
std::shared_ptr<String> catalogName = {};
String databaseName = {};
String tableName = {};
String owner = {};
Expand Down