MCPcopy Index your code
hub / github.com/tobymao/sqlglot / test_udf

Method test_udf

tests/test_diff.py:67–86  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

65 )
66
67 def test_udf(self):
68 self._validate_delta_only(
69 diff_delta_only(
70 parse_one('SELECT a, b, "my.udf1"()'), parse_one('SELECT a, b, "my.udf2"()')
71 ),
72 [
73 Insert(expression=parse_one('"my.udf2"()')),
74 Remove(expression=parse_one('"my.udf1"()')),
75 ],
76 )
77 self._validate_delta_only(
78 diff_delta_only(
79 parse_one('SELECT a, b, "my.udf"(x, y, z)'),
80 parse_one('SELECT a, b, "my.udf"(x, y, w)'),
81 ),
82 [
83 Insert(expression=exp.column("w")),
84 Remove(expression=exp.column("z")),
85 ],
86 )
87
88 def test_node_position_changed(self):
89 expr_src = parse_one("SELECT a, b, c")

Callers

nothing calls this directly

Calls 5

_validate_delta_onlyMethod · 0.95
parse_oneFunction · 0.90
InsertClass · 0.90
RemoveClass · 0.90
diff_delta_onlyFunction · 0.85

Tested by

no test coverage detected