Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Support for extra functions required by BI tools #224

Closed
rupal-bq opened this issue Oct 18, 2019 · 5 comments
Closed

Support for extra functions required by BI tools #224

rupal-bq opened this issue Oct 18, 2019 · 5 comments
Assignees
Labels
BI integration Issues for integration with BI tools enhancement New feature or request

Comments

@rupal-bq
Copy link
Contributor

rupal-bq commented Oct 18, 2019

Using Docker image amazon/opendistro-for-elasticsearch:1.1.0
Dataset: Flights sample data (loaded through Kibana)
SQL Plugin version: 1.1.0.1
Tableau version: 2019.3

Tableau generated SQL (MySQL dialect): SELECT POWER(`kibana_sample_data_flights`.`dayOfWeek`, 2) AS `sum_Calculation_160722252357632000_ok`\nFROM `kibana_sample_data_flights`\nGROUP BY 1.1000000000000001

Generated SQL without quotes (#212) and Group By (#215): SELECT power(dayOfWeek, 2) AS sum_Calculation_160722252357632000_ok FROM kibana_sample_data_flights

Result: No data

{[\n]"
  "error": {[\n]"
    "reason": "There was internal problem at backend",[\n]"
    "details": "The following method is not supported in Schema: power",[\n]"
    "type": "UnsupportedOperationException"[\n]"
  },[\n]"
  "status": 500[\n]"
}

Expected Behaviour: Should return square of all values present in column dayOfWeek.

List of functions which have similar issue:
Number functions

  • ATAN2
  • COT
  • SIGN
  • POWER

String functions

  • ASCII
  • RTRIM
  • LTRIM
  • LOCATE
  • LENGTH
  • REPLACE
  • LEFT
  • RIGHT

Logical functions

  • IFNULL
  • ISNULL
@dai-chen dai-chen added BI integration Issues for integration with BI tools enhancement New feature or request labels Oct 18, 2019
@dai-chen
Copy link
Member

I think this is the limitation in our JDBC formatter. Currently the formatter doesn't recognize many SQL function and map it to correct result type in JDBC spec.

@dai-chen
Copy link
Member

For these functions, first we need to change grammar to pass both new and old SQL parser. Then based on their behaviors in standard SQL or MySQL, we need to figure out what's the right DSL to generate.

@dai-chen
Copy link
Member

Another function list that we need to support: #235.

@chloe-zh
Copy link
Member

@dai-chen I will do #235 along with this issue.

@chloe-zh
Copy link
Member

chloe-zh commented Oct 24, 2019

PRs will be separated and submitted respectively according to the function/operator type.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
BI integration Issues for integration with BI tools enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants