1
0
Fork 0

Merging upstream version 25.5.1.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-13 21:41:14 +01:00
parent 298e7a8147
commit 029b9c2c73
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
136 changed files with 80990 additions and 72541 deletions

View file

@ -14,6 +14,8 @@ from sqlglot.errors import ExecuteError
from sqlglot.executor import execute
from sqlglot.executor.python import Python
from sqlglot.executor.table import Table, ensure_tables
from sqlglot.optimizer import optimize
from sqlglot.planner import Plan
from tests.helpers import (
FIXTURES_DIR,
SKIP_INTEGRATION,
@ -862,3 +864,18 @@ class TestExecutor(unittest.TestCase):
result = execute("SELECT x FROM t", dialect="duckdb", tables=tables)
self.assertEqual(result.columns, ("x",))
self.assertEqual(result.rows, [([1, 2, 3],)])
def test_agg_order(self):
plan = Plan(
optimize("""
SELECT
AVG(bill_length_mm) AS avg_bill_length,
AVG(bill_depth_mm) AS avg_bill_depth
FROM penguins
""")
)
assert [agg.alias for agg in plan.root.aggregations] == [
"avg_bill_length",
"avg_bill_depth",
]