Skip to content

Commit 5f3afe0

Browse files
authored
chore(query): bump enum-as-inner 0.6 (#17120)
bump enum-as-inner
1 parent 9a8784e commit 5f3afe0

File tree

9 files changed

+19
-44
lines changed

9 files changed

+19
-44
lines changed

Cargo.lock

Lines changed: 10 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ dyn-clone = "1.0.9"
272272
educe = "0.4" # FIXME: failed to upgrade to educe 0.6
273273
either = "1.9"
274274
enquote = "1.1.0"
275-
enum-as-inner = "0.5" # FIXME: failed to upgrade to enum-as-inner 0.6
275+
enum-as-inner = "0.6"
276276
enum_dispatch = "0.3.13"
277277
enumflags2 = { version = "0.7.7", features = ["serde"] }
278278
ethnum = { version = "1.5.0" }

src/query/expression/src/expression.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ impl<Index: ColumnIndex> Expr<Index> {
429429
}
430430

431431
pub fn runtime_filter_supported_types(&self) -> bool {
432-
self.data_type().remove_nullable().is_numeric()
432+
self.data_type().remove_nullable().is_number()
433433
|| self.data_type().remove_nullable().is_string()
434434
|| self.data_type().remove_nullable().is_date()
435435
}

src/query/expression/src/kernels/group_by.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ impl DataBlock {
5656
for hash_key_type in hash_key_types {
5757
let not_null_type = hash_key_type.remove_nullable();
5858

59-
if not_null_type.is_numeric()
59+
if not_null_type.is_number()
6060
|| not_null_type.is_date_or_date_time()
6161
|| not_null_type.is_decimal()
6262
{

src/query/expression/src/types.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,6 @@ impl DataType {
114114
}
115115
}
116116

117-
pub fn is_nullable(&self) -> bool {
118-
matches!(self, &DataType::Nullable(_))
119-
}
120-
121117
pub fn is_nullable_or_null(&self) -> bool {
122118
matches!(self, &DataType::Nullable(_) | &DataType::Null)
123119
}
@@ -207,10 +203,6 @@ impl DataType {
207203
}
208204
}
209205

210-
pub fn is_numeric(&self) -> bool {
211-
matches!(self, DataType::Number(_))
212-
}
213-
214206
#[inline]
215207
pub fn is_integer(&self) -> bool {
216208
match self {
@@ -227,11 +219,6 @@ impl DataType {
227219
}
228220
}
229221

230-
#[inline]
231-
pub fn is_decimal(&self) -> bool {
232-
matches!(self, DataType::Decimal(_ty))
233-
}
234-
235222
#[inline]
236223
pub fn is_date_or_date_time(&self) -> bool {
237224
matches!(self, DataType::Timestamp | DataType::Date)

src/query/expression/src/utils/block_debug.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ fn render_head(
443443

444444
header.push(cell);
445445

446-
if field.data_type().is_numeric() {
446+
if field.data_type().is_number() {
447447
aligns.push(CellAlignment::Right);
448448
} else {
449449
aligns.push(CellAlignment::Left);
@@ -493,7 +493,7 @@ fn render_head(
493493

494494
header.push(cell);
495495

496-
if field.data_type().is_numeric() {
496+
if field.data_type().is_number() {
497497
aligns.push(CellAlignment::Right);
498498
} else {
499499
aligns.push(CellAlignment::Left);

src/query/expression/tests/it/input_columns.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ fn test_input_columns() {
2929
let data_types = proxy.as_block().unwrap().data_types();
3030
assert!(data_types[0].is_boolean());
3131
assert!(data_types[1].is_string());
32-
assert!(data_types[2].is_numeric());
32+
assert!(data_types[2].is_number());
3333

3434
assert_eq!(proxy.iter().count(), 3);
3535

src/query/functions/src/scalars/map.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ fn check_map_arg_types(args_type: &[DataType]) -> Option<DataType> {
590590
fn check_valid_map_key_type(key_type: &DataType) -> bool {
591591
key_type.is_boolean()
592592
|| key_type.is_string()
593-
|| key_type.is_numeric()
593+
|| key_type.is_number()
594594
|| key_type.is_decimal()
595595
|| key_type.is_date_or_date_time()
596596
}

src/query/service/src/pipelines/processors/transforms/hash_join/hash_join_build_state.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,7 @@ impl HashJoinBuildState {
865865
.zip(self.hash_join_state.hash_join_desc.probe_keys_rt.iter())
866866
.filter_map(|(b, p)| p.as_ref().map(|(p, index)| (b, p, index)))
867867
{
868-
if !build_key.data_type().remove_nullable().is_numeric()
868+
if !build_key.data_type().remove_nullable().is_number()
869869
&& !build_key.data_type().remove_nullable().is_string()
870870
{
871871
continue;
@@ -942,7 +942,7 @@ impl HashJoinBuildState {
942942
build_key: &Expr,
943943
probe_key: &Expr<String>,
944944
) -> Result<()> {
945-
if !build_key.data_type().remove_nullable().is_numeric()
945+
if !build_key.data_type().remove_nullable().is_number()
946946
&& !build_key.data_type().remove_nullable().is_string()
947947
{
948948
return Ok(());

0 commit comments

Comments
 (0)