PostBOUND 0.23.2__tar.gz → 0.23.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {postbound-0.23.2 → postbound-0.23.3}/PKG-INFO +1 -1
- {postbound-0.23.2 → postbound-0.23.3}/PostBOUND.egg-info/PKG-INFO +1 -1
- {postbound-0.23.2 → postbound-0.23.3}/postbound/_hints.py +14 -3
- {postbound-0.23.2 → postbound-0.23.3}/postbound/qal/_qal.py +2 -2
- {postbound-0.23.2 → postbound-0.23.3}/pyproject.toml +1 -1
- {postbound-0.23.2 → postbound-0.23.3}/LICENSE.txt +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/PostBOUND.egg-info/SOURCES.txt +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/PostBOUND.egg-info/dependency_links.txt +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/PostBOUND.egg-info/requires.txt +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/PostBOUND.egg-info/top_level.txt +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/README.md +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/__init__.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/__init__.pyi +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/_base.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/_core.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/_ipython.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/_pipelines.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/_qep.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/_stages.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/bench.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/db/__init__.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/db/_cache.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/db/_db.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/db/_stats.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/duckdb/__init__.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/duckdb/_duckdb.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/opt/__init__.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/opt/__init__.pyi +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/opt/_cardinalities.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/opt/_dynprog.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/opt/_enumeration.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/opt/_helpers.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/opt/_native.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/opt/_randomized.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/parser.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/postgres/__init__.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/postgres/_config.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/postgres/_ctl.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/postgres/_explain.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/postgres/_pg.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/qal/__init__.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/qal/_formatter.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/relalg.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/train/__init__.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/train/_train.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/transform.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/util/__init__.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/util/__init__.pyi +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/util/_df.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/util/_errors.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/util/collections.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/util/dicts.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/util/jsonize.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/util/logging.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/util/misc.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/util/num.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/util/nx.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/util/proc.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/util/stats.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/util/system.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/util/typing.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/validation.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/vis/__init__.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/vis/__init__.pyi +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/vis/fdl.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/vis/graphs.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/vis/optimizer.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/vis/plots.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/vis/trees.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/postbound/workloads.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/setup.cfg +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/tests/test_benchmarking.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/tests/test_core.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/tests/test_docs.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/tests/test_duckdb.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/tests/test_postgres.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/tests/test_qal.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/tests/test_relalg.py +0 -0
- {postbound-0.23.2 → postbound-0.23.3}/tests/test_util.py +0 -0
|
@@ -684,8 +684,12 @@ class PlanParameterization:
|
|
|
684
684
|
PlanParameterization
|
|
685
685
|
The parameters are updated in place and returned for chaining.
|
|
686
686
|
"""
|
|
687
|
+
tables = frozenset(tables)
|
|
688
|
+
if not tables:
|
|
689
|
+
raise ValueError("Cannot assign cardinality to an empty set of tables")
|
|
690
|
+
|
|
687
691
|
cardinality = Cardinality.of(cardinality)
|
|
688
|
-
self.cardinalities[
|
|
692
|
+
self.cardinalities[tables] = cardinality
|
|
689
693
|
return self
|
|
690
694
|
|
|
691
695
|
def set_workers(self, tables: Iterable[TableReference], num_workers: int) -> Self:
|
|
@@ -1694,6 +1698,13 @@ def parameters_from_plan(
|
|
|
1694
1698
|
`fallback_estimated` is set.
|
|
1695
1699
|
"""
|
|
1696
1700
|
params = PlanParameterization()
|
|
1701
|
+
tables = query_plan.tables()
|
|
1702
|
+
if not tables:
|
|
1703
|
+
# There are no more base tables left in the plan. No point to traverse further.
|
|
1704
|
+
# Note that this situation is completely legit: For example, consider Postgres Bitmap Scans:
|
|
1705
|
+
# The heap scan contains the actual table while its children (the index lookups) only reference
|
|
1706
|
+
# the indexes. Once we recurse from the heap scan into the index lookups, no base tables are left.
|
|
1707
|
+
return params
|
|
1697
1708
|
|
|
1698
1709
|
if isinstance(query_plan, JoinTree):
|
|
1699
1710
|
card = query_plan.annotation
|
|
@@ -1712,9 +1723,9 @@ def parameters_from_plan(
|
|
|
1712
1723
|
parallel_workers = query_plan.params.parallel_workers
|
|
1713
1724
|
|
|
1714
1725
|
if card is not None and not math.isnan(card):
|
|
1715
|
-
params.add_cardinality(
|
|
1726
|
+
params.add_cardinality(tables, card)
|
|
1716
1727
|
if parallel_workers:
|
|
1717
|
-
params.set_workers(
|
|
1728
|
+
params.set_workers(tables, parallel_workers)
|
|
1718
1729
|
|
|
1719
1730
|
for child in query_plan.children:
|
|
1720
1731
|
child_params = parameters_from_plan(
|
|
@@ -4024,7 +4024,7 @@ def _attempt_filter_unwrap(
|
|
|
4024
4024
|
assert isinstance(lhs, ColumnReference)
|
|
4025
4025
|
return lhs, BinaryOperator.Between, (lower, upper)
|
|
4026
4026
|
|
|
4027
|
-
case InPredicate(lhs, values):
|
|
4027
|
+
case InPredicate(lhs, values, op):
|
|
4028
4028
|
status, lhs = _unwrap_expression(lhs)
|
|
4029
4029
|
if not status:
|
|
4030
4030
|
return None
|
|
@@ -4037,7 +4037,7 @@ def _attempt_filter_unwrap(
|
|
|
4037
4037
|
unwrapped_vals.append(unwrapped)
|
|
4038
4038
|
|
|
4039
4039
|
assert isinstance(lhs, ColumnReference)
|
|
4040
|
-
return lhs,
|
|
4040
|
+
return lhs, op, tuple(unwrapped_vals)
|
|
4041
4041
|
|
|
4042
4042
|
case UnaryPredicate(col, op) if predicate.is_null_test() or predicate.is_bool_test():
|
|
4043
4043
|
status, col = _unwrap_expression(col)
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "PostBOUND"
|
|
7
|
-
version = "0.23.
|
|
7
|
+
version = "0.23.3"
|
|
8
8
|
authors = [{ name = "Rico Bergmann", email = "rico.bergmann1@tu-dresden.de" }]
|
|
9
9
|
description = "PostBOUND is a research framework to prototype and benchmark database query optimizers"
|
|
10
10
|
readme = "README.md"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|