Open timgraham opened 2 years ago
A queryset like:
Experiment.objects.filter(start=F('start') + F('estimated_time')
where estimated_time is a DurationField, generates SQL:
estimated_time
DurationField
WHERE "experiment"."start" = ("experiment"."start" + INTERVAL '"expressions_ExPeRiMeNt"."estimated_time" MICROSECONDS')
but INTERVAL doesn't support column names. (SQL compilation error: syntax error line 1 at position 0 unexpected '"experiment"'.)
INTERVAL
SQL compilation error: syntax error line 1 at position 0 unexpected '"experiment"'.
Perhaps Snowflake could add support for this. For example, MySQL allows:
INTERVAL `experiment`.`estimated_time` MICROSECOND
A queryset like:
where
estimated_time
is aDurationField
, generates SQL:but
INTERVAL
doesn't support column names. (SQL compilation error: syntax error line 1 at position 0 unexpected '"experiment"'.
)Perhaps Snowflake could add support for this. For example, MySQL allows: