You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "zxealous (via GitHub)" <gi...@apache.org> on 2023/02/21 05:50:34 UTC
[GitHub] [doris] zxealous opened a new pull request, #16978: [fix](struct-type) fix be core when load array orc file
zxealous opened a new pull request, #16978:
URL: https://github.com/apache/doris/pull/16978
# Proposed changes
Issue Number: close #16925
## Problem summary
in be/src/vec/data_types/data_type_factory.cpp:168, col_desc.contains_nulls[0] memory access out of bounds
## 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] cambyzju commented on a diff in pull request #16978: [fix](struct-type) fix be core when load array orc file
Posted by "cambyzju (via GitHub)" <gi...@apache.org>.
cambyzju commented on code in PR #16978:
URL: https://github.com/apache/doris/pull/16978#discussion_r1112592300
##########
be/src/vec/exec/format/orc/vorc_reader.cpp:
##########
@@ -607,21 +607,28 @@ TypeDescriptor OrcReader::_convert_to_doris_type(const orc::Type* orc_type) {
case orc::TypeKind::TIMESTAMP_INSTANT:
return TypeDescriptor(PrimitiveType::TYPE_DATETIMEV2);
case orc::TypeKind::LIST: {
+ // Use Object PrimitiveType to construct TypeDescriptor also need init containers_nulls with the default value of bool
TypeDescriptor list_type(PrimitiveType::TYPE_ARRAY);
list_type.children.emplace_back(_convert_to_doris_type(orc_type->getSubtype(0)));
Review Comment:
better add a function like:
`TypeDescriptor::add_sub_type(type, bool is_nullable = true);`
contains_nulls should be true as 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] zxealous commented on pull request #16978: [fix](struct-type) fix be core when load array orc file
Posted by "zxealous (via GitHub)" <gi...@apache.org>.
zxealous commented on PR #16978:
URL: https://github.com/apache/doris/pull/16978#issuecomment-1438443023
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 #16978: [fix](struct-type) fix be core when load array orc file
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16978:
URL: https://github.com/apache/doris/pull/16978#issuecomment-1438431640
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 #16978: [fix](struct-type) fix be core when load array orc file
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16978:
URL: https://github.com/apache/doris/pull/16978#issuecomment-1437897338
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] xy720 commented on a diff in pull request #16978: [fix](struct-type) fix be core when load array orc file
Posted by "xy720 (via GitHub)" <gi...@apache.org>.
xy720 commented on code in PR #16978:
URL: https://github.com/apache/doris/pull/16978#discussion_r1112986003
##########
be/src/runtime/types.cpp:
##########
@@ -270,6 +270,15 @@ TypeDescriptor::TypeDescriptor(const google::protobuf::RepeatedPtrField<PTypeNod
}
}
+void TypeDescriptor::add_sub_type(TypeDescriptor&& sub_type, std::string&& field_name,
+ bool&& is_nullable) {
+ children.emplace_back(sub_type);
+ if (!field_name.empty()) {
Review Comment:
Better use a new method add_field_name for field_name.
Because field_name is only used for struct type.
--
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 #16978: [fix](struct-type) fix be core when load array orc file
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16978:
URL: https://github.com/apache/doris/pull/16978#issuecomment-1438431745
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] zxealous commented on a diff in pull request #16978: [fix](struct-type) fix be core when load array orc file
Posted by "zxealous (via GitHub)" <gi...@apache.org>.
zxealous commented on code in PR #16978:
URL: https://github.com/apache/doris/pull/16978#discussion_r1112599203
##########
be/src/vec/exec/format/orc/vorc_reader.cpp:
##########
@@ -607,21 +607,28 @@ TypeDescriptor OrcReader::_convert_to_doris_type(const orc::Type* orc_type) {
case orc::TypeKind::TIMESTAMP_INSTANT:
return TypeDescriptor(PrimitiveType::TYPE_DATETIMEV2);
case orc::TypeKind::LIST: {
+ // Use Object PrimitiveType to construct TypeDescriptor also need init containers_nulls with the default value of bool
TypeDescriptor list_type(PrimitiveType::TYPE_ARRAY);
list_type.children.emplace_back(_convert_to_doris_type(orc_type->getSubtype(0)));
+ list_type.contains_nulls.push_back(false);
Review Comment:
ok
##########
be/src/vec/exec/format/orc/vorc_reader.cpp:
##########
@@ -607,21 +607,28 @@ TypeDescriptor OrcReader::_convert_to_doris_type(const orc::Type* orc_type) {
case orc::TypeKind::TIMESTAMP_INSTANT:
return TypeDescriptor(PrimitiveType::TYPE_DATETIMEV2);
case orc::TypeKind::LIST: {
+ // Use Object PrimitiveType to construct TypeDescriptor also need init containers_nulls with the default value of bool
TypeDescriptor list_type(PrimitiveType::TYPE_ARRAY);
list_type.children.emplace_back(_convert_to_doris_type(orc_type->getSubtype(0)));
Review Comment:
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] github-actions[bot] commented on pull request #16978: [fix](struct-type) fix be core when load array orc file
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16978:
URL: https://github.com/apache/doris/pull/16978#issuecomment-1438049269
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] luozenglin merged pull request #16978: [fix](struct-type) fix be core when load array orc file
Posted by "luozenglin (via GitHub)" <gi...@apache.org>.
luozenglin merged PR #16978:
URL: https://github.com/apache/doris/pull/16978
--
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] xy720 commented on a diff in pull request #16978: [fix](struct-type) fix be core when load array orc file
Posted by "xy720 (via GitHub)" <gi...@apache.org>.
xy720 commented on code in PR #16978:
URL: https://github.com/apache/doris/pull/16978#discussion_r1112598524
##########
be/src/vec/exec/format/orc/vorc_reader.cpp:
##########
@@ -607,21 +607,28 @@ TypeDescriptor OrcReader::_convert_to_doris_type(const orc::Type* orc_type) {
case orc::TypeKind::TIMESTAMP_INSTANT:
return TypeDescriptor(PrimitiveType::TYPE_DATETIMEV2);
case orc::TypeKind::LIST: {
+ // Use Object PrimitiveType to construct TypeDescriptor also need init containers_nulls with the default value of bool
TypeDescriptor list_type(PrimitiveType::TYPE_ARRAY);
list_type.children.emplace_back(_convert_to_doris_type(orc_type->getSubtype(0)));
+ list_type.contains_nulls.push_back(false);
Review Comment:
should be true as 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 #16978: [fix](struct-type) fix be core when load array orc file
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16978:
URL: https://github.com/apache/doris/pull/16978#issuecomment-1438431687
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 #16978: [fix](struct-type) fix be core when load array orc file
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16978:
URL: https://github.com/apache/doris/pull/16978#issuecomment-1438046076
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 #16978: [fix](struct-type) fix be core when load array orc file
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16978:
URL: https://github.com/apache/doris/pull/16978#issuecomment-1438438739
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