opensearch-project / sql-odbc

OpenSearchODBC is a read-only ODBC driver for Windows and Mac for connecting to OpenSearch SQL support.
Apache License 2.0
7 stars 17 forks source link

[BUG] Tableau is incorrectly receiving non-null values as null from the ODBC driver #23

Open ghost opened 3 years ago

ghost commented 3 years ago

Describe the bug The TDVT smoke tests are failing due to all values of a query being null when the expected are not null. The issue has been isolated to the ODBC driver as a query to the OpenSearch sql plugin returns accurate non-null values.

To Reproduce Steps to reproduce the behavior using ODBCTest:

  1. Execute SELECT staples.Discount FROM staples GROUP BY 1
  2. SQLSetStmtAttr
    • Attribute SQL_ATTR_ROW_ARRAY_SIZE
    • ValuePtr: 100
  3. SQLBindCol
    • Column Number: 21
    • Target Type: SQL_C_Double
  4. SQL fetch
  5. Actual Result: SQLDescribeCol returned: SQL_ERROR=-1

Screenshots Actual results: image Expected results: image

Host/Environment (please complete the following information):

ghost commented 3 years ago

I'm looking into this issue.

chloe-zh commented 3 years ago

Hi @guiangumpac thanks for reporting this issue, I also tried to reproduce this issue in my local cluster but the symptom is different. Actually the query engine has not supported array type, instead it always pick the first value in the array. We need to support array type in the query engine to fix this issue.

kylepbit commented 3 years ago

@chloe-zh - I'm curious why the array type would be needed here, the reference to SQL_ATTR_ROW_ARRAY_SIZE above refers to the size of the fetch to be done in the ODBC driver, but to my knowledge there is no array type involved in terms of data types within the query?