Skip to content

Commit

Permalink
Fix for SQL value functions when there is an alias specified
Browse files Browse the repository at this point in the history
  • Loading branch information
Mytherin committed Feb 13, 2024
1 parent 4d24f5c commit e286630
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ BindResult ExpressionBinder::BindExpression(ColumnRefExpression &col_ref_p, idx_
if (!expr) {
if (!col_ref_p.IsQualified()) {
// column was not found - check if it is a SQL value function
auto value_function = GetSQLValueFunction(col_ref_p.GetName());
auto value_function = GetSQLValueFunction(col_ref_p.GetColumnName());
if (value_function) {
return BindExpression(value_function, depth);
}
Expand Down
6 changes: 6 additions & 0 deletions test/sql/function/timestamp/current_time.test
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,9 @@ SELECT typeof(${func}());
TIMESTAMP WITH TIME ZONE

endloop

statement ok
SELECT CURRENT_TIME AS TIME

statement ok
SELECT CURRENT_TIME + interval (1) second AS TIME

0 comments on commit e286630

Please sign in to comment.