|
34 | 34 | #include "exprs/create_predicate_function.h" |
35 | 35 | #include "exprs/vcompound_pred.h" |
36 | 36 | #include "exprs/vdirect_in_predicate.h" |
| 37 | +#include "exprs/vectorized_fn_call.h" |
37 | 38 | #include "exprs/vexpr_context.h" |
38 | 39 | #include "exprs/vin_predicate.h" |
39 | | -#include "exprs/vectorized_fn_call.h" |
40 | 40 | #include "format/reader/expr/cast.h" |
41 | 41 | #include "format/reader/expr/literal.h" |
42 | 42 | #include "format/reader/expr/slot_ref.h" |
@@ -310,8 +310,8 @@ std::string TableColumnMapperOptions::debug_string() const { |
310 | 310 |
|
311 | 311 | std::string TableColumnMapper::debug_string(const ColumnDefinition& column) { |
312 | 312 | std::ostringstream out; |
313 | | - out << "ColumnDefinition{name=" << column.name << ", identifier=" |
314 | | - << field_debug_string(column.identifier) |
| 313 | + out << "ColumnDefinition{name=" << column.name |
| 314 | + << ", identifier=" << field_debug_string(column.identifier) |
315 | 315 | << ", local_id=" << column.local_id << ", type=" << data_type_debug_string(column.type) |
316 | 316 | << ", children=" |
317 | 317 | << join_debug_strings(column.children, |
@@ -519,10 +519,10 @@ Status clone_table_expr_tree(const VExprSPtr& expr, VExprSPtr* cloned_expr) { |
519 | 519 |
|
520 | 520 | VExprSPtr cloned; |
521 | 521 | if (const auto* table_slot_ref = dynamic_cast<const TableSlotRef*>(expr.get())) { |
522 | | - cloned = TableSlotRef::create_shared( |
523 | | - table_slot_ref->slot_id(), table_slot_ref->column_id(), |
524 | | - table_slot_ref->column_uniq_id(), table_slot_ref->data_type(), |
525 | | - table_slot_ref->column_name()); |
| 522 | + cloned = TableSlotRef::create_shared(table_slot_ref->slot_id(), table_slot_ref->column_id(), |
| 523 | + table_slot_ref->column_uniq_id(), |
| 524 | + table_slot_ref->data_type(), |
| 525 | + table_slot_ref->column_name()); |
526 | 526 | } else if (const auto* vslot_ref = dynamic_cast<const VSlotRef*>(expr.get())) { |
527 | 527 | cloned = TableSlotRef::create_shared(vslot_ref->slot_id(), vslot_ref->column_id(), |
528 | 528 | vslot_ref->column_uniq_id(), vslot_ref->data_type(), |
@@ -1258,8 +1258,8 @@ static bool rewrite_binary_slot_literal_predicate( |
1258 | 1258 | return false; |
1259 | 1259 | } |
1260 | 1260 |
|
1261 | | - auto rewritten_literal = rewrite_literal_to_file_type(literal_expr, *rewrite_info, |
1262 | | - rewrite_context); |
| 1261 | + auto rewritten_literal = |
| 1262 | + rewrite_literal_to_file_type(literal_expr, *rewrite_info, rewrite_context); |
1263 | 1263 | if (rewritten_literal == nullptr) { |
1264 | 1264 | children[literal_child_idx] = original_table_literal(literal_expr, rewrite_context); |
1265 | 1265 | expr->set_children(std::move(children)); |
@@ -1295,15 +1295,15 @@ static bool rewrite_in_slot_literal_predicate( |
1295 | 1295 | if (literal_expr == nullptr) { |
1296 | 1296 | return false; |
1297 | 1297 | } |
1298 | | - auto rewritten_literal = rewrite_literal_to_file_type(literal_expr, *rewrite_info, |
1299 | | - rewrite_context); |
| 1298 | + auto rewritten_literal = |
| 1299 | + rewrite_literal_to_file_type(literal_expr, *rewrite_info, rewrite_context); |
1300 | 1300 | if (rewritten_literal == nullptr) { |
1301 | 1301 | for (size_t restore_idx = 1; restore_idx < children.size(); ++restore_idx) { |
1302 | 1302 | auto restore_literal = unwrap_literal_for_file_cast(children[restore_idx], |
1303 | 1303 | rewrite_info->table_type); |
1304 | 1304 | if (restore_literal != nullptr) { |
1305 | | - children[restore_idx] = original_table_literal(restore_literal, |
1306 | | - rewrite_context); |
| 1305 | + children[restore_idx] = |
| 1306 | + original_table_literal(restore_literal, rewrite_context); |
1307 | 1307 | } |
1308 | 1308 | } |
1309 | 1309 | expr->set_children(std::move(children)); |
@@ -1344,8 +1344,7 @@ static VExprSPtr rewrite_table_expr_to_file_expr( |
1344 | 1344 | // struct_element must see the actual file struct layout. Casting the parent struct |
1345 | 1345 | // to the output projection can hide filter-only children such as `s.id` in |
1346 | 1346 | // `SELECT s.name WHERE s.id > 5`. |
1347 | | - children[0] = create_file_slot_ref(*slot_ref, rewrite_it->second, |
1348 | | - rewrite_context); |
| 1347 | + children[0] = create_file_slot_ref(*slot_ref, rewrite_it->second, rewrite_context); |
1349 | 1348 | expr->set_children(std::move(children)); |
1350 | 1349 | return expr; |
1351 | 1350 | } |
@@ -1383,8 +1382,8 @@ static VExprSPtr rewrite_table_expr_to_file_expr( |
1383 | 1382 | global_to_file_slot.find(GlobalIndex(cast_set<size_t>(slot_ref->slot_id()))); |
1384 | 1383 | if (rewrite_it != global_to_file_slot.end() && |
1385 | 1384 | expr->data_type()->equals(*rewrite_it->second.table_type)) { |
1386 | | - auto rewritten_child = create_file_slot_ref(*slot_ref, rewrite_it->second, |
1387 | | - rewrite_context); |
| 1385 | + auto rewritten_child = |
| 1386 | + create_file_slot_ref(*slot_ref, rewrite_it->second, rewrite_context); |
1388 | 1387 | if (rewrite_it->second.file_type->equals(*rewrite_it->second.table_type)) { |
1389 | 1388 | return rewritten_child; |
1390 | 1389 | } |
@@ -1973,9 +1972,8 @@ Status TableColumnMapper::localize_filters(const std::vector<TableFilter>& table |
1973 | 1972 | if (!clone_status.ok()) { |
1974 | 1973 | continue; |
1975 | 1974 | } |
1976 | | - auto localized_root = |
1977 | | - rewrite_table_expr_to_file_expr(rewrite_root, global_to_file_slot, |
1978 | | - &rewrite_context); |
| 1975 | + auto localized_root = rewrite_table_expr_to_file_expr(rewrite_root, global_to_file_slot, |
| 1976 | + &rewrite_context); |
1979 | 1977 | auto localized_conjunct = VExprContext::create_shared(std::move(localized_root)); |
1980 | 1978 | RETURN_IF_ERROR(rewrite_context.prepare_created_exprs(localized_conjunct.get())); |
1981 | 1979 | file_request->conjuncts.push_back(std::move(localized_conjunct)); |
|
0 commit comments