This is an automated email from the ASF dual-hosted git repository.
kxiao pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push:
new 4c334b9c6d0 Revert "[Fix](load) Fix insert into wrong value #31890
(#31891)" (#31974)
4c334b9c6d0 is described below
commit 4c334b9c6d0140fe6da8e1b84296b51d494e654e
Author: Kang <[email protected]>
AuthorDate: Fri Mar 8 12:49:59 2024 +0800
Revert "[Fix](load) Fix insert into wrong value #31890 (#31891)" (#31974)
This reverts commit d44adb087a4e5c0394a0b18cab5c0e6cda9359d6.
---
fe/fe-core/src/main/jflex/sql_scanner.flex | 2 +-
regression-test/data/insert_p0/insert.out | 3 ---
regression-test/suites/insert_p0/insert.groovy | 16 ----------------
3 files changed, 1 insertion(+), 20 deletions(-)
diff --git a/fe/fe-core/src/main/jflex/sql_scanner.flex
b/fe/fe-core/src/main/jflex/sql_scanner.flex
index 583fc20243c..314a04599b0 100644
--- a/fe/fe-core/src/main/jflex/sql_scanner.flex
+++ b/fe/fe-core/src/main/jflex/sql_scanner.flex
@@ -739,7 +739,7 @@ EndOfLineComment = "--"
!({HintContent}|{ContainsLineTerminator}) {LineTerminato
{SingleQuoteStringLiteral} {
return newToken(SqlParserSymbols.STRING_LITERAL,
- escapeBackSlash(yytext().substring(1, yytext().length()-1), sql_mode));
+ escapeBackSlash(yytext().substring(1, yytext().length()-1),
sql_mode).replaceAll("''", "'"));
}
{DoubleQuoteStringLiteral} {
diff --git a/regression-test/data/insert_p0/insert.out
b/regression-test/data/insert_p0/insert.out
index 38a2a818ab5..b582f45123d 100644
--- a/regression-test/data/insert_p0/insert.out
+++ b/regression-test/data/insert_p0/insert.out
@@ -202,6 +202,3 @@
44980 113.8777 again 1987-04-09 2010-01-02T04:03:06 false
-0.01 0E-10
44980 113.8777 again 1987-04-09 2010-01-02T04:03:06 false
-0.01 0E-10
--- !select --
-3 replace(cdate,'-','')
-
diff --git a/regression-test/suites/insert_p0/insert.groovy
b/regression-test/suites/insert_p0/insert.groovy
index cd3ba176bc8..573d5d8366c 100644
--- a/regression-test/suites/insert_p0/insert.groovy
+++ b/regression-test/suites/insert_p0/insert.groovy
@@ -83,20 +83,4 @@ suite("insert") {
sql "sync"
qt_insert """ select * from mutable_datatype order by c_bigint, c_double,
c_string, c_date, c_timestamp, c_boolean, c_short_decimal"""
- def table = "insert_with_quote"
- sql """ DROP TABLE IF EXISTS ${table} """
- sql """
- CREATE TABLE ${table} (
- `id` int(11) NULL,
- `dim1` string NULL
- ) ENGINE=OLAP
- UNIQUE KEY(`id`)
- DISTRIBUTED BY HASH(`id`) BUCKETS 1
- PROPERTIES (
- "replication_allocation" = "tag.location.default: 1"
- );
- """
- sql """insert into ${table}(id,dim1)
values(3,\'replace(cdate,\\\'-\\\',\\\'\\\')\')"""
- qt_select """ select * from ${table} """
-
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]