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(source): remove Source trait #2192

Merged
merged 3 commits into from
Apr 28, 2022
Merged

Conversation

neverchanje
Copy link
Contributor

@neverchanje neverchanje commented Apr 28, 2022

What's changed and what's your intention?

PLEASE DO NOT LEAVE THIS EMPTY !!!

We formerly defined a Source trait to generalize the construction of stream readers. However, table source and connector source are essentially different. The stream readers should be directly constructed via concrete type rather than using a trait.

After this refactoring, we can remove some prior efforts that tried to adapt the different constructions to the unified interface:

  • TableV2ReaderContext
  • ConnectorReaderContext
  • SourceReaderContext

Checklist

  • I have written necessary docs and comments
  • I have added necessary unit tests and integration tests

Refer to a related PR or issue link (optional)

@codecov
Copy link

codecov bot commented Apr 28, 2022

Codecov Report

Merging #2192 (3307ec4) into main (f684430) will increase coverage by 0.04%.
The diff coverage is 20.83%.

@@            Coverage Diff             @@
##             main    #2192      +/-   ##
==========================================
+ Coverage   70.89%   70.93%   +0.04%     
==========================================
  Files         650      650              
  Lines       82477    82555      +78     
==========================================
+ Hits        58470    58561      +91     
+ Misses      24007    23994      -13     
Flag Coverage Δ
rust 70.93% <20.83%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/meta/src/cluster/mod.rs 59.39% <ø> (ø)
src/source/src/connector_source.rs 0.00% <0.00%> (ø)
src/source/src/lib.rs 87.50% <ø> (+24.53%) ⬆️
src/stream/src/executor_v2/source.rs 73.65% <0.00%> (+0.62%) ⬆️
src/source/src/manager.rs 45.74% <50.00%> (ø)
src/batch/src/executor2/delete.rs 79.50% <100.00%> (+0.47%) ⬆️
src/batch/src/executor2/insert.rs 80.82% <100.00%> (ø)
src/source/src/table_v2.rs 96.03% <100.00%> (+1.59%) ⬆️
src/connector/src/filesystem/file_common.rs 80.44% <0.00%> (-0.45%) ⬇️
.../src/executor/managed_state/aggregation/extreme.rs 90.02% <0.00%> (-0.27%) ⬇️
... and 6 more

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

Copy link
Contributor

@tabVersion tabVersion left a comment

Choose a reason for hiding this comment

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

LGTM

@neverchanje neverchanje merged commit b1209f2 into main Apr 28, 2022
@neverchanje neverchanje deleted the wt-refine-struct-field branch April 28, 2022 07:05
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