mindsdb / mindsdb_sql

SQL parser and planner used by MindsDB
https://mindsdb.com
GNU General Public License v3.0
54 stars 20 forks source link

Support predict params in [select from join where] cases #285

Closed paxcema closed 9 months ago

paxcema commented 10 months ago

The USING parameters are failing to be included in the plan for queries like this one:

SELECT m.symbol, m.open_time, m.open_price, m.confidence, m.lower, m.upper
FROM binance_view as t
JOIN timegpt_binance as m
WHERE t.open_time > LATEST
USING
validate_token = True;

The expected behavior is to find validate_token = True in the prediction parameters field.

paxcema commented 10 months ago

Instructions for replicating can be found here, but do note you need to pass the api_key param at ML engine creation.

paxcema commented 10 months ago

FYI @tomhuds this is important for enabling predict-time dynamic arguments in TimeGPT's current design. Users can still define any parameter they wish at creation time, though.

We should clarify with Andrey how big a task this is (looked at the code base just now, and I suspect it is not trivial) before commiting to it.

It's probably best to tackle this via the new syntax anyway.

tomhuds commented 10 months ago

+1 for fixing alongside the new CREATE FORECASTING MODEL refactor

ea-rus commented 9 months ago

fixed in #293