This is an automated email from the ASF dual-hosted git repository.
huajianlan pushed a commit to branch nested_column_prune
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/nested_column_prune by this
push:
new f2dd53d2515 fix missing access path when select * from tbl
f2dd53d2515 is described below
commit f2dd53d25159253e5244340b0b057475545b2124
Author: 924060929 <[email protected]>
AuthorDate: Wed Oct 22 16:30:03 2025 +0800
fix missing access path when select * from tbl
---
.../nereids/rules/analysis/ExpressionAnalyzer.java | 3 +++
.../nereids/rules/rewrite/PruneNestedColumnTest.java | 20 ++++++++++++++++++++
2 files changed, 23 insertions(+)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/ExpressionAnalyzer.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/ExpressionAnalyzer.java
index 43a1e76751e..942c2094914 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/ExpressionAnalyzer.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/ExpressionAnalyzer.java
@@ -337,6 +337,9 @@ public class ExpressionAnalyzer extends
SubExprAnalyzer<ExpressionRewriteContext
if (!(slot instanceof SlotReference) || (((SlotReference)
slot).isVisible()) || showHidden) {
showSlots.add(slot);
}
+ if (slot.getDataType() instanceof NestedColumnPrunable) {
+
context.cascadesContext.getStatementContext().setHasNestedColumns(true);
+ }
}
ImmutableList<Slot> slots = showSlots.build();
switch (qualifier.size()) {
diff --git
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PruneNestedColumnTest.java
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PruneNestedColumnTest.java
index feec310b4f7..468167b68d4 100644
---
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PruneNestedColumnTest.java
+++
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PruneNestedColumnTest.java
@@ -92,6 +92,26 @@ public class PruneNestedColumnTest extends TestWithFeService
{
@Test
public void testProject() throws Exception {
assertColumn("select 100 from tbl", null, null, null);
+ assertColumn("select * from tbl",
+
"struct<city:text,data:array<map<int,struct<a:int,b:double>>>>",
+ ImmutableList.of(path("s")),
+ ImmutableList.of()
+ );
+ assertColumn("select tbl.* from tbl",
+
"struct<city:text,data:array<map<int,struct<a:int,b:double>>>>",
+ ImmutableList.of(path("s")),
+ ImmutableList.of()
+ );
+ assertColumn("select test.tbl.* from tbl",
+
"struct<city:text,data:array<map<int,struct<a:int,b:double>>>>",
+ ImmutableList.of(path("s")),
+ ImmutableList.of()
+ );
+ assertColumn("select internal.test.tbl.* from tbl",
+
"struct<city:text,data:array<map<int,struct<a:int,b:double>>>>",
+ ImmutableList.of(path("s")),
+ ImmutableList.of()
+ );
assertColumn("select s from tbl",
"struct<city:text,data:array<map<int,struct<a:int,b:double>>>>",
ImmutableList.of(path("s")),
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]