Repository navigation
Support SHOW DELETE TIMESERIES PROGRESS in REST v1 queries #19538
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,6 +26,7 @@ | |
| import org.apache.iotdb.db.queryengine.plan.analyze.QueryType; | ||
| import org.apache.iotdb.db.queryengine.plan.execution.ExecutionResult; | ||
| import org.apache.iotdb.db.queryengine.plan.execution.IQueryExecution; | ||
| import org.apache.iotdb.db.queryengine.plan.statement.sys.ShowDeleteTimeSeriesProgressStatement; | ||
| import org.apache.iotdb.rest.protocol.model.ExecutionStatus; | ||
| import org.apache.iotdb.rest.protocol.v1.model.QueryDataSet; | ||
| import org.apache.iotdb.rpc.TSStatusCode; | ||
|
|
@@ -45,10 +46,17 @@ | |
| import java.util.Queue; | ||
|
|
||
| import static org.junit.Assert.assertEquals; | ||
| import static org.junit.Assert.assertFalse; | ||
| import static org.junit.Assert.assertTrue; | ||
|
|
||
| public class QueryDataSetHandlerTest { | ||
|
|
||
| @Test | ||
| public void showDeleteTimeSeriesProgressIsAllowedAsQuery() { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. minor
Fix: Extend the test to call |
||
| assertFalse( | ||
| ExecuteStatementHandler.validateStatement(new ShowDeleteTimeSeriesProgressStatement())); | ||
| } | ||
|
|
||
| @Test | ||
| public void fillDataSetWithTimestampsShouldAllowResultAtExactLimit() throws Exception { | ||
| Response response = | ||
|
|
||
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.
major
external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/v1/handler/ExecuteStatementHandler.java:37— Query path still rejects SHOW DELETE TIMESERIES PROGRESS: fillQueryDataSet has no branch for itAfter this change
SHOW DELETE TIMESERIES PROGRESSreaches the REST v1 query endpoint, butQueryDataSetHandler.fillQueryDataSet(v1, lines 61-84) only special-cases ShowStatement/ShowModels/ShowAIDevices/ShowLoadedModels/AuthorStatement/GetRegionIdStatement and QueryStatement;ShowDeleteTimeSeriesProgressStatement(extends Statement, implements IConfigStatement) falls through to the fallback branch and returns QUERY_PROCESS_ERROR "unsupported query data type", so the feature does not work. The non-query endpoint simultaneously regresses from SUCCESS_STATUS to EXECUTE_STATEMENT_ERROR.Fix: Add
statement instanceof ShowDeleteTimeSeriesProgressStatementto the fillShowPlanDataSet branch in external-service-impl/rest/.../v1/handler/QueryDataSetHandler.java, mirroring the validator change (and v2 for parity).