Skip to content

Schema intersection#814

Merged
eddyxu merged 7 commits intomainfrom
lei/schema_projection
Apr 29, 2023
Merged

Schema intersection#814
eddyxu merged 7 commits intomainfrom
lei/schema_projection

Conversation

@eddyxu
Copy link
Copy Markdown
Member

@eddyxu eddyxu commented Apr 29, 2023

  • Refactor datatype module to separate files.
  • Will be used by Fragment to decide which data file contains the columns to read.

@eddyxu eddyxu self-assigned this Apr 29, 2023
}

/// Intersection between two [`Schema`].
pub fn intersection(&self, other: &Self) -> Result<Self> {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is what is added in this PR.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

so intersection only happens at the top level then? do we need to also look at child fields?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes. Only these.

/// Lance Schema Field
///
#[derive(Debug, Clone, PartialEq)]
pub struct Field {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this just a straight move from datatypes.rs or are there code changes too?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

it just refactor moves.

}

/// Intersection between two [`Schema`].
pub fn intersection(&self, other: &Self) -> Result<Self> {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

so intersection only happens at the top level then? do we need to also look at child fields?

@eddyxu
Copy link
Copy Markdown
Member Author

eddyxu commented Apr 29, 2023

so intersection only happens at the top level then? do we need to also look at child fields?

it does nested call into Field::intersection() which handles the nested structs.

@eddyxu eddyxu merged commit 0c70775 into main Apr 29, 2023
@eddyxu eddyxu deleted the lei/schema_projection branch April 29, 2023 22:34
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