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

SpriCoder pushed a commit to branch fs/inner-view
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 9327b77c583ad139aedfd43af7a94eafa1accafd
Author: spricoder <[email protected]>
AuthorDate: Fri Nov 20 18:08:16 2026 +0800

    [FS] apply spotless and keep help test aligned with stats modes
    
    Internal stats modes (reduce, gaps, sessions, extreme) are no longer listed 
as
    commands; the help test now asserts they and the former windows command are 
absent.
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
 .../org/apache/iotdb/cli/fs/FilesystemShell.java   | 37 ++--------------------
 .../cli/fs/command/FilesystemCommandHelpTest.java  | 15 +++++++--
 .../iotdb/cli/fs/provider/FsReductionTest.java     | 11 ++++---
 3 files changed, 21 insertions(+), 42 deletions(-)

diff --git 
a/iotdb-client/cli/src/main/java/org/apache/iotdb/cli/fs/FilesystemShell.java 
b/iotdb-client/cli/src/main/java/org/apache/iotdb/cli/fs/FilesystemShell.java
index 7754eaf0af6..772dea56118 100644
--- 
a/iotdb-client/cli/src/main/java/org/apache/iotdb/cli/fs/FilesystemShell.java
+++ 
b/iotdb-client/cli/src/main/java/org/apache/iotdb/cli/fs/FilesystemShell.java
@@ -76,40 +76,9 @@ public class FilesystemShell {
 
   private static final List<String> COMMANDS =
       Arrays.asList(
-          "pwd",
-          "ls",
-          "ll",
-          "cd",
-          "stat",
-          "meta",
-          "schema",
-          "stats",
-          "count",
-          "wc",
-          "cat",
-          "head",
-          "tail",
-          "grep",
-          "find",
-          "less",
-          "more",
-          "file",
-          "mkdir",
-          "rmdir",
-          "rm",
-          "mv",
-          "cp",
-          "cut",
-          "paste",
-          "join",
-          "tree",
-          "help",
-          "exit",
-          "quit",
-          "tee",
-          "write",
-          "export",
-          "sketch",
+          "pwd", "ls", "ll", "cd", "stat", "meta", "schema", "stats", "count", 
"wc", "cat", "head",
+          "tail", "grep", "find", "less", "more", "file", "mkdir", "rmdir", 
"rm", "mv", "cp", "cut",
+          "paste", "join", "tree", "help", "exit", "quit", "tee", "write", 
"export", "sketch",
           "sql");
 
   private final CliContext ctx;
diff --git 
a/iotdb-client/cli/src/test/java/org/apache/iotdb/cli/fs/command/FilesystemCommandHelpTest.java
 
b/iotdb-client/cli/src/test/java/org/apache/iotdb/cli/fs/command/FilesystemCommandHelpTest.java
index 2a7d0b636e6..6fc294fe8ab 100644
--- 
a/iotdb-client/cli/src/test/java/org/apache/iotdb/cli/fs/command/FilesystemCommandHelpTest.java
+++ 
b/iotdb-client/cli/src/test/java/org/apache/iotdb/cli/fs/command/FilesystemCommandHelpTest.java
@@ -34,12 +34,21 @@ public class FilesystemCommandHelpTest {
   @Test
   public void generalHelpListsAllCommandsAndBatchContract() throws Exception {
     String help = help("");
+    java.util.EnumSet<FilesystemCommand.Type> statsModes =
+        java.util.EnumSet.of(
+            FilesystemCommand.Type.REDUCE,
+            FilesystemCommand.Type.GAPS,
+            FilesystemCommand.Type.SESSIONS,
+            FilesystemCommand.Type.EXTREME);
     for (FilesystemCommand.Type type : FilesystemCommand.Type.values()) {
-      if (type != FilesystemCommand.Type.INVALID) {
-        assertTrue(
-            type.name(), help.contains("  " + 
type.name().toLowerCase(java.util.Locale.ROOT)));
+      String name = "  " + type.name().toLowerCase(java.util.Locale.ROOT);
+      if (statsModes.contains(type)) {
+        assertFalse(type.name(), help.contains(name + " "));
+      } else if (type != FilesystemCommand.Type.INVALID) {
+        assertTrue(type.name(), help.contains(name));
       }
     }
+    assertFalse(help.contains("  windows "));
     assertTrue(help.contains("--fs_write_mode enabled"));
     assertTrue(help.contains("stdout"));
     assertTrue(help.contains("stderr"));
diff --git 
a/iotdb-client/cli/src/test/java/org/apache/iotdb/cli/fs/provider/FsReductionTest.java
 
b/iotdb-client/cli/src/test/java/org/apache/iotdb/cli/fs/provider/FsReductionTest.java
index 6d3763d7ae3..641b489b704 100644
--- 
a/iotdb-client/cli/src/test/java/org/apache/iotdb/cli/fs/provider/FsReductionTest.java
+++ 
b/iotdb-client/cli/src/test/java/org/apache/iotdb/cli/fs/provider/FsReductionTest.java
@@ -183,9 +183,7 @@ public class FsReductionTest {
   public void globalRankingNotPoolingAndDeterministicTies() throws Exception {
     FsReduction e =
         new FsReduction(
-            "tree",
-            "/root/db",
-            options("--aggregates avg --sort-by avg --windows 0:10,20:30"));
+            "tree", "/root/db", options("--aggregates avg --sort-by avg 
--windows 0:10,20:30"));
     feed(e, "b", SqlRow.of("time", "0", "x", "5"), SqlRow.of("time", "20", 
"x", "6"));
     feed(e, "a", SqlRow.of("time", "0", "x", "5"), SqlRow.of("time", "20", 
"x", "6"));
     List<SqlRow> r = e.finish();
@@ -198,7 +196,8 @@ public class FsReductionTest {
   @Test
   public void endpointDifferenceAndSpanAvoidInt64Overflow() throws Exception {
     FsReduction e =
-        new FsReduction("tree", "x", options("--aggregates 
first,last,delta,elapsed_ms,rate_per_ms"));
+        new FsReduction(
+            "tree", "x", options("--aggregates 
first,last,delta,elapsed_ms,rate_per_ms"));
     feed(
         e,
         "a",
@@ -214,7 +213,9 @@ public class FsReductionTest {
   public void zeroSpanNullLastAndAscendingRank() throws Exception {
     FsReduction e =
         new FsReduction(
-            "tree", "x", options("--aggregates delta,rate_per_ms --sort-by 
rate_per_ms --order asc"));
+            "tree",
+            "x",
+            options("--aggregates delta,rate_per_ms --sort-by rate_per_ms 
--order asc"));
     feed(e, "a", SqlRow.of("time", "0", "x", "3"));
     feed(e, "b", SqlRow.of("time", "0", "x", "4"), SqlRow.of("time", "2", "x", 
"2"));
     List<SqlRow> r = e.finish();

Reply via email to