Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Dashboard filters issue with Quicksight #1900

Open
rupal-bq opened this issue Jul 11, 2023 · 10 comments
Open

[BUG] Dashboard filters issue with Quicksight #1900

rupal-bq opened this issue Jul 11, 2023 · 10 comments
Labels
bug Something isn't working

Comments

@rupal-bq
Copy link
Contributor

rupal-bq commented Jul 11, 2023

What is the bug?
While adding filters (as controls or otherwise), it gives an SQL exception/fails to populate any option in the dropdown, for both single-option and multi-option dropdown.

While selecting the filter as a raw text field, it accepts single as well multiple values, and works as expected.

@rupal-bq rupal-bq added bug Something isn't working untriaged and removed untriaged labels Jul 11, 2023
@Yury-Fridlyand
Copy link
Collaborator

@rupal-bq, is it a JDBC driver issue or Dashboards issue?

@rupal-bq
Copy link
Contributor Author

@rupal-bq, is it a JDBC driver issue or Dashboards issue?

Seems to be a JDBC driver issue. While applying filters, getting below error.

image

@Yury-Fridlyand
Copy link
Collaborator

I don't have access to Quicksight now. Can you reproduce that issue? Can you send me anonymized query please (SQL plugin prints it into logs)? What is the data mapping?

@rupal-bq
Copy link
Contributor Author

SQL query:

SELECT item_type AS abc123
FROM tmp_index
GROUP BY item_type
ORDER BY abc123 IS NOT NULL, abc123
LIMIT 10001

mapping:

{
  “tmp_index": {
    "mappings": {
      "properties": {
        “item”: {
          "type": "keyword"
        },
        "time": {
          "type": "date"
        },
        “item_type": {
          "type": "keyword"
        }
      }
    }
  }
}

@MaxKsyunz
Copy link
Collaborator

Thank you @rupal-bq!

What versions of OpenSearch and JDBC driver is this using?

@Yury-Fridlyand
Copy link
Collaborator

Yury-Fridlyand commented Jul 20, 2023

Probably it is V2 parser issue:

opensearchsql> select city as abc from bank group by city order by abc is not null, abc limit 100;
{'reason': 'Invalid SQL query', 'details': "can't resolve Symbol(namespace=FIELD_NAME, name=abc) in type env", 'type': 'SemanticCheckException'}
opensearchsql> select city as abc from bank group by city order by city is not null, abc limit 100;
fetched rows / total rows = 7/7
...

I see alias is not supported in expression in ORDER BY clause; meanwhile it is supported in ORDER BY without expression. UPD GROUP BY is also affected.

@rupal-bq, please, confirm that the query is correct. I want to ensure that we found the right bug.

@rupal-bq
Copy link
Contributor Author

Probably it is V2 parser issue:

opensearchsql> select city as abc from bank group by city order by abc is not null, abc limit 100;
{'reason': 'Invalid SQL query', 'details': "can't resolve Symbol(namespace=FIELD_NAME, name=abc) in type env", 'type': 'SemanticCheckException'}
opensearchsql> select city as abc from bank group by city order by city is not null, abc limit 100;
fetched rows / total rows = 7/7
...

I see alias is not supported in expression in ORDER BY clause; meanwhile it is supported in ORDER BY without expression. UPD GROUP BY is also affected.

@rupal-bq, please, confirm that the query is correct. I want to ensure that we found the right bug.

Hi @Yury-Fridlyand, the query is correct. Didn't find much information in quicksight logs, it only had generic sql exception.

@Yury-Fridlyand Yury-Fridlyand transferred this issue from opensearch-project/sql-jdbc Jul 25, 2023
@acarbonetto
Copy link
Collaborator

@rupal-bq
Copy link
Contributor Author

rupal-bq commented Aug 1, 2023

Thank you @rupal-bq!

What versions of OpenSearch and JDBC driver is this using?

OpenSearch version is 2.5 but not sure what JDBC version (using Quicksight connector)

@gamebusterz
Copy link

Hi @rupal-bq , is there any progress on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants