-
Notifications
You must be signed in to change notification settings - Fork 752
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
ISSUE-1781: col encoding mapping & stats accumulator #2159
Conversation
Thanks for the contribution! Please review the labels and make any necessary changes. |
Codecov Report
@@ Coverage Diff @@
## master #2159 +/- ##
=======================================
Coverage 67% 68%
=======================================
Files 637 643 +6
Lines 35849 35967 +118
=======================================
+ Hits 24361 24599 +238
+ Misses 11488 11368 -120
Continue to review full report at Codecov.
|
common/datablocks/src/data_block.rs
Outdated
@@ -153,6 +153,20 @@ impl TryFrom<DataBlock> for RecordBatch { | |||
} | |||
} | |||
|
|||
impl TryFrom<&DataBlock> for RecordBatch { |
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.
For datablock, we convert it to RecordBatch, 'TryInto' is better?
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.
worrying about the cost of conversion here?
seems the cost is the same whether converted from DataBlock or a reference of DataBlock. but extra pointers may still reference the underlying data though.
currently, some code needs to access DataBlock again after the conversion, which is being refactored.
later, this modification will be reverted.
098bc2b
to
19c2df2
Compare
common/datablocks/src/data_block.rs
Outdated
impl TryFrom<&DataBlock> for RecordBatch { | ||
type Error = ErrorCode; | ||
|
||
fn try_from(v: &DataBlock) -> Result<RecordBatch> { |
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.
So we can use TryFrom::try_from(&v)
for impl TryFrom<DataBlock> for RecordBatch
to reduce to code size.
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.
good idea.
I am changing the caller side code so that Datablock
will no longer need to be accessed after RecordBatch::try_from
.
this is just a tmp modification of data_block.rs
, to testify some statistic component, will not be submit in the final PR
63a7b9a
to
bef13d4
Compare
/lgtm Great~ |
Approved! Thank you for the PR @dantengsky |
CI Passed |
I hereby agree to the terms of the CLA available at: https://databend.rs/policies/cla/
Summary
fixed issues:
NOTE
crates / components other than
dal
,query/datasource/table/fuse
are not touched, except that lz4 in enabled for parquet2Changelog
Related Issues
Fixes #1781
Fixes #2193
Fixes #2194
Test Plan
Unit Tests
Stateless Tests