Skip to content

Commit

Permalink
raise exception if subselect in join is not aliased
Browse files Browse the repository at this point in the history
  • Loading branch information
ea-rus committed Aug 10, 2023
1 parent ae16515 commit af998dc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mindsdb_sql/planner/query_planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,8 @@ def _check_condition(node, **kwargs):

# apply table alias
query2 = Select(targets=[Star()], where=where)
if item['table'].alias is None:
raise PlanningException(f'Subselect in join have to be aliased: {item["sub_select"].to_string()}')
table_name = item['table'].alias.parts[-1]

add_absent_cols = False
Expand Down

0 comments on commit af998dc

Please sign in to comment.