You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by li...@apache.org on 2025/11/14 03:31:31 UTC
(doris) branch master updated: [fix](proc) fix schema proc row data (#57962)
This is an automated email from the ASF dual-hosted git repository.
liulijia pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 621a6a7e92e [fix](proc) fix schema proc row data (#57962)
621a6a7e92e is described below
commit 621a6a7e92ebc03d8b8369b2a929656ba2aae8c7
Author: Lijia Liu <li...@yeah.net>
AuthorDate: Fri Nov 14 11:31:23 2025 +0800
[fix](proc) fix schema proc row data (#57962)
### What problem does this PR solve?
`/api/meta/namespaces/NS_KEY/databases/DB_KEY/"tables/TABLE_KEY/schema` will failed.
Bug stack:
```
[RestApiExceptionHandler.unexpectedExceptionHandler():61] unexpected exception
java.lang.IllegalStateException: null
at com.google.common.base.Preconditions.checkState(Preconditions.java:499) ~[guava-33.2.1-jre.jar:?]
at org.apache.doris.httpv2.rest.MetaInfoAction.generateSchema(MetaInfoAction.java:289) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.httpv2.rest.MetaInfoAction.generateResult(MetaInfoAction.java:275) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.httpv2.rest.MetaInfoAction.getTableSchema(MetaInfoAction.java:250) ~[doris-fe.jar:1.2-SNAPSHOT]
```
Remove dumplicate comment column in `schema` proc.
Related PR: #51047
version 3.0.7+
Co-authored-by: liutang123 <li...@gmail.com>
---
.../main/java/org/apache/doris/common/proc/IndexSchemaProcNode.java | 3 +--
.../java/org/apache/doris/common/proc/IndexSchemaProcNodeTest.java | 2 ++
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/common/proc/IndexSchemaProcNode.java b/fe/fe-core/src/main/java/org/apache/doris/common/proc/IndexSchemaProcNode.java
index 3630dac0c57..b32dd168ffc 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/common/proc/IndexSchemaProcNode.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/common/proc/IndexSchemaProcNode.java
@@ -85,7 +85,6 @@ public class IndexSchemaProcNode implements ProcNodeInterface {
extras.add(column.getExtraInfo());
}
String extraStr = StringUtils.join(extras, ",");
- String comment = column.getComment();
List<String> rowList = Lists.newArrayList(column.getDisplayName(),
column.getOriginType().hideVersionForVersionColumn(true),
@@ -93,7 +92,7 @@ public class IndexSchemaProcNode implements ProcNodeInterface {
((Boolean) column.isKey()).toString(),
column.getDefaultValue() == null
? FeConstants.null_string : column.getDefaultValue(),
- extraStr, comment);
+ extraStr);
for (String additionalColName : additionalColNames) {
switch (additionalColName.toLowerCase()) {
diff --git a/fe/fe-core/src/test/java/org/apache/doris/common/proc/IndexSchemaProcNodeTest.java b/fe/fe-core/src/test/java/org/apache/doris/common/proc/IndexSchemaProcNodeTest.java
index 09fe81e77e8..493a55ac345 100644
--- a/fe/fe-core/src/test/java/org/apache/doris/common/proc/IndexSchemaProcNodeTest.java
+++ b/fe/fe-core/src/test/java/org/apache/doris/common/proc/IndexSchemaProcNodeTest.java
@@ -50,6 +50,8 @@ public class IndexSchemaProcNodeTest {
Assert.assertEquals(2, procResult.getRows().size());
Assert.assertTrue(procResult.getRows().get(1).contains(column2.getDisplayName()));
Assert.assertFalse(procResult.getRows().get(1).contains(column2.getName()));
+ Assert.assertEquals("The column size should be 6", 6, procResult.getColumnNames().size());
+ Assert.assertEquals("The row size should be 6", 6, procResult.getRows().get(1).size());
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org