Skip to content

Commit

Permalink
Merge pull request #340 from mindsdb/staging
Browse files Browse the repository at this point in the history
Release 0.10.1
  • Loading branch information
ea-rus authored Jan 17, 2024
2 parents a4ef4bc + c49e59e commit 3b3c64f
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mindsdb_sql/__about__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
__title__ = 'mindsdb_sql'
__package_name__ = 'mindsdb_sql'
__version__ = '0.10.0'
__version__ = '0.10.1'
__description__ = "Pure python SQL parser"
__email__ = "[email protected]"
__author__ = 'MindsDB Inc'
Expand Down
2 changes: 1 addition & 1 deletion mindsdb_sql/parser/ast/select/parameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ def to_tree(self, *args, level=0, **kwargs):
return '\t' * level + f'Parameter({repr(self.value)})'

def get_string(self, *args, **kwargs):
return str(self.value)
return ':' + str(self.value)
1 change: 1 addition & 0 deletions mindsdb_sql/planner/plan_join.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ def process_table(self, item, query_in):
for col in query_in.order_by:
if self.get_table_for_column(col.field).table != item.table:
order_by = False
break
col = copy.deepcopy(col)
col.field.parts = [col.field.parts[-1]]
order_by.append(col)
Expand Down
2 changes: 2 additions & 0 deletions mindsdb_sql/planner/query_planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,8 @@ def plan_union(self, query):

# method for compatibility
def from_query(self, query=None):
self.plan = QueryPlan()

if query is None:
query = self.query

Expand Down
2 changes: 1 addition & 1 deletion mindsdb_sql/planner/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def query_traversal(node, callback, is_table=False, is_target=False, parent_quer
for node2 in node.order_by:
node_out = query_traversal(node2, callback, parent_query=parent_query) or node2
array.append(node_out)
node.partition = array
node.order_by = array

elif isinstance(node, ast.TypeCast):
node_out = query_traversal(node.arg, callback, parent_query=parent_query)
Expand Down

0 comments on commit 3b3c64f

Please sign in to comment.