Skip to content

Commit e68e3b1

Browse files
committed
fix int type issues
1 parent a85afa6 commit e68e3b1

File tree

6 files changed

+8
-7
lines changed

6 files changed

+8
-7
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ target_include_directories(presto_thrift-cpp2-obj PUBLIC ${THRIFT_INCLUDES}
3838
${GLOG_INCLUDE_DIR})
3939

4040
add_library(presto_thrift_extra ProtocolToThrift.cpp)
41-
target_compile_definitions(presto_thrift_extra PRIVATE _GLIBCXX_HAVE_INT64_T_LONG=1)
4241
target_include_directories(
4342
presto_thrift_extra PUBLIC ${presto_thrift_INCLUDES} ${THRIFT_INCLUDES}
4443
${GLOG_INCLUDE_DIR})

presto-native-execution/presto_cpp/main/thrift/ProtocolToThrift.cpp

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

presto-native-execution/presto_cpp/main/thrift/special/TimeZoneKey.cpp.inc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ void toThrift(const facebook::presto::protocol::TimeZoneKey& proto, TimeZoneKey&
1616
toThrift(proto, *thrift.key_ref());
1717
}
1818
void fromThrift(const TimeZoneKey& thrift, facebook::presto::protocol::TimeZoneKey& proto) {
19-
fromThrift(*thrift.key_ref(), proto);
19+
int64_t protoValue = static_cast<int64_t>(proto);
20+
fromThrift(*thrift.key_ref(), protoValue);
2021
}

presto-native-execution/presto_cpp/presto_protocol/core/presto_protocol_core.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ namespace facebook::presto::protocol {
728728

729729
struct Lifespan {
730730
bool isgroup = false;
731-
long groupid = 0;
731+
int groupid = 0;
732732

733733
bool operator<(const Lifespan& o) const {
734734
return groupid < o.groupid;
@@ -760,7 +760,7 @@ void from_json(const json& j, Split& p);
760760
namespace facebook::presto::protocol {
761761

762762
struct ScheduledSplit {
763-
long sequenceId = {};
763+
int64_t sequenceId = {};
764764
PlanNodeId planNodeId = {}; // dependency
765765
Split split = {};
766766

presto-native-execution/presto_cpp/presto_protocol/core/special/Lifespan.hpp.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace facebook::presto::protocol {
1515

1616
struct Lifespan {
1717
bool isgroup = false;
18-
long groupid = 0;
18+
int groupid = 0;
1919

2020
bool operator<(const Lifespan& o) const {
2121
return groupid < o.groupid;

presto-native-execution/presto_cpp/presto_protocol/core/special/ScheduledSplit.hpp.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
namespace facebook::presto::protocol {
1515

1616
struct ScheduledSplit {
17-
long sequenceId = {};
17+
int64_t sequenceId = {};
1818
PlanNodeId planNodeId = {}; // dependency
1919
Split split = {};
2020

0 commit comments

Comments
 (0)