Skip to content

Commit

Permalink
add some notes
Browse files Browse the repository at this point in the history
  • Loading branch information
amorynan committed Dec 19, 2023
1 parent 06d1748 commit 8949ca6
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1618,6 +1618,11 @@ && collectChildReturnTypes()[0].isDecimalV3()) {
// now first find table function in table function sets
if (isTableFnCall) {
Type[] childTypes = collectChildReturnTypes();
// when we call explode<Array<Decimal>> with nested decimal has specific precision and scale,
// collectChildReturnTypes will return specific precision and scale decimal type witch may not match
// builtln func we defined in fe code, because we make array_support_type is actual origin type.here we
// temp write this if to get matched explode function and then set actually decimal type from sql to
// func return type. if we switch nereid would hasn't this problems.
if (fnName.getFunction().equalsIgnoreCase("explode") && childTypes[0].isArrayType()) {
// get origin type to match builtln func
Type[] matchFuncChildTypes = getActualArgTypes(childTypes);
Expand Down

0 comments on commit 8949ca6

Please sign in to comment.