-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Description
Search before asking
- I had searched in the issues and found no similar issues.
Version
doris-1.2.6
selectdb(with doris-core-2.0.2)
What's Wrong?
Notice that the show create table result has a syntax error in the comment of column name.
When use three double-quota, the behavior is different.
What You Expected?
We know that mysql can use two single-quota or two double-quota to escape.
So in show create table result, this escape quota should add a slash(/) just like the behavior of three double-quota.
'default:''' should become 'default:\''
just like "default:""" -> 'default:\"',
but no 'default:'', which would lead to a syntax error.
Or doris can just throw an error when users use three single-quota(''').
How to Reproduce?
Create table with ddl below:
CREATE TABLE tmp.test (
`id` int NOT NULL COMMENT 'id',
`name` varchar(256) NOT NULL COMMENT 'name, default:'''
)
UNIQUE KEY(`id`)
DISTRIBUTED BY HASH(`id`) BUCKETS 1
PROPERTIES (
"replication_allocation" = "tag.location.default: 3"
);Then show create table shows result below:
CREATE TABLE `test` (
`id` int(11) NOT NULL COMMENT 'id',
`name` varchar(256) NOT NULL COMMENT 'name, default:''
) ENGINE=OLAP
UNIQUE KEY(`id`)
COMMENT 'OLAP'
DISTRIBUTED BY HASH(`id`) BUCKETS 1
PROPERTIES (
"replication_allocation" = "tag.location.default: 3",
"in_memory" = "false",
"storage_format" = "V2",
"disable_auto_compaction" = "false"
);Anything Else?
No response
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
No labels