Closed pg-venkat closed 1 year ago
@paddyjok This PR is ready for review, the changes you have requested are implemented.
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
2 Code Smells
No Coverage information
14.2% Duplication
All feedback comments are addressed. Evaluation is deferred until execution, generalized the expression type and removed sysVariable execution context store. This PR is ready for review.
This PR fixes defect FB-2065, failing select queries on views defined referencing built-in literals (CURRENT_DATE, CURRENT_TIMESTAMP) or string date literals('9999-12-12T00:00:00Z'), these failures are due to stored view definitions loosing references to the original tokens.
As suggested CURRENT_DATE, CURRENT_TIMESTAMP are no longer treated as date literals, they are treated as System Variables. This PR implements AST and Compiler elements needed to support SysVariables.
Also, in this PR a new variable store is added to statement execution context, so multiple references to same variable in a SQL statement will be evaluated with single value, this new single value evaluation will have a very noticeable effect on CURRENT_TIMESTAMP.