trino icon indicating copy to clipboard operation
trino copied to clipboard

SingleStore connector returns wrong text length with newer server versions

Open ebyhr opened this issue 1 year ago • 0 comments

CREATE TABLE statement for SingleStore:

CREATE TABLE tpch.test (
 `a` text,
 `b` text CHARACTER SET utf8,
 `c` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL
);

The connector returns the expected column definitions when we create the table on SingleStore version 7.1.13.

trino:tpch> DESC test;
 Column |      Type      | Extra | Comment
--------+----------------+-------+---------
 a      | varchar(65535) |       |
 b      | varchar(65535) |       |
 c      | varchar(65535) |       |

However, the connector returns the wrong column definitions when we create the table on SingleStore version 8.7.16.

trino:tpch> DESC test;
 Column |      Type      | Extra | Comment
--------+----------------+-------+---------
 a      | varchar(16383) |       |
 b      | varchar(21845) |       |
 c      | varchar(21845) |       |

https://docs.singlestore.com/cloud/reference/sql-reference/data-types/string-types/

ebyhr avatar Oct 15 '24 05:10 ebyhr