Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
cs1317 authored Aug 9, 2023
2 parents 09a7650 + 1ab35cc commit 162faab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/expression/expression_to_stmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func (c ExprConverter) convertScalarFunction(dialect format.Dialect, expr *Scala
return &ast.FuncCallExpr{FnName: model.NewCIStr(dialect.GetSpecialFuncName(ast.Ifnull)), Args: children}, nil
case ast.If:
return &ast.FuncCallExpr{FnName: model.NewCIStr(ast.If), Args: children}, nil
case ast.Cos, ast.Abs, ast.Round:
case ast.Cos, ast.Abs,ast.Log10, ast.Round:
return &ast.FuncCallExpr{FnName: model.NewCIStr(expr.FuncName.L), Args: children}, nil
}
switch expr.Function.(type) {
Expand Down
4 changes: 4 additions & 0 deletions pkg/planner/core/testdata/runsql_in.json
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,10 @@
"sql": "select round(aggregate_float_0) as a from alice.tbl_1",
"skip_projection": false,
"rewritten_sql": "select round(tbl_1.aggregate_float_0) as a from alice.tbl_1"
},
{ "sql": "select log10(aggregate_float_0) as a from alice.tbl_1",
"skip_projection": false,
"rewritten_sql": "select log10(tbl_1.aggregate_float_0) as a from alice.tbl_1"
}
]
}
Expand Down

0 comments on commit 162faab

Please sign in to comment.