Support pandas/datetime Timedelta/DateOffset as literals converted to SQL intervals #207
Labels
effort - medium
mid-sized issue with average implementation time/difficulty
enhancement
New feature or request
extensibility
Increasing situations in which PyDough works
user feature
Adding a new user-facing feature/functionality
The goal of the issue is to add the following support for PyDough literals:
datetime.timedelta
can be passed in, and is threaded throughout the pipeline until SQLGlot conversion where it becomes an equivalentINTERVAL
syntax.pandas.Timedelta
andpandas.DateOffset
with all standard ANSI units: YEAR, MONTH, DAY, HOUR, MINUTE, SECOND (no subsecond, for now, and expand quarters/weeks into months/days).DATE
function, or just directly adding/subtracting to date/datetime arguments.Will need to add a new PyDough type for intervals/deltas. The generation of SQLGlot code will need to be quite different for SQLite, which means full type inference is required to realize when the addition/subtraction of such an interval is happening so it can be converted to an equivalent
DATE
expression, and so using an interval in any other manner is unsupported. This means that type inference support (#194) and theDATE
-esque functionality (#208) are required prerequisites.The text was updated successfully, but these errors were encountered: