You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by mb...@apache.org on 2026/09/09 19:16:21 UTC
(asterixdb) branch master updated: [ASTERIXDB-3593]: Remove Kind from the response
This is an automated email from the ASF dual-hosted git repository.
asf-gitbox-commits pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git
The following commit(s) were added to refs/heads/master by this push:
new 5b7266aa66 [ASTERIXDB-3593]: Remove Kind from the response
5b7266aa66 is described below
commit 5b7266aa664e637763125f966b7124b74f02fba0
Author: Janhavi Tripurwar <ja...@couchbase.com>
AuthorDate: Thu Sep 3 13:15:33 2026 +0530
[ASTERIXDB-3593]: Remove Kind from the response
Change-Id: I777beaeafcde3acef25022e2211dbe2a6aa18350
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21667
Reviewed-by: Murtadha Hubail <mh...@apache.org>
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Janhavi Tripurwar <ja...@apache.org>
---
.../asterix/app/result/fields/NcStatementsPrinter.java | 12 +-----------
.../apache/asterix/app/result/NcStatementsPrinterTest.java | 11 -----------
2 files changed, 1 insertion(+), 22 deletions(-)
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/result/fields/NcStatementsPrinter.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/result/fields/NcStatementsPrinter.java
index 5b194a4042..68b91abd9f 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/result/fields/NcStatementsPrinter.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/result/fields/NcStatementsPrinter.java
@@ -49,7 +49,7 @@ import org.apache.hyracks.api.result.IResultSet;
/**
* Prints what each statement produced, as a {@value #FIELD_NAME} array holding one object per statement: its position,
- * kind, signature, rows or handle, plans, outcome, error and metrics. A request carrying one statement is printed by the
+ * signature, rows or handle, plans, outcome, error and metrics. A request carrying one statement is printed by the
* pre-existing path instead; see {@code NCQueryServiceServlet#useMultiStatementResponse}.
* <p>
* {@code metrics} comes after {@code results} because the row count and size are only final once the rows are streamed.
@@ -58,7 +58,6 @@ public class NcStatementsPrinter implements IResponseFieldPrinter {
public static final String FIELD_NAME = "statements";
public static final String POSITION_FIELD_NAME = "statement";
- public static final String KIND_FIELD_NAME = "kind";
/**
* What a statement reports for itself. The time the request took, and whether it failed, belong to the request: a
* statement that failed says so with its status and its errors.
@@ -135,7 +134,6 @@ public class NcStatementsPrinter implements IResponseFieldPrinter {
? new ResultReader(resultSet, resultSetInfo.getJobId(), resultSetInfo.getResultSetId()) : null;
fields.add(w -> printField(w, POSITION_FIELD_NAME, String.valueOf(statement.getPosition())));
- fields.add(w -> printField(w, KIND_FIELD_NAME, quoted(statementKind(statement))));
// a statement that returns rows describes them, as the flat response does; the signature is the default one
// unless the client asked for a typed one, exactly as SignaturePrinter.newInstance decides for a request
if (printSignature && resultSetInfo != null) {
@@ -229,14 +227,6 @@ public class NcStatementsPrinter implements IResponseFieldPrinter {
return new WarningsPrinter(warnings);
}
- /** The kind of a statement, or for an extension statement the name that identifies it. */
- private static String statementKind(StatementInfo statement) {
- if (statement.getName() != null) {
- return statement.getName();
- }
- return statement.getKind() == null ? "unknown" : statement.getKind().getDisplayName();
- }
-
/**
* The metrics of one statement. Elapsed and execution time are measured around the whole request, so they are
* reported there. Public because a deployment recording a statement elsewhere records the same figures.
diff --git a/asterixdb/asterix-app/src/test/java/org/apache/asterix/app/result/NcStatementsPrinterTest.java b/asterixdb/asterix-app/src/test/java/org/apache/asterix/app/result/NcStatementsPrinterTest.java
index f3bcec90e3..13d3c8820a 100644
--- a/asterixdb/asterix-app/src/test/java/org/apache/asterix/app/result/NcStatementsPrinterTest.java
+++ b/asterixdb/asterix-app/src/test/java/org/apache/asterix/app/result/NcStatementsPrinterTest.java
@@ -56,7 +56,6 @@ public class NcStatementsPrinterTest {
Assert.assertEquals(statements.toString(), 1, statements.get(0).get("statement").asInt());
Assert.assertEquals(statements.toString(), 2, statements.get(1).get("statement").asInt());
Assert.assertEquals(statements.toString(), "success", statements.get(0).get("status").asText());
- Assert.assertNotNull(statements.toString(), statements.get(0).get("kind"));
Assert.assertNotNull(statements.toString(), statements.get(0).get("metrics"));
}
@@ -85,16 +84,6 @@ public class NcStatementsPrinterTest {
Assert.assertEquals(statements.toString(), 1, statements.get(0).get("statement").asInt());
}
- /** An extension statement is named by its name, since its kind alone does not identify it. */
- @Test
- public void anExtensionStatementIsReportedByName() throws Exception {
- StatementInfo extension = new StatementInfo(1, Statement.Kind.EXTENSION, "DESCRIBE LINK");
- extension.setStats(new Stats());
- JsonNode statements = print(List.of(extension));
-
- Assert.assertEquals(statements.toString(), "DESCRIBE LINK", statements.get(0).get("kind").asText());
- }
-
private static StatementInfo statement(int position, Statement.Kind kind) {
StatementInfo statementInfo = new StatementInfo(position, kind, null);
statementInfo.setStats(new Stats());