Skip to content

Commit 31a0f6f

Browse files
committed
Improve query stage names
Signed-off-by: Simeon Widdis <sawiddis@amazon.com>
1 parent f46a4aa commit 31a0f6f

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

common/src/main/java/org/opensearch/sql/common/error/QueryProcessingStage.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,49 +17,49 @@ public enum QueryProcessingStage {
1717
* PARSING stage: PPL/SQL syntax parsing via ANTLR lexer/parser. Errors: Syntax errors, unexpected
1818
* tokens, malformed queries.
1919
*/
20-
PARSING("Validating Query Syntax"),
20+
PARSING("Validating query syntax"),
2121

2222
/**
2323
* AST_BUILDING stage: Abstract Syntax Tree construction from parse tree. Errors: Invalid AST
2424
* structure, node creation failures.
2525
*/
26-
AST_BUILDING("Building Query Structure"),
26+
AST_BUILDING("Assembling the query steps"),
2727

2828
/**
2929
* ANALYZING stage: Semantic validation and type checking. Errors: Field not found, type
3030
* mismatches, semantic violations.
3131
*/
32-
ANALYZING("Checking Query Against Your Data"),
32+
ANALYZING("Validating the query's steps"),
3333

3434
/**
3535
* OPTIMIZING stage: Logical plan optimization with transformation rules. Errors: Optimization
3636
* failures, rule application errors.
3737
*/
38-
OPTIMIZING("Optimizing Query"),
38+
OPTIMIZING("Optimizing the query"),
3939

4040
/**
4141
* PLAN_CONVERSION stage: Conversion to Calcite execution plan with system limits. Errors:
4242
* Unsupported operations, plan conversion failures.
4343
*/
44-
PLAN_CONVERSION("Preparing Query Execution"),
44+
PLAN_CONVERSION("Preparing the query for physical execution"),
4545

4646
/**
4747
* EXECUTING stage: Query execution via OpenSearch engine. Errors: Execution failures, index
4848
* access errors, resource limits.
4949
*/
50-
EXECUTING("Running Query on Cluster"),
50+
EXECUTING("Running the query"),
5151

5252
/**
5353
* RESULT_PROCESSING stage: Result formatting and cursor management. Errors: Result formatting
5454
* failures, cursor errors.
5555
*/
56-
RESULT_PROCESSING("Formatting Results"),
56+
RESULT_PROCESSING("Processing the query results"),
5757

5858
/**
5959
* CLUSTER_VALIDATION stage: Prevalidation that cluster is healthy before execution. Errors:
6060
* Cluster unhealthy, nodes unavailable.
6161
*/
62-
CLUSTER_VALIDATION("Checking Cluster Health");
62+
CLUSTER_VALIDATION("Checking cluster health");
6363

6464
private final String displayName;
6565

common/src/test/java/org/opensearch/sql/common/error/ErrorReportTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public void testErrorReportJsonMapWithStageInContext() {
6464
@SuppressWarnings("unchecked")
6565
Map<String, Object> context = (Map<String, Object>) json.get("context");
6666
assertEquals("analyzing", context.get("stage"));
67-
assertEquals("Checking Query Against Your Data", context.get("stage_description"));
67+
assertEquals("Validating the query's steps", context.get("stage_description"));
6868
assertEquals("test", context.get("field_name"));
6969
}
7070

0 commit comments

Comments
 (0)