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

Update data::Row to contain columns #1026

Merged
merged 4 commits into from
Dec 1, 2022
Merged

Conversation

panarch
Copy link
Member

@panarch panarch commented Nov 27, 2022

Prior steps - Make data::Row struct only work in execution layer, don't expose to user via neither Payload or Store traits.

  • Change Payload::Select rows to use Vec<Value>
  • Replace data::Row to Vec<Value> in Store traits

Main

  • Put columns into Row struct
  • Remove columns from FilterContext, BlendContext
  • Remove redandunt columns field uses

Replace rows type from Vec<Row> to Vec<Vec<Value> not to expose Row struct to users.
@panarch panarch self-assigned this Nov 27, 2022
@coveralls
Copy link

coveralls commented Nov 27, 2022

Pull Request Test Coverage Report for Build 3590202073

  • 322 of 328 (98.17%) changed or added relevant lines in 18 files are covered.
  • 3 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.05%) to 98.587%

Changes Missing Coverage Covered Lines Changed/Added Lines %
core/src/executor/join.rs 16 17 94.12%
core/src/executor/context/blend_context.rs 6 8 75.0%
core/src/executor/alter/table.rs 6 9 66.67%
Files with Coverage Reduction New Missed Lines %
core/src/result.rs 1 69.05%
core/src/executor/evaluate/mod.rs 1 97.43%
core/src/executor/execute.rs 1 94.86%
Totals Coverage Status
Change from base Build 3553834012: 0.05%
Covered Lines: 36902
Relevant Lines: 37431

💛 - Coveralls

@panarch panarch force-pushed the put-columns-into-row-struct branch 2 times, most recently from 0ce80d7 to 30b78ab Compare November 27, 2022 07:11
@panarch panarch added the improvement Improvements for existing features label Nov 27, 2022
@panarch panarch force-pushed the put-columns-into-row-struct branch 4 times, most recently from e8bfddc to 8770b53 Compare November 28, 2022 12:41
@panarch panarch marked this pull request as ready for review November 28, 2022 12:48
Copy link
Member

@ever0de ever0de left a comment

Choose a reason for hiding this comment

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

There are a few minor comments.
I'll see a bit more later(again today) to understand.

core/src/data/row.rs Outdated Show resolved Hide resolved
core/src/executor/fetch.rs Outdated Show resolved Hide resolved
core/src/executor/select/mod.rs Show resolved Hide resolved
Comment on lines 423 to 428
pub async fn fetch_labels<'a>(
storage: &dyn GStore,
relation: &'a TableFactor,
joins: &'a [Join],
projection: &'a [SelectItem],
) -> Result<Vec<String>> {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
pub async fn fetch_labels<'a>(
storage: &dyn GStore,
relation: &'a TableFactor,
joins: &'a [Join],
projection: &'a [SelectItem],
) -> Result<Vec<String>> {
pub async fn fetch_labels (
storage: &dyn GStore,
relation: &TableFactor,
joins: &[Join],
projection: &[SelectItem],
) -> Result<Vec<String>> {

Lifetime sharing here doesn't seem necessary.

Copy link
Member

@ever0de ever0de left a comment

Choose a reason for hiding this comment

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

We are laying a great foundation

🚀 🚀 🚀 🚀 🚀 🚀 🚀 🚀 🚀

Remove columns field in BlendContext and FilterContext.
Update Join module not to take columns as init param.
Move get_labels in select/mod.rs to fetch.rs and rename to fetch_lables by merging column fetching codes.
@panarch panarch merged commit b58ced5 into main Dec 1, 2022
@panarch panarch deleted the put-columns-into-row-struct branch December 1, 2022 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvements for existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants