Can integer suffixes be used in the WHERE clause of InfluxQL?

Why does InfluxQL support parsing Integer and Unsigned Integer suffixes in the Select clause but not in the Where clause? For example, I have a query as follows:

select * from db0.autogen.t0 where 1i = 1i

This query throws an error: ERR: 400 Bad Request: failed to parse query: invalid duration.

Hello @KLW,
To filter by integers in the WHERE clause, you should not use the i suffix.

SELECT * FROM db0.autogen.t0 WHERE field = 1

InfluxDB interprets 1i as a duration. I think that’s because usually you would refer to a time range as like Where time < now() - 1h.

Does that help?

Your answer is very helpful, thank you very much.