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

Refactor FT interface #1351

Merged
merged 1 commit into from
Mar 7, 2023
Merged

Refactor FT interface #1351

merged 1 commit into from
Mar 7, 2023

Conversation

acquamarin
Copy link
Collaborator

@acquamarin acquamarin commented Mar 6, 2023

  1. This PR refactors the FT interface. Instead of taking shared_ptr<ValueVector> as the input parameter type, the new set of APIs now takes in ValueVector*.
  2. Refactors the use of shared_ptr<ValueVector>. Instead of using shared_ptr<ValueVector>, we should consider using unique_ptr<ValueVector> for ownership and ValueVector* when passing around.

@@ -18,7 +18,9 @@ std::unique_ptr<PhysicalOperator> PlanMapper::mapLogicalExpressionsScanToPhysica
auto sharedState = std::make_shared<FTableSharedState>();
// populate static table
std::unique_ptr<FactorizedTableSchema> tableSchema = std::make_unique<FactorizedTableSchema>();
// TODO(Ziyi): remove vectors when we have done the refactor of dataChunk.
std::vector<std::shared_ptr<ValueVector>> vectors;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can't u remove vectors?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, vectors need to take ownership of the valueVectors because the expression evaluator will be destroyed after.

@acquamarin acquamarin merged commit 02c4f33 into master Mar 7, 2023
@acquamarin acquamarin deleted the ft-interface-refactor branch March 7, 2023 00:52
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.

None yet

2 participants