Skip to content

Commit d8e13ae

Browse files
authored
feat(optimizer)!: Annotate COS for DuckDB (#6893)
1 parent 9d2a12a commit d8e13ae

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

sqlglot/typing/duckdb.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
**{
1515
expr_type: {"returns": exp.DataType.Type.DOUBLE}
1616
for expr_type in {
17+
exp.Cos,
1718
exp.Sin,
1819
}
1920
},

tests/fixtures/optimizer/annotate_functions.sql

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5598,4 +5598,12 @@ DOUBLE;
55985598

55995599
# dialect: duckdb
56005600
SIN(tbl.double_col);
5601+
DOUBLE;
5602+
5603+
# dialect: duckdb
5604+
COS(tbl.int_col);
5605+
DOUBLE;
5606+
5607+
# dialect: duckdb
5608+
COS(tbl.double_col);
56015609
DOUBLE;

0 commit comments

Comments
 (0)