Skip to content

Commit

Permalink
[minor](refactor) refine function logics (apache#22280)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel39 authored Jul 27, 2023
1 parent aa75f79 commit e78afed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -459,13 +459,8 @@ public static boolean isCastMatchAllowed(Function desc, Function candicate) {
if (ConnectContext.get() != null
&& ConnectContext.get().getSessionVariable().roundPreciseDecimalV2Value
&& FunctionCallExpr.ROUND_FUNCTION_SET.contains(desc.functionName())
&& descArgType.isDecimalV2() && candicateArgType.getPrimitiveType() != PrimitiveType.DECIMAL128) {
return false;
} else if (ConnectContext.get() != null
&& ConnectContext.get().getSessionVariable().roundPreciseDecimalV2Value
&& FunctionCallExpr.ROUND_FUNCTION_SET.contains(desc.functionName())
&& descArgType.isDecimalV2() && candicateArgType.getPrimitiveType() == PrimitiveType.DECIMAL128) {
return true;
&& descArgType.isDecimalV2()) {
return candicateArgType.getPrimitiveType() == PrimitiveType.DECIMAL128;
}
if ((descArgType.isDecimalV3() && candicateArgType.isDecimalV2())
|| (descArgType.isDecimalV2() && candicateArgType.isDecimalV3())) {
Expand Down
2 changes: 1 addition & 1 deletion tools/tpch-tools/conf/doris-cluster.conf
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ export USER='root'
# Doris password
export PASSWORD=''
# The database where TPC-H tables located
export DB='tpch1G'
export DB='tpch'

0 comments on commit e78afed

Please sign in to comment.