Skip to content

Commit

Permalink
sql: add issue number to todo
Browse files Browse the repository at this point in the history
Epic: none
Informs: #101934

Release note: none
  • Loading branch information
rharding6373 committed Apr 20, 2023
1 parent d2e36ef commit 62b5bf9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pkg/sql/distsql_physical_planner.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ func (v *distSQLExprCheckVisitor) VisitPre(expr tree.Expr) (recurse bool, newExp
return false, expr
}
case *tree.RoutineExpr:
// TODO(86310): enable UDFs in DistSQL.
// TODO(#86310): enable UDFs in DistSQL.
v.err = newQueryNotSupportedErrorf("user-defined routine %s cannot be executed with distsql", t)
return false, expr
case *tree.DOid:
Expand Down
2 changes: 1 addition & 1 deletion pkg/sql/logictest/testdata/logic_test/udf
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ CREATE FUNCTION err(b BOOL) RETURNS INT LANGUAGE SQL AS 'SELECT b'
statement error return type mismatch in function declared to return bool\nDETAIL: Actual return type is int
CREATE FUNCTION err(i INT, j INT) RETURNS BOOL LANGUAGE SQL AS 'SELECT i - j'

# TODO(100962): Add support for default parameters.
# TODO(#100962): Add support for default parameters.
statement error pgcode 0A000 unimplemented: default value
CREATE FUNCTION err(i INT, j INT DEFAULT 2) RETURNS INT LANGUAGE SQL AS 'SELECT i - j'

Expand Down
4 changes: 2 additions & 2 deletions pkg/sql/logictest/testdata/logic_test/udf_record
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ SELECT f_one();
----
(1)

# TODO(97059): The following query should require a column definition list.
# TODO(#97059): The following query should require a column definition list.
statement ok
SELECT * FROM f_one();

# TODO(97059): The following query should produce a row, not a tuple.
# TODO(#97059): The following query should produce a row, not a tuple.
query T
SELECT * FROM f_one() AS foo (a INT);
----
Expand Down
6 changes: 3 additions & 3 deletions pkg/sql/logictest/testdata/logic_test/udf_star
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,11 @@ SELECT f_unqualified_twocol()
statement error pq: cannot alter type of column "b" because function "f_unqualified_twocol" depends on it
ALTER TABLE t_twocol ALTER b TYPE FLOAT;

# TODO(harding): Postgres allows column renaming when only referenced by UDFs.
# TODO(#101934): Postgres allows column renaming when only referenced by UDFs.
statement error pq: cannot rename column "a" because function "f_unqualified_twocol" depends on it
ALTER TABLE t_twocol RENAME COLUMN a TO d;

# TODO(harding): Postgres allows table renaming when only referenced by UDFs.
# TODO(#101934): Postgres allows table renaming when only referenced by UDFs.
statement error pq: cannot rename relation "t_twocol" because function "f_unqualified_twocol" depends on it
ALTER TABLE t_twocol RENAME TO t_twocol_prime;

Expand All @@ -208,7 +208,7 @@ statement error pq: cannot drop column "b" because function "f_unqualified_twoco
ALTER TABLE t_twocol DROP COLUMN b;

# Drop all but one of the functions with an implicit record return value.
# TODO(96368): Allow these UDFs to be dropped in the CASCADE when the cross-
# TODO(#96368): Allow these UDFs to be dropped in the CASCADE when the cross-
# references are fixed instead.
statement ok
DROP FUNCTION f_tuplestar;
Expand Down

0 comments on commit 62b5bf9

Please sign in to comment.