Skip to content

Commit

Permalink
[fix](inverted index) fix array type inverted index query error (apac…
Browse files Browse the repository at this point in the history
  • Loading branch information
Tanya-W authored Feb 10, 2023
1 parent 43eca4f commit ad14174
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion be/src/exec/olap_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ class ColumnValueRange {
condition.__set_condition_op("match_element_ge");
}
condition.condition_values.push_back(
cast_to_string<primitive_type, CppType>(value.second, 0));
cast_to_string<primitive_type, CppType>(value.second, _scale));
if (condition.condition_values.size() != 0) {
filters.push_back(condition);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ public void analyzeImpl(Analyzer analyzer) throws AnalysisException {
Expr e2 = getChild(1);
// Here we cast match_element_xxx value type from string to array item type.
// Because be need to know the actual TExprNodeType when doing Expr Literal transform
if (isMatchElement(op) && e1.type.isArrayType() && (e2 instanceof StringLiteral)) {
if (isMatchElement(op) && e1.type.isArrayType()) {
Type itemType = ((ArrayType) e1.type).getItemType();
try {
setChild(1, e2.castTo(itemType));
Expand Down

0 comments on commit ad14174

Please sign in to comment.