Skip to content

[SQL] Temporal filters are inhibited if NOW() is called by user-defined functions #5940

@mihaibudiu

Description

@mihaibudiu

The code generated for the following is substantially less efficient than the code that just inlines CRT_DATE.

CREATE FUNCTION CRT_DATE(T TIMESTAMP) RETURNS DATE AS CAST(T AS DATE);
CREATE TABLE T(D DATE, X INT);
CREATE VIEW V AS SELECT * FROM T WHERE T.D < CRT_DATE(NOW())

Metadata

Metadata

Assignees

Labels

SQL compilerRelated to the SQL compiler

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions