This is an automated email from the ASF dual-hosted git repository.

hello-stephen 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 25de3bf8cc6 [test](fe) Enable debug points for NestedGroup session 
default test (#70639)
25de3bf8cc6 is described below

commit 25de3bf8cc627ad232d19c41629fe9ef5b03bdfa
Author: lihangyu <[email protected]>
AuthorDate: Mon Nov 16 06:06:43 2026 -0800

    [test](fe) Enable debug points for NestedGroup session default test (#70639)
    
    ### Background
    
    VARIANT tables with escaped dotted keys reject NestedGroup columns. The
    parser only applies the test-only `default_variant_*` session variables
    when debug points are enabled.
    
    ### What problem does this PR solve?
    
    Issue Number: None
    Related PR: #70501 (added the debug-point gate for VARIANT session
    defaults)
    PR Type: Test
    
    Problem Summary:
    
    `VariantEscapeTableTest.testNestedGroupFinalTypeIsForbidden` sets the
    NestedGroup session default without enabling debug points. The parser
    therefore uses the built-in default, creates the table, and the
    expected-exception assertion fails. Enable debug points for the
    session-default case and restore both the original configuration and
    session value in `finally`.
    
    ### Details
    
    - **Failure:** The original test fails at the `nested_default` CREATE
    TABLE assertion with "Expected java.lang.Exception to be thrown, but
    nothing was thrown."
    - **Cause:** The test did not enable the debug-point gate introduced by
    #70501.
    - **Stability evidence:** The failure was reproduced on master before
    the change. After the change, the complete test class and the adjacent
    parser and CREATE TABLE LIKE test classes pass. Both modified values are
    restored even if the assertion fails.
    
    ### Testing
    
    On the remote Linux development worktree:
    
    - Before the fix: `./run-fe-ut.sh --run
    
org.apache.doris.catalog.VariantEscapeTableTest#testNestedGroupFinalTypeIsForbidden`
    fails at the expected-exception assertion.
    - After the fix: `./run-fe-ut.sh --run
    
org.apache.doris.catalog.VariantEscapeTableTest,org.apache.doris.catalog.CreateTableLikeTest,org.apache.doris.nereids.parser.NereidsParserTest`
    passes all 115 tests (9 + 14 + 92), with no failures, errors, or skips.
    - `PATH=~/agent-bin:$PATH build-support/clang-format.sh` completes
    successfully.
    - `mvn checkstyle:check -pl fe-core` reports 0 violations.
    
    ### Release note
    
    None.
    
    ### Check List (For Author)
    
    - Behavior changed: No
    - Does this need documentation: No
    - Pre-submission status: Ready
    
    ### AI Disclosure
    
    - Tool: OpenAI Codex
    - Generated: Test fix and PR description.
    - Human review: Not yet performed.
---
 .../java/org/apache/doris/catalog/VariantEscapeTableTest.java  | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git 
a/fe/fe-core/src/test/java/org/apache/doris/catalog/VariantEscapeTableTest.java 
b/fe/fe-core/src/test/java/org/apache/doris/catalog/VariantEscapeTableTest.java
index c4842a48234..8c7cdb99a8e 100644
--- 
a/fe/fe-core/src/test/java/org/apache/doris/catalog/VariantEscapeTableTest.java
+++ 
b/fe/fe-core/src/test/java/org/apache/doris/catalog/VariantEscapeTableTest.java
@@ -20,6 +20,7 @@ package org.apache.doris.catalog;
 import org.apache.doris.analysis.DescriptorToThriftConverter;
 import org.apache.doris.analysis.SlotDescriptor;
 import org.apache.doris.analysis.TupleDescriptor;
+import org.apache.doris.common.Config;
 import org.apache.doris.common.FeConstants;
 import org.apache.doris.common.util.PropertyAnalyzer;
 import org.apache.doris.nereids.parser.NereidsParser;
@@ -141,8 +142,12 @@ public class VariantEscapeTableTest extends 
TestWithFeService {
                 + "DUPLICATE KEY(k) DISTRIBUTED BY HASH(k) BUCKETS 1 "
                 + 
"PROPERTIES('replication_num'='1','variant_escape_dots_in_keys'='true')"));
         Assertions.assertTrue(explicit.getMessage().contains("Escaped tables 
do not support NestedGroup"));
-        connectContext.getSessionVariable().defaultVariantEnableNestedGroup = 
true;
+        boolean originalEnableDebugPoints = Config.enable_debug_points;
+        boolean originalNestedGroup = 
connectContext.getSessionVariable().defaultVariantEnableNestedGroup;
         try {
+            // Session defaults are only applied when debug points are enabled.
+            Config.enable_debug_points = true;
+            
connectContext.getSessionVariable().defaultVariantEnableNestedGroup = true;
             Exception error = Assertions.assertThrows(Exception.class, () -> 
createTable(
                     "CREATE TABLE nested_default(k INT, v 
VARIANT<PROPERTIES('variant_max_subcolumns_count'='1')>) "
                     + "DUPLICATE KEY(k) DISTRIBUTED BY HASH(k) BUCKETS 1 "
@@ -150,7 +155,8 @@ public class VariantEscapeTableTest extends 
TestWithFeService {
             Assertions.assertTrue(error.getMessage().contains("Escaped tables 
do not support NestedGroup"),
                     error.getMessage());
         } finally {
-            
connectContext.getSessionVariable().defaultVariantEnableNestedGroup = false;
+            Config.enable_debug_points = originalEnableDebugPoints;
+            
connectContext.getSessionVariable().defaultVariantEnableNestedGroup = 
originalNestedGroup;
         }
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to