Skip to content

Commit 8f2c6b1

Browse files
committed
modify support create table field type(for match standard SQL)
1 parent 272dfe8 commit 8f2c6b1

File tree

3 files changed

+14
-15
lines changed

3 files changed

+14
-15
lines changed

Diff for: README.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,9 @@ sh submit.sh -sql D:\sideSql.txt -name xctest -remoteSqlPluginPath /opt/dtstack
139139

140140
```
141141
CREATE TABLE MyTable(
142-
name string,
143-
channel STRING,
144-
pv INT,
142+
name varchar,
143+
channel varchar,
144+
pv int,
145145
xctime bigint,
146146
CHARACTER_LENGTH(channel) AS timeLeng
147147
)WITH(
@@ -154,8 +154,8 @@ CREATE TABLE MyTable(
154154
);
155155
156156
CREATE TABLE MyResult(
157-
channel VARCHAR,
158-
pv VARCHAR
157+
channel varchar,
158+
pv varchar
159159
)WITH(
160160
type ='mysql',
161161
url ='jdbc:mysql://172.16.8.104:3306/test?charset=utf8',
@@ -166,8 +166,8 @@ CREATE TABLE MyResult(
166166
);
167167
168168
CREATE TABLE workerinfo(
169-
cast(logtime as TIMESTAMP)AS rtime,
170-
cast(logtime)AS rtime
169+
cast(logtime as TIMESTAMP) AS rtime,
170+
cast(logtime) AS rtime
171171
)WITH(
172172
type ='hbase',
173173
zookeeperQuorum ='rdos1:2181',
@@ -178,8 +178,8 @@ CREATE TABLE workerinfo(
178178
);
179179
180180
CREATE TABLE sideTable(
181-
cf:name String as name,
182-
cf:info String as info,
181+
cf:name varchar as name,
182+
cf:info varchar as info,
183183
PRIMARY KEY(name),
184184
PERIOD FOR SYSTEM_TIME
185185
)WITH(

Diff for: core/src/main/java/com/dtstack/flink/sql/util/ClassUtil.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public static Class<?> stringConvertClass(String str) {
6666
case "timestamp":
6767
return Timestamp.class;
6868

69-
case "DECIMAL":
69+
case "decimal":
7070
return BigDecimal.class;
7171

7272
}

Diff for: docs/colType.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22
| ------ | ----- |
33
| boolean | Boolean |
44
| int | Integer |
5+
| integer| Integer |
56
| bigint | Long |
67
| tinyint | Byte |
7-
| byte | Byte |
8-
| short | Short |
98
| smallint | Short|
10-
| char | String|
119
| varchar | String |
12-
| string | String|
10+
| real | Float |
1311
| float | Float|
1412
| double | Double|
1513
| date | Date |
16-
| timestamp | Timestamp |
14+
| timestamp | Timestamp |
15+
| decimal |BigDecimal|

0 commit comments

Comments
 (0)