Skip to content

Commit 72eef74

Browse files
authored
Merge pull request #69 from mabel-dev/0.5.6
0.5.12
2 parents 92d43d2 + 5f362e0 commit 72eef74

File tree

5 files changed

+29
-7
lines changed

5 files changed

+29
-7
lines changed

dev/build_counter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class VersionStatus(Enum):
2929

3030
__major_version__ = 0
3131
__minor_version__ = 5
32-
__revision_version__ = 11
32+
__revision_version__ = 12
3333
__author__ = "@joocer"
3434
__status__ = VersionStatus.RELEASE
3535

opteryx/__init__.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ def is_mac() -> bool: # pragma: no cover
9494
"Connection",
9595
"query",
9696
"query_to_arrow",
97+
"plan",
9798
"register_workspace",
9899
"set_default_connector",
99100
"__author__",
@@ -272,6 +273,29 @@ def analyze_query(sql: str) -> Dict[str, Any]:
272273
return _parse_query_info(sql)
273274

274275

276+
def plan(
277+
operation: str,
278+
params: Optional[Iterable] = None,
279+
visibility_filters: Optional[Dict[str, Any]] = None,
280+
**kwargs,
281+
) -> dict:
282+
"""
283+
Produce a planner-only representation of the given SQL without executing it.
284+
285+
This convenience wrapper creates a temporary `Connection` and `Cursor`, calls
286+
`Cursor.plan(...)`, then closes the cursor and connection.
287+
"""
288+
from opteryx.connection import Connection
289+
290+
conn = Connection(**kwargs)
291+
cur = conn.cursor()
292+
cur._owns_connection = True
293+
try:
294+
return cur.plan(operation=operation, params=params, visibility_filters=visibility_filters)
295+
finally:
296+
cur.close()
297+
298+
275299
# Enable all warnings, including DeprecationWarning
276300
warnings.simplefilter("once", DeprecationWarning)
277301

opteryx/__version__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# THIS FILE IS AUTOMATICALLY UPDATED DURING THE BUILD PROCESS
22
# DO NOT EDIT THIS FILE DIRECTLY
33

4-
__build__ = 142
4+
__build__ = 143
55
__author__ = "@joocer"
6-
__version__ = "0.5.11"
6+
__version__ = "0.5.12"
77
__lib__ = "opteryx-core"
8-
__build_date__ = "2026-01-04T19:23:09.463740+00:00Z"
8+
__build_date__ = "2026-01-04T19:54:33.432905+00:00Z"
99

1010
# Store the version here so:
1111
# 1) we don't load dependencies by storing it in __init__.py

opteryx/models/manifest.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,10 @@ def prune_files(self, predicates: List) -> List[FileEntry]:
110110
pruned_files = []
111111

112112
for file_entry in self.files:
113-
print("Evaluating file:", file_entry.file_path)
114113
skip_file = False
115114

116115
# Check each predicate
117116
for predicate in predicates:
118-
print(" Predicate:", predicate.left.value, predicate.value, predicate.right.value)
119117
# Handle simple comparisons: column op literal
120118
if (
121119
predicate.node_type == NodeType.COMPARISON_OPERATOR

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "opteryx_core"
3-
version = "0.5.11"
3+
version = "0.5.12"
44
description = "Opteryx Query Engine"
55
requires-python = '>=3.13'
66
readme = {file = "README.md", content-type = "text/markdown"}

0 commit comments

Comments
 (0)