Adding upstream version 26.10.1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
412e82cbc6
commit
5b8e67f8b8
66 changed files with 79349 additions and 76628 deletions
|
@ -1,6 +1,6 @@
|
|||
import sys
|
||||
import datetime
|
||||
import math
|
||||
import sys
|
||||
import unittest
|
||||
|
||||
from sqlglot import ParseError, alias, exp, parse_one
|
||||
|
@ -277,6 +277,16 @@ class TestExpressions(unittest.TestCase):
|
|||
"SELECT * FROM (SELECT 1) AS a /* source: a-b.c */",
|
||||
)
|
||||
|
||||
def test_expand_with_lazy_source_provider(self):
|
||||
self.assertEqual(
|
||||
exp.expand(
|
||||
parse_one('select * from "a-b"."C" AS a'),
|
||||
{"`a-b`.c": lambda: parse_one("select 1", dialect="spark")},
|
||||
dialect="spark",
|
||||
).sql(),
|
||||
"SELECT * FROM (SELECT 1) AS a /* source: a-b.c */",
|
||||
)
|
||||
|
||||
def test_replace_placeholders(self):
|
||||
self.assertEqual(
|
||||
exp.replace_placeholders(
|
||||
|
@ -838,6 +848,7 @@ class TestExpressions(unittest.TestCase):
|
|||
|
||||
def test_convert(self):
|
||||
from collections import namedtuple
|
||||
|
||||
import pytz
|
||||
|
||||
PointTuple = namedtuple("Point", ["x", "y"])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue