Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix omniv2 custom FileFormat extensibility problem #66

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

Merged
jf-tech merged 3 commits into master from omni_custom_format
Sep 27, 2020

Conversation

@jf-tech
Copy link
Owner

@jf-tech jf-tech commented Sep 27, 2020

Currently if a custom FileFormat is given in HandlerParams to omniv2 handler creation call, this FileFormat becomes the only FileFormat for the omni handler. This behavior would make it difficult to deal with situation where we have to ingest many types of inputs using omni schema. (Saying it being difficult not impossible is because we can theoretically use 2 Extensions, each of which uses the same omni handler, but the first one with custom FileFormat and second with nil, thus the builtin FileFormats will kick in. Possible, but incredibly ugly.)

Instead, omni handler's HandlerParams should allow a list of custom FileFormats. During schema probing, we will combine them with the builtin FileFormats, with priority given the custom ones. If one FileFormat accepts the input then it will be used during ingestion; if not, omni handler will keep on probing the rest of the FileFormats.

jf-tech added 2 commits September 27, 2020 14:22
Currently if a custom `FileFormat` is given in `HandlerParams` to omniv2 handler creation call, this `FileFormat`
becomes the only FileFormat for the omni handler. This behavior would make it difficult to deal with situation where
we have to ingest many types of inputs using omni schema. (Saying it being difficult not impossible is because we can
theoretically use 2 Extensions, each of which uses the same omni handler, but the first one with custom `FileFormat`
and second with nil, thus the builtin `FileFormat`s will kick in. Possible, but incredibly ugly.)
Instead, omni handler's `HandlerParams` should allow a list of custom `FileFormat`s. During schema probing, we will
combine them with the builtin `FileFormat`s, with priority given the custom ones. If one `FileFormat` accepts the input
then it will be used during ingestion; if not, omni handler will keep on probing the rest of the `FileFormat`s.
Copy link

codecov bot commented Sep 27, 2020
edited
Loading

Codecov Report

Merging #66 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@ Coverage Diff @@
## master #66 +/- ##
=========================================
 Coverage 100.00% 100.00% 
=========================================
 Files 29 29 
 Lines 1219 1225 +6 
=========================================
+ Hits 1219 1225 +6 
Impacted Files Coverage Δ
handlers/omni/v2/handler.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aba194b...53c7803. Read the comment docs.

Copy link
Collaborator

@liangxibing liangxibing left a comment

Choose a reason for hiding this comment

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

LGTM

@jf-tech jf-tech merged commit aacc906 into master Sep 27, 2020
@jf-tech jf-tech deleted the omni_custom_format branch September 27, 2020 03:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@liangxibing liangxibing liangxibing approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /