Canner / wren-engine

🤖 The semantic engine for LLMs, bringing semantic context to AI agents. 🔥
https://getwren.ai/oss
Apache License 2.0
118 stars 30 forks source link

The calculated field won't be selected when query using wildcards #711

Open goldmedal opened 2 months ago

goldmedal commented 2 months ago

Description

In the wren core rust version, we show all the physical columns when selecting a model with the wildcard expr. However, in the spec of Wren engine, the calculated field shouldn't be selected when using the wildcard expr. Because the calculated field will generate some join plans for a model, we want to make sure it only be used when the user selects it specifically.

Given a model A with 3 columns, c1, c2 and cf3. If cf3 is calculated. The select all SQL should only get c1 and c2.

SELECT * FROM A    -> SELECT c1, c2 FROM A

If the user want to use cf3, they should select this column specifically.

SELECT c1, c2, cf3 FROM A
goldmedal commented 2 months ago

I filed an issue https://github.com/apache/datafusion/issues/11639. I will try to implement it.