Skip to content

Commit 3040443

Browse files
committed
feat: upgrade substrait to 0.23.0
1 parent 5d09c44 commit 3040443

File tree

4 files changed

+21
-20
lines changed

4 files changed

+21
-20
lines changed

include/substrait/common/Exceptions.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
#pragma once
44

5+
#include <fmt/format.h>
56
#include <memory>
67
#include <utility>
7-
#include <fmt/format.h>
88

99
namespace io::substrait::common {
1010
namespace error_code {
@@ -93,44 +93,44 @@ std::string errorMessage(fmt::string_view fmt, const Args&... args) {
9393

9494
#define SUBSTRAIT_THROW(exception, errorCode, ...) \
9595
{ \
96-
auto message = substrait::common::errorMessage(__VA_ARGS__); \
96+
auto message = ::io::substrait::common::errorMessage(__VA_ARGS__); \
9797
throw exception(errorCode, message); \
9898
}
9999

100100
#define SUBSTRAIT_UNSUPPORTED(...) \
101101
SUBSTRAIT_THROW( \
102-
substrait::common::SubstraitUserError, \
103-
substrait::common::error_code::kUnsupported, \
102+
::io::substrait::common::SubstraitUserError, \
103+
::io::substrait::common::error_code::kUnsupported, \
104104
##__VA_ARGS__)
105105

106106
#define SUBSTRAIT_UNREACHABLE(...) \
107107
SUBSTRAIT_THROW( \
108-
substrait::common::SubstraitRuntimeError, \
109-
substrait::common::error_code::kUnreachableCode, \
108+
::io::substrait::common::SubstraitRuntimeError, \
109+
::io::substrait::common::error_code::kUnreachableCode, \
110110
##__VA_ARGS__)
111111

112112
#define SUBSTRAIT_FAIL(...) \
113113
SUBSTRAIT_THROW( \
114-
::substrait::common::SubstraitRuntimeError, \
115-
::substrait::common::error_code::kInvalidState, \
114+
::io::::substrait::common::SubstraitRuntimeError, \
115+
::io::::substrait::common::error_code::kInvalidState, \
116116
##__VA_ARGS__)
117117

118118
#define SUBSTRAIT_USER_FAIL(...) \
119119
SUBSTRAIT_THROW( \
120-
substrait::common::SubstraitUserError, \
121-
substrait::common::error_code::kInvalidState, \
120+
::io::substrait::common::SubstraitUserError, \
121+
::io::substrait::common::error_code::kInvalidState, \
122122
##__VA_ARGS__)
123123

124124
#define SUBSTRAIT_NYI(...) \
125125
SUBSTRAIT_THROW( \
126-
substrait::common::SubstraitRuntimeError, \
127-
substrait::common::error_code::kNotImplemented, \
126+
::io::substrait::common::SubstraitRuntimeError, \
127+
::io::substrait::common::error_code::kNotImplemented, \
128128
##__VA_ARGS__)
129129

130130
#define SUBSTRAIT_IVALID_ARGUMENT(...) \
131131
SUBSTRAIT_THROW( \
132-
substrait::common::SubstraitUserError, \
133-
substrait::common::error_code::kInvalidArgument, \
132+
::io::substrait::common::SubstraitUserError, \
133+
::io::substrait::common::error_code::kInvalidArgument, \
134134
##__VA_ARGS__)
135135

136136
} // namespace io::substrait::common

substrait/function/tests/FunctionLookupTest.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ TEST_F(FunctionLookupTest, compare_function) {
7272

7373
TEST_F(FunctionLookupTest, arithmetic_function) {
7474
testScalarFunctionLookup(
75-
{"add", {TINYINT(), TINYINT()}, TINYINT()}, "add:opt_i8_i8");
75+
{"add", {TINYINT(), TINYINT()}, TINYINT()}, "add:i8_i8");
7676

7777
testScalarFunctionLookup(
7878
{"divide",
@@ -81,13 +81,13 @@ TEST_F(FunctionLookupTest, arithmetic_function) {
8181
FLOAT(),
8282
},
8383
FLOAT()},
84-
"divide:opt_opt_opt_fp32_fp32");
84+
"divide:fp32_fp32");
8585
}
8686

8787
TEST_F(FunctionLookupTest, aggregate) {
8888
// for intermediate type
8989
testAggregateFunctionLookup(
90-
{"avg", {STRUCT({DOUBLE(), BIGINT()})}, FLOAT()}, "avg:opt_fp32");
90+
{"avg", {STRUCT({DOUBLE(), BIGINT()})}, FLOAT()}, "avg:fp32");
9191
}
9292

9393
TEST_F(FunctionLookupTest, logical) {
@@ -102,10 +102,10 @@ TEST_F(FunctionLookupTest, logical) {
102102

103103
TEST_F(FunctionLookupTest, string_function) {
104104
testScalarFunctionLookup(
105-
{"like", {STRING(), STRING()}, BOOL()}, "like:opt_str_str");
105+
{"like", {STRING(), STRING()}, BOOL()}, "like:str_str");
106106
testScalarFunctionLookup(
107107
{"like", {VARCHAR(3), VARCHAR(4)}, BOOL()},
108-
"like:opt_vchar<L1>_vchar<L2>");
108+
"like:vchar<L1>_vchar<L2>");
109109
testScalarFunctionLookup(
110110
{"substring", {STRING(), INTEGER(), INTEGER()}, STRING()},
111111
"substring:str_i32_i32");

substrait/type/tests/TypeTest.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ TEST_F(TypeTest, decodeTest) {
130130
"LIST?<any>",
131131
[](const std::shared_ptr<const ParameterizedList>& typePtr) {
132132
ASSERT_EQ(typePtr->signature(), "list<any>");
133+
ASSERT_EQ(typePtr->nullable(),true);
133134
});
134135

135136
testDecode<ParameterizedMap>(

third_party/substrait

Submodule substrait updated 46 files

0 commit comments

Comments
 (0)