You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "jeff-99 (via GitHub)" <gi...@apache.org> on 2025/09/06 09:36:16 UTC
Re: [I] Feature-Demand : Add Option Clause [datafusion-sqlparser-rs]
jeff-99 commented on issue #1728:
URL: https://github.com/apache/datafusion-sqlparser-rs/issues/1728#issuecomment-3261699551
I have the same issue. For example when parsing the following query:
```
WITH DIM_DATE_TIME_BASE([DateTime])
AS
(
SELECT CAST( '2021-01-01 00:00:00' AS DATETIME2) AS [DateTime]
UNION ALL
SELECT DATEADD(SECOND, 1, [DateTime]) AS [DateTime]
FROM DIM_DATE_TIME_BASE
WHERE [DateTime] < '2021-01-01 23:59:59'
)
SELECT CAST([DateTime] AS TIME) AS [Time]
, DATEPART(HOUR, [DateTime]) AS [Hour]
, DATEPART(MINUTE, [DateTime]) AS [Minute]
, DATEPART(SECOND, [DateTime]) AS [Second]
, CAST(DATEPART(HOUR, [DateTime]) AS VARCHAR) + ':00' AS [Hour Time]
FROM DIM_DATE_TIME_BASE
OPTION (MAXRECURSION 0)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org