Skip to content
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 Column and ColumnChunk's dataType field to std::unique_ptr #2418

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

ray6080
Copy link
Contributor

@ray6080 ray6080 commented Nov 15, 2023

As described in the title. This simplifies the implicit copy and life cycle problems related to LogicalType. We should change the one inside ValueVector too.

Also, added some syntax sugars inside LogicalType, such as LogicalType::BOOL(), LogicalType::INT64() to avoid std::make_unique(...).

Another minor change is to make csrOffsetColumn and adjColumn to reuse RWPropertyStats::empty() for constructing the rw property stats inside their constructors.

src/include/storage/stats/property_statistics.h Outdated Show resolved Hide resolved
val.internalIDVal = val_;
}

Value::Value(const char* val_) : isNull_{false} {
dataType = std::make_unique<LogicalType>(LogicalTypeID::STRING);
dataType = LogicalType::STRING();
strVal = std::string(val_);
}

Value::Value(uint8_t* val_) : isNull_{false} {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also create interfaces to create nested datatype(e.g. varlist, struct)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for nested types, I'm not sure. It may not be able to simplify much.

Copy link

codecov bot commented Nov 15, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (251484d) 91.20% compared to head (f7c9f7d) 91.20%.
Report is 2 commits behind head on master.

Files Patch % Lines
src/processor/operator/persistent/copy_node.cpp 50.00% 1 Missing ⚠️
src/storage/store/column.cpp 95.83% 1 Missing ⚠️
src/storage/store/rel_table_data.cpp 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2418      +/-   ##
==========================================
- Coverage   91.20%   91.20%   -0.01%     
==========================================
  Files        1020     1020              
  Lines       36343    36344       +1     
==========================================
  Hits        33146    33146              
- Misses       3197     3198       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ray6080 ray6080 merged commit 80a8b59 into master Nov 15, 2023
12 checks passed
@ray6080 ray6080 deleted the column-logical-type branch November 15, 2023 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants