Skip to content

Commit

Permalink
pass more infor to api handler
Browse files Browse the repository at this point in the history
  • Loading branch information
ea-rus committed Feb 1, 2024
1 parent a25debf commit 3358152
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion mindsdb_sql/planner/query_planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,10 @@ def plan_api_db_select(self, query):
# keep only limit and where
# the rest goes to outer select
query2 = Select(
targets=[Star()],
targets=query.targets,
from_table=query.from_table,
where=query.where,
order_by=query.order_by,
limit=query.limit,
)
prev_step = self.plan_integration_select(query2)
Expand Down
6 changes: 3 additions & 3 deletions tests/test_planner/test_integration_select.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ def test_select_from_table_subselect_api_integration(self):
steps=[
FetchDataframeStep(
integration='int1',
query=parse_sql('select * from tab1'),
query=parse_sql('select tab1.`id` AS `id` from tab1'),
),
SubSelectStep(
dataframe=Result(0),
Expand All @@ -534,7 +534,7 @@ def test_select_from_table_subselect_api_integration(self):
FetchDataframeStep(
integration='int1',
query=Select(
targets=[Star()],
targets=[Identifier('tab2.x', alias=Identifier('x'))],
from_table=Identifier('tab2'),
where=BinaryOperation(
op='in',
Expand Down Expand Up @@ -597,7 +597,7 @@ def test_delete_from_table_subselect_api_integration(self):
steps=[
FetchDataframeStep(
integration='int1',
query=parse_sql('select * from tab1'),
query=parse_sql('select tab1.`id` AS `id` from tab1'),
),
SubSelectStep(
dataframe=Result(0),
Expand Down

0 comments on commit 3358152

Please sign in to comment.