Daft
Daft copied to clipboard
* and '*' not handled correctly in SQL planner
Describe the bug
import daft
df = daft.from_pydict({
"person": [
{"name": "Alice", "age": 30},
{"name": "Bob", "age": 25},
{"name": "Charlie", "age": 35}
]
})
daft.sql("SELECT person.'*' FROM df").show()
# ╭───────┬─────────╮
# │ age ┆ name │
# │ --- ┆ --- │
# │ Int64 ┆ Utf8 │
# ╞═══════╪═════════╡
# │ 30 ┆ Alice │
# ├╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
# │ 25 ┆ Bob │
# ├╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
# │ 35 ┆ Charlie │
# ╰───────┴─────────╯
# (Showing first 3 of 3 rows)
This treats the string literal '*' as the special * token. At the same time,
daft.sql("SELECT person.* FROM df").show()
does not correctly handle the * special token and throws daft.exceptions.InvalidSQLException: Table not found: person 😅
Component(s)
SQL
Additional context
No response