[Optimize] Optimize cpu consumption when importing parquet files (#6782)
Remove part of dynamic_cast, reduce the overhead caused by type conversion, and probably reduce the cpu consumption of parquet file import by about 10%
This commit is contained in:
@ -471,7 +471,7 @@ bool EsScanNode::get_disjuncts(ExprContext* context, Expr* conjunct,
|
||||
}
|
||||
TExtInPredicate ext_in_predicate;
|
||||
std::vector<TExtLiteral> in_pred_values;
|
||||
InPredicate* pred = dynamic_cast<InPredicate*>(conjunct);
|
||||
InPredicate* pred = static_cast<InPredicate*>(conjunct);
|
||||
ext_in_predicate.__set_is_not_in(pred->is_not_in());
|
||||
if (Expr::type_without_cast(pred->get_child(0)) != TExprNodeType::SLOT_REF) {
|
||||
return false;
|
||||
@ -612,7 +612,8 @@ bool EsScanNode::to_ext_literal(PrimitiveType slot_type, void* value, TExtLitera
|
||||
case TYPE_LARGEINT: {
|
||||
node_type = (TExprNodeType::LARGE_INT_LITERAL);
|
||||
TLargeIntLiteral large_int_literal;
|
||||
large_int_literal.__set_value(LargeIntValue::to_string(*reinterpret_cast<__int128*>(value)));
|
||||
large_int_literal.__set_value(
|
||||
LargeIntValue::to_string(*reinterpret_cast<__int128*>(value)));
|
||||
literal->__set_large_int_literal(large_int_literal);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user