dask-sql
dask-sql copied to clipboard
Add parser support for `timestampadd`
DataFusion's parser cannot parse timestampadd(year, 2, d) because year is not a keyword, so it assumes that this is an identifier and looks for a column with this name.
This PR works around the issue by providing a custom prefix parser in the DaskSqlDialect where we can override parsing of just this expression and then fall back to DataFusion. This is a new feature that was added to sqlparser relatively recently.