Repository navigation
Type conversion - #14
7 commits merged into
Conversation
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
|
|
||
| case SQL_CONVERT_INTEGER: /* ODBC 1.0 */ | ||
| len = sizeof(SQLUINTEGER); | ||
| value = SQL_CVT_BIT | SQL_CVT_WVARCHAR | SQL_CVT_DOUBLE | SQL_CVT_BIGINT | SQL_CVT_REAL; |
There was a problem hiding this comment.
I think you're also missing the ability to convert to the same type, ex integer -> integer, and so on?
There was a problem hiding this comment.
Also ,should what about SQL_CVT_VARCHAR in addition to SQL_CVT_WVARCHAR?
There was a problem hiding this comment.
Should SQL_CVT_SMALLINT or SQL_CVT_TINYINT also be here? (I'm assuming those are valid constants, it's possible they are not).
There was a problem hiding this comment.
I will add conversion for the same types.
SQLGetTypeInfo does not include the value for type SQL_CVT_VARCHAR so I assume it is not supported.
There was a problem hiding this comment.
SMALLINT and TINYINT are byte and short for OpenSearch and casting to byte, short, SMALLINT, and TINYINT do not work.
There was a problem hiding this comment.
There was a problem hiding this comment.
Note that my comment around SMALLINT and TINYINT are for all conversions, are they unsupported for all?
Yury-Fridlyand
left a comment
There was a problem hiding this comment.
I thinks you need to split changed into two different branches. One branch should contain changes in the driver only and the second one - changes in PBI connector.
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
| TEST_SQL_GET_INFO_UINT_MASK(SQLConvertDecimal, SQL_CONVERT_DECIMAL, 0); | ||
| TEST_SQL_GET_INFO_UINT_MASK(SQLConvertDouble, SQL_CONVERT_DOUBLE, 0); | ||
| // 8409288 = 0x008050C8 = SQL_CVT_INTEGER | SQL_CVT_REAL | SQL_CVT_DOUBLE | SQL_CVT_BIT | SQL_CVT_BIGINT | SQL_CVT_WVARCHAR | ||
| TEST_SQL_GET_INFO_UINT_MASK(SQLConvertDouble, SQL_CONVERT_DOUBLE, 8409288); |
There was a problem hiding this comment.
Instead of documenting this via a comment, you can simply put the bitmask into the value.
Signed-off-by: Guian Gumpac <[email protected]>
…arch-project#1971) * Spotless apply on protocol Signed-off-by: Mitchell Gale <[email protected]> * added ignorefailures Signed-off-by: Mitchell Gale <[email protected]> * Update protocol/src/main/java/org/opensearch/sql/protocol/response/format/RawResponseFormatter.java Co-authored-by: Yury-Fridlyand <[email protected]> Signed-off-by: Mitchell Gale <[email protected]> * Apply suggestions from code review Co-authored-by: Guian Gumpac <[email protected]> Signed-off-by: Mitchell Gale <[email protected]> --------- Signed-off-by: Mitchell Gale <[email protected]> Signed-off-by: Mitchell Gale <[email protected]> Co-authored-by: Yury-Fridlyand <[email protected]> Co-authored-by: Guian Gumpac <[email protected]>
…arch-project#1971) * Spotless apply on protocol Signed-off-by: Mitchell Gale <[email protected]> * added ignorefailures Signed-off-by: Mitchell Gale <[email protected]> * Update protocol/src/main/java/org/opensearch/sql/protocol/response/format/RawResponseFormatter.java Co-authored-by: Yury-Fridlyand <[email protected]> Signed-off-by: Mitchell Gale <[email protected]> * Apply suggestions from code review Co-authored-by: Guian Gumpac <[email protected]> Signed-off-by: Mitchell Gale <[email protected]> --------- Signed-off-by: Mitchell Gale <[email protected]> Signed-off-by: Mitchell Gale <[email protected]> Co-authored-by: Yury-Fridlyand <[email protected]> Co-authored-by: Guian Gumpac <[email protected]>


Description
Modified the ODBC Driver to recognize support for conversion of OpenSearch types:
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.