You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "jacktengg (via GitHub)" <gi...@apache.org> on 2023/06/02 09:35:14 UTC
[GitHub] [doris] jacktengg opened a new pull request, #20378: [fix](load) in strict mode, return error for load and insert if datatype convert fails
jacktengg opened a new pull request, #20378:
URL: https://github.com/apache/doris/pull/20378
When in strict mode, for int column, doris insert succeed even the number is out of range, but MySQL report error ``` Out of range value for column 'timea' at row 3 ```.
This PR fix this problem.
```
CREATE TABLE `test3` (
`timea` varchar(30) NULL,
`creatr` varchar(30) NULL
) UNIQUE KEY(`timea`) DISTRIBUTED BY HASH(`timea`) BUCKETS 1 PROPERTIES ("replication_num" = "1");
insert into
test3
values
("12345678908876643", "a"),
("1234567890887664643", "b"),
("123456789088766445456", "c");
CREATE TABLE `test4` (`timea` bigint NULL, `creatr` varchar(30) NULL) UNIQUE KEY(`timea`) DISTRIBUTED BY HASH(`timea`) BUCKETS 1 PROPERTIES ("replication_num" = "1");
insert into
test4
select
*
from
test3;
Query OK, 3 rows affected (0.03 sec)
{'label':'insert_e2c0704a13e241b1_a8a988649a65c64b', 'status':'VISIBLE', 'txnId':'23500'}
```
Revert "[fix](MySQL) the way Doris handles boolean type is consistent with MySQL (#19416)"
This reverts commit 68eb420cabe5b26b09d6d4a2724ae12699bdee87.
Since it changed other behaviours, e.g. in strict mode insert into t_int values ("a"), it will result 0 is inserted into table, but it should return error instead.
## Proposed changes
Issue Number: close #xxx
<--Describe your changes.-->
## Further comments
If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] yiguolei commented on a diff in pull request #20378: [fix](load) in strict mode, return error for insert if datatype convert fails
Posted by "yiguolei (via GitHub)" <gi...@apache.org>.
yiguolei commented on code in PR #20378:
URL: https://github.com/apache/doris/pull/20378#discussion_r1218742842
##########
be/src/http/action/stream_load.cpp:
##########
@@ -457,8 +457,10 @@ Status StreamLoadAction::_process_put(HttpRequest* http_req,
if (!http_req->header(HTTP_STRICT_MODE).empty()) {
if (iequal(http_req->header(HTTP_STRICT_MODE), "false")) {
request.__set_strictMode(false);
+ ctx->strict_mode = false;
} else if (iequal(http_req->header(HTTP_STRICT_MODE), "true")) {
request.__set_strictMode(true);
+ ctx->strict_mode = true;
Review Comment:
why set it? Or it never take affect in the past?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #20378: [fix](load) in strict mode, return error for insert if datatype convert fails
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #20378:
URL: https://github.com/apache/doris/pull/20378#issuecomment-1577792167
PR approved by anyone and no changes requested.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] jacktengg commented on pull request #20378: [fix](load) in strict mode, return error for insert if datatype convert fails
Posted by "jacktengg (via GitHub)" <gi...@apache.org>.
jacktengg commented on PR #20378:
URL: https://github.com/apache/doris/pull/20378#issuecomment-1577771069
run buildall
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] jacktengg commented on pull request #20378: [fix](load) in strict mode, return error for load and insert if datatype convert fails
Posted by "jacktengg (via GitHub)" <gi...@apache.org>.
jacktengg commented on PR #20378:
URL: https://github.com/apache/doris/pull/20378#issuecomment-1573506778
run buildall
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] yiguolei commented on a diff in pull request #20378: [fix](load) in strict mode, return error for insert if datatype convert fails
Posted by "yiguolei (via GitHub)" <gi...@apache.org>.
yiguolei commented on code in PR #20378:
URL: https://github.com/apache/doris/pull/20378#discussion_r1218743786
##########
be/src/runtime/fragment_mgr.cpp:
##########
@@ -549,7 +552,7 @@ void FragmentMgr::_exec_actual(std::shared_ptr<FragmentExecState> exec_state,
cb(exec_state->executor()->runtime_state(), &status);
}
-Status FragmentMgr::exec_plan_fragment(const TExecPlanFragmentParams& params) {
+Status FragmentMgr::exec_plan_fragment(const TExecPlanFragmentParams& params, bool strict_mode) {
Review Comment:
Could strict_mode be added into TExecPlanFragmentParams?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #20378: [fix](load) in strict mode, return error for insert if datatype convert fails
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #20378:
URL: https://github.com/apache/doris/pull/20378#issuecomment-1577792133
PR approved by at least one committer and no changes requested.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #20378: [fix](load) in strict mode, return error for insert if datatype convert fails
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #20378:
URL: https://github.com/apache/doris/pull/20378#issuecomment-1577125723
clang-tidy review says "All clean, LGTM! :+1:"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] jacktengg commented on pull request #20378: [fix](load) in strict mode, return error for insert if datatype convert fails
Posted by "jacktengg (via GitHub)" <gi...@apache.org>.
jacktengg commented on PR #20378:
URL: https://github.com/apache/doris/pull/20378#issuecomment-1577774374
run buildall
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] yiguolei merged pull request #20378: [fix](load) in strict mode, return error for insert if datatype convert fails
Posted by "yiguolei (via GitHub)" <gi...@apache.org>.
yiguolei merged PR #20378:
URL: https://github.com/apache/doris/pull/20378
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #20378: [fix](load) in strict mode, return error for load and insert if datatype convert fails
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #20378:
URL: https://github.com/apache/doris/pull/20378#issuecomment-1573511428
clang-tidy review says "All clean, LGTM! :+1:"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #20378: [fix](load) in strict mode, return error for insert if datatype convert fails
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #20378:
URL: https://github.com/apache/doris/pull/20378#issuecomment-1577772045
clang-tidy review says "All clean, LGTM! :+1:"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #20378: [fix](load) in strict mode, return error for insert if datatype convert fails
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #20378:
URL: https://github.com/apache/doris/pull/20378#issuecomment-1577773728
clang-tidy review says "All clean, LGTM! :+1:"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #20378: [fix](load) in strict mode, return error for load and insert if datatype convert fails
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #20378:
URL: https://github.com/apache/doris/pull/20378#issuecomment-1573447392
clang-tidy review says "All clean, LGTM! :+1:"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] jacktengg commented on pull request #20378: [fix](load) in strict mode, return error for load and insert if datatype convert fails
Posted by "jacktengg (via GitHub)" <gi...@apache.org>.
jacktengg commented on PR #20378:
URL: https://github.com/apache/doris/pull/20378#issuecomment-1573444330
run buildall
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] jacktengg commented on pull request #20378: [fix](load) in strict mode, return error for insert if datatype convert fails
Posted by "jacktengg (via GitHub)" <gi...@apache.org>.
jacktengg commented on PR #20378:
URL: https://github.com/apache/doris/pull/20378#issuecomment-1577122376
run buildall
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org