仓库指标
- Star
- (19,563 star)
- PR 合并指标
- (平均合并 5天 16小时) (30 天内合并 138 个 PR)
描述
Describe the bug Time range does not work with AWS ES
To Reproduce Steps to reproduce the behavior:
- Create a valid cube schema connected to AWS ES 7.7
- Build a query with time range set to anything other than all time.
- Run the query
- See error
Expected behavior Generate SQL should use a date function compatible with AWS ES as documented https://opendistro.github.io/for-elasticsearch-docs/docs/sql/functions/
Currently it uses DATE_TRUNC which is not supported by open distro ES.
Screenshots
Error: "{\n \"error\": {\n \"reason\": \"Invalid SQL query\",\n \"details\": \"Failed to parse query due to offending symbol [:] at: 'SELECT\\n DATE_TRUNC('day', d_n_s_activity_red.timestamp:' <--- HERE... More details: Expecting tokens in {'SELECT', '('}\",\n \"type\": \"SyntaxAnalysisException\"\n },\n \"status\": 400\n}"
Version: v0.27.53 AWS ES 7.7