sqldelight / sqldelight/sql-psi
H2 YEAR function not supported
Open
Nobody has claimed this yet.
bug
- Dominant language
- Kotlin
- Stars
- 104
- Forks
- 35
- Avg merge
- 1h 11m
- Merged PRs (30d)
- 14
Description
Failing ANSI SQL
SELECT YEAR(PAYMENTARRIVETIME) AS YEAR, MONTH(PAYMENTARRIVETIME) AS MONTH, SUM(CAST(QUANTITY AS INT)) AS QUANTITY, SUM(CAST(YOURNETPROFIT AS DECIMAL(10,3))) AS YOURNETPROFIT FROM import
GROUP BY YEAR(PAYMENTARRIVETIME), MONTH(PAYMENTARRIVETIME)
ORDER BY YEAR(PAYMENTARRIVETIME), MONTH(PAYMENTARRIVETIME);
Description
The YEAR function is not recognized
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failing ANSI SQL query in the parser and trace how YEAR(PAYMENTARRIVETIME) is handled. Identify the relevant function recognition or parsing entry point, then verify that the query parses successfully while preserving the YEAR expression in GROUP BY and ORDER BY.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin, sql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100