-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rework FIXED_LIST #3057
Rework FIXED_LIST #3057
Conversation
src/common/types/value/value.cpp
Outdated
void Value::copyFromVarList(ku_list_t& list, const LogicalType& childType) { | ||
if (dataType->getLogicalTypeID() == LogicalTypeID::ARRAY) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's discuss with @ray6080 to see if we should have this type of check everywhere in the code base. I tend to not have it. And maybe we should have ARRAY being a physical type as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a physical type ARRAY
to avoid these checks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should do it in another PR. I still have array using the same physical layout as var-list in this PR. And I removed the size check since we didn't have these checks for the old fixed-list vector.
// Used by fixedList only. | ||
uint64_t numValuesPerList; | ||
// Used by array only. | ||
uint64_t fixedNumValues; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure should we remove it since this field is still needed in other parts of the code.
Don't forget to update docs or open an issue on docs repo. |
dff13f4
to
bf78628
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3057 +/- ##
==========================================
- Coverage 93.00% 92.94% -0.06%
==========================================
Files 1155 1155
Lines 43286 42919 -367
==========================================
- Hits 40259 39892 -367
Misses 3027 3027 ☔ View full report in Codecov by Sentry. |
1c52155
to
b90ff5d
Compare
|
||
switch (resultType->getPhysicalType()) { | ||
case PhysicalTypeID::VAR_LIST: { | ||
if (inputType.getPhysicalType() == PhysicalTypeID::VAR_LIST) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would write as
if input == ARRAY && output == ARRAY
check numElements
return
if input == LIST && output == ARRAY:
check numElements
return
validate recursively
numValuesInChild * | ||
storage::StorageUtils::getDataTypeSize(LogicalType{typeInfo.childrenTypesInfo[0]->typeID})); | ||
for (auto i = 0u; i < numValuesPerList; i++) { | ||
if (typeInfo.childrenTypesInfo[0]->typeID != LogicalTypeID::VAR_LIST && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leave a comment say why we don't need to resize for VAR_LIST and ARRAY
b90ff5d
to
35b9438
Compare
This PR resolves the issue #2975
What is changed:
To-do list: