[improve](jdbc catalog) support sqlserver uniqueidentifier data type (#23297)

This commit is contained in:
zy-kkk
2023-08-28 10:30:10 +08:00
committed by GitHub
parent eadffedb33
commit d19dcd6bc1
5 changed files with 12 additions and 0 deletions

View File

@ -96,4 +96,8 @@ CREATE TABLE dbo.DateAndTime
DateTimeOffsetColumn DATETIMEOFFSET
);
CREATE TABLE dbo.t_id (
ID uniqueidentifier PRIMARY KEY,
Name nvarchar(100)
);

View File

@ -60,3 +60,6 @@ VALUES (
'2023-06-25 14:30:45.1234567 -07:00' -- DATETIMEOFFSET
);
INSERT INTO dbo.t_id (ID, Name) VALUES (NEWID(), 'Data 1');
INSERT INTO dbo.t_id (ID, Name) VALUES (NEWID(), 'Data 2');

View File

@ -81,6 +81,7 @@ public class JdbcSQLServerClient extends JdbcClient {
case "ntext":
case "time":
case "datetimeoffset":
case "uniqueidentifier":
return ScalarType.createStringType();
case "image":
case "binary":

View File

@ -53,3 +53,6 @@
-- !filter3 --
1 Make Doris Great! Make Doris Great! Make Doris Great! Make Doris Great! Make Doris Great! Make Doris Great!
-- !id --
2

View File

@ -70,6 +70,7 @@ suite("test_sqlserver_jdbc_catalog", "p0,external,sqlserver,external_docker,exte
order_qt_filter1 """ select * from test_char where 1 = 1 order by id; """
order_qt_filter2 """ select * from test_char where 1 = 1 and id = 1 order by id; """
order_qt_filter3 """ select * from test_char where id = 1 order by id; """
order_qt_id """ select count(*) from (select * from t_id) as a; """
sql """ drop catalog if exists ${catalog_name} """