You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "ZhangYu0123 (via GitHub)" <gi...@apache.org> on 2023/03/02 07:06:22 UTC
[GitHub] [doris] ZhangYu0123 opened a new pull request, #17331: [Fix](Lightweight schema Change) query error caused by array default type is unsupported
ZhangYu0123 opened a new pull request, #17331:
URL: https://github.com/apache/doris/pull/17331
When using lightweight schema Change to add column array type, query failed as follows:
<img width="811" alt="image" src="https://user-images.githubusercontent.com/67053339/222353542-e9e396d6-9951-469f-a409-24a3960bf245.png">
1. Fix "array default type is unsupported" error.
2. Fix the default value filling assignment digit problem.
# Proposed changes
Issue Number: close #xxx
## Problem summary
Describe your changes.
## Checklist(Required)
* [ ] Does it affect the original behavior
* [ ] Has unit tests been added
* [ ] Has document been added or modified
* [ ] Does it need to update dependencies
* [ ] Is this PR support rollback (If NO, please explain WHY)
## 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] github-actions[bot] commented on pull request #17331: [Fix](Lightweight schema Change) query error caused by array default type is unsupported
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #17331:
URL: https://github.com/apache/doris/pull/17331#issuecomment-1453700594
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] ZhangYu0123 commented on a diff in pull request #17331: [Fix](Lightweight schema Change) query error caused by array default type is unsupported
Posted by "ZhangYu0123 (via GitHub)" <gi...@apache.org>.
ZhangYu0123 commented on code in PR #17331:
URL: https://github.com/apache/doris/pull/17331#discussion_r1124650356
##########
be/src/olap/rowset/segment_v2/column_reader.cpp:
##########
@@ -1186,14 +1204,20 @@ void DefaultValueColumnIterator::insert_default_data(const TypeInfo* type_info,
case OLAP_FIELD_TYPE_VARCHAR:
case OLAP_FIELD_TYPE_CHAR:
case OLAP_FIELD_TYPE_JSONB: {
- data_ptr = ((Slice*)mem_value)->data;
- data_len = ((Slice*)mem_value)->size;
+ char* data_ptr = ((Slice*)mem_value)->data;
+ size_t data_len = ((Slice*)mem_value)->size;
dst->insert_many_data(data_ptr, data_len, n);
break;
}
+ case OLAP_FIELD_TYPE_ARRAY: {
+ for (int i = 0; i < n; i++) {
+ dst->insert(doris::vectorized::Array(0));
Review Comment:
Because columnNullable will make null value as default. So in this function is used to process the default value situation.

--
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] hello-stephen commented on pull request #17331: [Fix](Lightweight schema Change) query error caused by array default type is unsupported
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #17331:
URL: https://github.com/apache/doris/pull/17331#issuecomment-1451501897
TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 34.07 seconds
stream load tsv: 481 seconds loaded 74807831229 Bytes, about 148 MB/s
stream load json: 39 seconds loaded 2358488459 Bytes, about 57 MB/s
stream load orc: 67 seconds loaded 1101869774 Bytes, about 15 MB/s
stream load parquet: 28 seconds loaded 861443392 Bytes, about 29 MB/s
https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20230302084617_clickbench_pr_107053.html
--
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] ZhangYu0123 commented on pull request #17331: [Fix](Lightweight schema Change) query error caused by array default type is unsupported
Posted by "ZhangYu0123 (via GitHub)" <gi...@apache.org>.
ZhangYu0123 commented on PR #17331:
URL: https://github.com/apache/doris/pull/17331#issuecomment-1454675755
run p1
--
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] ZhangYu0123 commented on pull request #17331: [Fix](Lightweight schema Change) query error caused by array default type is unsupported
Posted by "ZhangYu0123 (via GitHub)" <gi...@apache.org>.
ZhangYu0123 commented on PR #17331:
URL: https://github.com/apache/doris/pull/17331#issuecomment-1451434294
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] github-actions[bot] commented on pull request #17331: [Fix](Lightweight schema Change) query error caused by array default type is unsupported
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #17331:
URL: https://github.com/apache/doris/pull/17331#issuecomment-1454392958
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 #17331: [Fix](Lightweight schema Change) query error caused by array default type is unsupported
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #17331:
URL: https://github.com/apache/doris/pull/17331#issuecomment-1453691387
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 #17331: [Fix](Lightweight schema Change) query error caused by array default type is unsupported
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #17331:
URL: https://github.com/apache/doris/pull/17331#issuecomment-1451395789
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 #17331: [Fix](Lightweight schema Change) query error caused by array default type is unsupported
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #17331:
URL: https://github.com/apache/doris/pull/17331#issuecomment-1453697407
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] ZhangYu0123 commented on pull request #17331: [Fix](Lightweight schema Change) query error caused by array default type is unsupported
Posted by "ZhangYu0123 (via GitHub)" <gi...@apache.org>.
ZhangYu0123 commented on PR #17331:
URL: https://github.com/apache/doris/pull/17331#issuecomment-1454540728
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] ZhangYu0123 commented on pull request #17331: [Fix](Lightweight schema Change) query error caused by array default type is unsupported
Posted by "ZhangYu0123 (via GitHub)" <gi...@apache.org>.
ZhangYu0123 commented on PR #17331:
URL: https://github.com/apache/doris/pull/17331#issuecomment-1453707310
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] eldenmoon commented on a diff in pull request #17331: [Fix](Lightweight schema Change) query error caused by array default type is unsupported
Posted by "eldenmoon (via GitHub)" <gi...@apache.org>.
eldenmoon commented on code in PR #17331:
URL: https://github.com/apache/doris/pull/17331#discussion_r1124638416
##########
be/src/olap/rowset/segment_v2/column_reader.cpp:
##########
@@ -1186,14 +1204,20 @@ void DefaultValueColumnIterator::insert_default_data(const TypeInfo* type_info,
case OLAP_FIELD_TYPE_VARCHAR:
case OLAP_FIELD_TYPE_CHAR:
case OLAP_FIELD_TYPE_JSONB: {
- data_ptr = ((Slice*)mem_value)->data;
- data_len = ((Slice*)mem_value)->size;
+ char* data_ptr = ((Slice*)mem_value)->data;
+ size_t data_len = ((Slice*)mem_value)->size;
dst->insert_many_data(data_ptr, data_len, n);
break;
}
+ case OLAP_FIELD_TYPE_ARRAY: {
+ for (int i = 0; i < n; i++) {
+ dst->insert(doris::vectorized::Array(0));
Review Comment:
why not just use dst->insert_many_default?
--
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 #17331: [Fix](Lightweight schema Change) query error caused by array default type is unsupported
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #17331:
URL: https://github.com/apache/doris/pull/17331#issuecomment-1457476102
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] github-actions[bot] commented on pull request #17331: [Fix](Lightweight schema Change) query error caused by array default type is unsupported
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #17331:
URL: https://github.com/apache/doris/pull/17331#issuecomment-1457756392
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] ZhangYu0123 commented on a diff in pull request #17331: [Fix](Lightweight schema Change) query error caused by array default type is unsupported
Posted by "ZhangYu0123 (via GitHub)" <gi...@apache.org>.
ZhangYu0123 commented on code in PR #17331:
URL: https://github.com/apache/doris/pull/17331#discussion_r1124678949
##########
be/src/olap/rowset/segment_v2/column_reader.cpp:
##########
@@ -1186,14 +1204,20 @@ void DefaultValueColumnIterator::insert_default_data(const TypeInfo* type_info,
case OLAP_FIELD_TYPE_VARCHAR:
case OLAP_FIELD_TYPE_CHAR:
case OLAP_FIELD_TYPE_JSONB: {
- data_ptr = ((Slice*)mem_value)->data;
- data_len = ((Slice*)mem_value)->size;
+ char* data_ptr = ((Slice*)mem_value)->data;
+ size_t data_len = ((Slice*)mem_value)->size;
dst->insert_many_data(data_ptr, data_len, n);
break;
}
+ case OLAP_FIELD_TYPE_ARRAY: {
+ for (int i = 0; i < n; i++) {
+ dst->insert(doris::vectorized::Array(0));
Review Comment:
> you could get the nested type of ColumnNullable and call `insert_many_default` and assign the null map of ColumnNullable with may `0`, the could be much faster
ok
--
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] eldenmoon commented on a diff in pull request #17331: [Fix](Lightweight schema Change) query error caused by array default type is unsupported
Posted by "eldenmoon (via GitHub)" <gi...@apache.org>.
eldenmoon commented on code in PR #17331:
URL: https://github.com/apache/doris/pull/17331#discussion_r1124672171
##########
be/src/olap/rowset/segment_v2/column_reader.cpp:
##########
@@ -1186,14 +1204,20 @@ void DefaultValueColumnIterator::insert_default_data(const TypeInfo* type_info,
case OLAP_FIELD_TYPE_VARCHAR:
case OLAP_FIELD_TYPE_CHAR:
case OLAP_FIELD_TYPE_JSONB: {
- data_ptr = ((Slice*)mem_value)->data;
- data_len = ((Slice*)mem_value)->size;
+ char* data_ptr = ((Slice*)mem_value)->data;
+ size_t data_len = ((Slice*)mem_value)->size;
dst->insert_many_data(data_ptr, data_len, n);
break;
}
+ case OLAP_FIELD_TYPE_ARRAY: {
+ for (int i = 0; i < n; i++) {
+ dst->insert(doris::vectorized::Array(0));
Review Comment:
you could get the nested type of ColumnNullable and call `insert_many_default` and assign the null map of ColumnNullable with may `0`, the could be much faster
--
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 #17331: [Fix](Lightweight schema Change) query error caused by array default type is unsupported
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #17331:
URL: https://github.com/apache/doris/pull/17331#issuecomment-1451399420
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] yiguolei merged pull request #17331: [Fix](Lightweight schema Change) query error caused by array default type is unsupported
Posted by "yiguolei (via GitHub)" <gi...@apache.org>.
yiguolei merged PR #17331:
URL: https://github.com/apache/doris/pull/17331
--
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 pull request #17331: [Fix](Lightweight schema Change) query error caused by array default type is unsupported
Posted by "yiguolei (via GitHub)" <gi...@apache.org>.
yiguolei commented on PR #17331:
URL: https://github.com/apache/doris/pull/17331#issuecomment-1452759901
Please add some regression test.
--
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] ZhangYu0123 commented on a diff in pull request #17331: [Fix](Lightweight schema Change) query error caused by array default type is unsupported
Posted by "ZhangYu0123 (via GitHub)" <gi...@apache.org>.
ZhangYu0123 commented on code in PR #17331:
URL: https://github.com/apache/doris/pull/17331#discussion_r1124652074
##########
be/src/olap/rowset/segment_v2/column_reader.cpp:
##########
@@ -1186,14 +1204,20 @@ void DefaultValueColumnIterator::insert_default_data(const TypeInfo* type_info,
case OLAP_FIELD_TYPE_VARCHAR:
case OLAP_FIELD_TYPE_CHAR:
case OLAP_FIELD_TYPE_JSONB: {
- data_ptr = ((Slice*)mem_value)->data;
- data_len = ((Slice*)mem_value)->size;
+ char* data_ptr = ((Slice*)mem_value)->data;
+ size_t data_len = ((Slice*)mem_value)->size;
dst->insert_many_data(data_ptr, data_len, n);
break;
}
+ case OLAP_FIELD_TYPE_ARRAY: {
+ for (int i = 0; i < n; i++) {
+ dst->insert(doris::vectorized::Array(0));
Review Comment:
> why not just use dst->insert_many_default?
Because columnNullable will make null value as default. So in this function is used to process the default value situation.

--
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] ZhangYu0123 commented on pull request #17331: [Fix](Lightweight schema Change) query error caused by array default type is unsupported
Posted by "ZhangYu0123 (via GitHub)" <gi...@apache.org>.
ZhangYu0123 commented on PR #17331:
URL: https://github.com/apache/doris/pull/17331#issuecomment-1453749480
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] ZhangYu0123 commented on pull request #17331: [Fix](Lightweight schema Change) query error caused by array default type is unsupported
Posted by "ZhangYu0123 (via GitHub)" <gi...@apache.org>.
ZhangYu0123 commented on PR #17331:
URL: https://github.com/apache/doris/pull/17331#issuecomment-1453754976
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