Merging upstream version 26.19.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
58527c3d26
commit
a99682f526
98 changed files with 67345 additions and 65319 deletions
|
@ -1,7 +1,7 @@
|
|||
from sqlglot import exp, parse, parse_one
|
||||
from tests.dialects.test_dialect import Validator
|
||||
from sqlglot.errors import ParseError, UnsupportedError
|
||||
from sqlglot.optimizer.annotate_types import annotate_types
|
||||
from tests.dialects.test_dialect import Validator
|
||||
|
||||
|
||||
class TestTSQL(Validator):
|
||||
|
@ -962,7 +962,8 @@ FROM (
|
|||
ProductID
|
||||
) AS src(ProductID, OrderQty)
|
||||
ON pi.ProductID = src.ProductID
|
||||
WHEN MATCHED AND pi.Quantity - src.OrderQty >= 0 THEN UPDATE SET pi.Quantity = pi.Quantity - src.OrderQty
|
||||
WHEN MATCHED AND pi.Quantity - src.OrderQty >= 0 THEN UPDATE SET
|
||||
pi.Quantity = pi.Quantity - src.OrderQty
|
||||
WHEN MATCHED AND pi.Quantity - src.OrderQty <= 0 THEN DELETE
|
||||
OUTPUT $action, Inserted.ProductID, Inserted.LocationID, Inserted.Quantity AS NewQty, Deleted.Quantity AS PreviousQty
|
||||
) AS Changes(Action, ProductID, LocationID, NewQty, PreviousQty)
|
||||
|
@ -2242,3 +2243,8 @@ FROM OPENJSON(@json) WITH (
|
|||
"tsql": "SELECT DATETRUNC(YEAR, CAST('foo1' AS DATE))",
|
||||
},
|
||||
)
|
||||
|
||||
def test_collation_parse(self):
|
||||
self.validate_identity("ALTER TABLE a ALTER COLUMN b CHAR(10) COLLATE abc").assert_is(
|
||||
exp.Alter
|
||||
).args.get("actions")[0].args.get("collate").this.assert_is(exp.Var)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue