simpleSqlParser icon indicating copy to clipboard operation
simpleSqlParser copied to clipboard

Using simpleSqlParser for the following SELECT statement

Open jhiemer opened this issue 9 years ago • 1 comments

Hi, I am currently trying to use the following statement for a influx DB query which fails because of different aspects

SELECT derivate(mean(value)) AS value FROM "this.is.a.crazy.table" WHERE time() > now - 10m AND host = "blabla" AND ip = "192.168.1.1" GROUP BY time(10s) LIMIT 5
  1. It seems that V2 of the parser does not like quoted table names "this.is.a.crazy.table"
  2. Where does not like the function time() > now - 10m
  3. The Group statement is also not parsed correctly with time(10s)

Are those things which maybe changed easily?

jhiemer avatar Dec 28 '15 07:12 jhiemer

Hi,

I tried to fix these issues here: https://github.com/dsferruzza/simpleSqlParser/tree/fix-influxdb (diff) Can you have a look at this branch and tell me if this looks good to you?

dsferruzza avatar Dec 29 '15 00:12 dsferruzza