Skip to content

Commit

Permalink
[BugFix] es operator support decimalV3 predicate (backport #43577) (#…
Browse files Browse the repository at this point in the history
…43915)

Signed-off-by: Seaven <[email protected]>
Co-authored-by: Seaven <[email protected]>
  • Loading branch information
mergify[bot] and Seaven authored Apr 12, 2024
1 parent c06936a commit 5df407e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions be/src/exec/es/es_predicate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@

#include <map>
#include <sstream>
#include <type_traits>
#include <utility>

#include "column/column.h"
Expand All @@ -50,6 +51,7 @@
#include "exprs/expr.h"
#include "exprs/expr_context.h"
#include "exprs/in_const_predicate.hpp"
#include "gutil/casts.h"
#include "runtime/large_int_value.h"
#include "runtime/runtime_state.h"
#include "runtime/string_value.h"
Expand Down Expand Up @@ -100,6 +102,13 @@ VExtLiteral::VExtLiteral(LogicalType type, ColumnPtr column, const std::string&
} else {
_value = "false";
}
} else if (type == TYPE_DECIMAL32 || type == TYPE_DECIMAL64 || type == TYPE_DECIMAL128) {
DCHECK(!column->is_null(0));
if (column->is_constant()) {
_value = down_cast<ConstColumn*>(column.get())->data_column()->debug_item(0);
} else {
_value = column->debug_item(0);
}
} else {
_value = _value_to_string(column);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1894,7 +1894,7 @@ public SessionVariable setHiveTempStagingDir(String hiveTempStagingDir) {
@VarAttr(name = CBO_DECIMAL_CAST_STRING_STRICT, flag = VariableMgr.INVISIBLE)
private boolean cboDecimalCastStringStrict = true;

@VarAttr(name = CBO_EQ_BASE_TYPE, flag = VariableMgr.INVISIBLE)
@VarAttr(name = CBO_EQ_BASE_TYPE)
private String cboEqBaseType = SessionVariableConstants.DECIMAL;

@VariableMgr.VarAttr(name = ENABLE_RESULT_SINK_ACCUMULATE)
Expand Down

0 comments on commit 5df407e

Please sign in to comment.