summaryrefslogtreecommitdiffstats
path: root/sqlglot/executor/python.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-12-12 15:42:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-12-12 15:42:38 +0000
commitbea2635be022e272ddac349f5e396ec901fc37e5 (patch)
tree24dbe11c9d462ff55f9b3af4b4da4cd1ae02e8a3 /sqlglot/executor/python.py
parentReleasing debian version 10.1.3-1. (diff)
downloadsqlglot-bea2635be022e272ddac349f5e396ec901fc37e5.tar.xz
sqlglot-bea2635be022e272ddac349f5e396ec901fc37e5.zip
Merging upstream version 10.2.6.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sqlglot/executor/python.py')
-rw-r--r--sqlglot/executor/python.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sqlglot/executor/python.py b/sqlglot/executor/python.py
index 908b80a..9f22c45 100644
--- a/sqlglot/executor/python.py
+++ b/sqlglot/executor/python.py
@@ -310,9 +310,9 @@ class PythonExecutor:
if i == length - 1:
context.set_range(start, end - 1)
add_row()
- elif step.limit > 0:
+ elif step.limit > 0 and not group_by:
context.set_range(0, 0)
- table.append(context.eval_tuple(group_by) + context.eval_tuple(aggregations))
+ table.append(context.eval_tuple(aggregations))
context = self.context({step.name: table, **{name: table for name in context.tables}})