Closed vinothchandar closed 3 years ago
Confirmed as still not working in 0.11:
ksql> SELECT RECORD_CT
> FROM MESSAGE_COUNT_BY_4HR
> WHERE WINDOWSTART > (UNIX_TIMESTAMP()-(1000 * 60 * 60 * 4))
> AND DUMMY_FIELD=1 ;
>
Window bounds must be an INT, BIGINT or STRING containing a datetime.. See https://cnfl.io/queries for more info.
Add EMIT CHANGES if you intended to issue a push query.
Pull queries require a WHERE clause that:
- limits the query to a single key, e.g. `SELECT * FROM X WHERE <key-column>=Y;`.
- (optionally) limits the time bounds of the windowed table.
Bounds on `WINDOWSTART` and `WINDOWEND` are supported
Supported operators are EQUAL, GREATER_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN and LESS_THAN_OR_EQUAL
It would be really useful to support this - usecase being "give me the values from the last four hours"
If we're not going to support this imminently then may I suggest an update to the error message, something like:
Only literal values are currently supported for pull query predicates.
This might have actually been fixed recently with the work we've done to support codegen in where clauses. cc @AlanConfluent can you confirm?
In theory we can support it now that we have codegen for the where clause. Unfortunately, we still make some assumptions about the structure of the clause, namely that if there's a comparison, one side of it is a column reference...
With table scans (or even an existing key reference), this assumption can be lifted. This requires a followup.
Would be great if we can implement this suggestion in the meantime, it'll have users a lot of time :)
If we're not going to support this imminently then may I suggest an update to the error message, something like:
Only literal values are currently supported for pull query predicates.
While fixed predicates work
Calculated predicate does n't
Thanks @rmoff for reporting this!