-
Notifications
You must be signed in to change notification settings - Fork 33
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 Flint index refresh mode #228
Refactor Flint index refresh mode #228
Conversation
Signed-off-by: Chen Dai <[email protected]>
Signed-off-by: Chen Dai <[email protected]>
Signed-off-by: Chen Dai <[email protected]>
Signed-off-by: Chen Dai <[email protected]>
Signed-off-by: Chen Dai <[email protected]>
case FULL if isIncrementalRefreshing(indexName) => | ||
throw new IllegalStateException( | ||
s"Index $indexName is incremental refreshing and cannot be manual refreshed") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because refresh mode is decided by index options in refresh index API internally, this case is impossible now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Chen Dai <[email protected]>
Merged from |
Description
This PR primarily removes the
refreshMode
in therefreshIndex()
API, which is internally used by the SQL layer. This change serves as a prerequisite for follow-up changes that introduce Manual-Incremental refresh mode for #195.Before the change
Currently, Flint SQL layer always pass the following mode to refresh index API layer:
INCREMENTAL
mode ifCREATE INDEX ... WITH (auto_refresh=true)
FULL
mode ifREFRESH INDEX
statementAfter the change
The meaning of refresh mode
The revision clarifies that the refresh mode is inherently a characteristic of the Flint index upon creation, rather than something that can be specified later through either the
refreshIndex
API or theREFRESH
statement. In other words, therefreshIndex
API will autonomously determine the mode by reading the Flint index options.Refresh statement behavior
The refresh statement behavior remains unchanged:
refreshing
mode (a new IT has been added to verify this).Issues Resolved
#100
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.