currently daft allows implicit coercions for various ops eq, neq, .... A lot of these implicit rules are not well documented, and depending on the application, they may be undesired.
I would like a strict mode that disables all implicit type coercions.
Describe the solution you'd like
py
import daft
from daft import col
df = daft.from_pydict({
'i64': [1, 2, 3, 4, 5],
})
df = df.select(col('i64').cast(daft.DataType.int64()))
df.where(col('i64') > daft.lit(2).cast(daft.DataType.float64())).collect() # works
# set `allow_implicit_coercion = False`
df.where(col('i64') > daft.lit(2).cast(daft.DataType.float64())) # fails
df.where(col('i64') > daft.lit(2).cast(daft.DataType.int64())) # works
sql
SET allow_implicit_coercion = false;
select * from tbl where date_col == '2020-01-01' -- fails
select * from tbl where date_col == cast('2020-01-01' as date) -- works
SET allow_implicit_coercion = true;
select * from tbl where date_col == '2020-01-01' -- works
Is your feature request related to a problem?
currently daft allows implicit coercions for various ops
eq, neq, ...
. A lot of these implicit rules are not well documented, and depending on the application, they may be undesired.I would like a
strict
mode that disables all implicit type coercions.Describe the solution you'd like
py
sql
Describe alternatives you've considered
No response
Additional Context
No response
Would you like to implement a fix?
No