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

critas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/master by this push:
     new 21ad376a2a3 Add -lpf param in ExportData (#14957)
21ad376a2a3 is described below

commit 21ad376a2a337bca13f306c974aa0f1c80053fc1
Author: Summer <[email protected]>
AuthorDate: Fri Feb 28 13:09:13 2025 +0800

    Add -lpf param in ExportData (#14957)
    
    Co-authored-by: 2b3c511 <[email protected]>
---
 .../org/apache/iotdb/tool/common/OptionsUtil.java  | 54 +++++++++++++++++++++-
 .../org/apache/iotdb/tool/data/ExportData.java     |  4 +-
 2 files changed, 55 insertions(+), 3 deletions(-)

diff --git 
a/iotdb-client/cli/src/main/java/org/apache/iotdb/tool/common/OptionsUtil.java 
b/iotdb-client/cli/src/main/java/org/apache/iotdb/tool/common/OptionsUtil.java
index bde4831ea9f..a689ebd1065 100644
--- 
a/iotdb-client/cli/src/main/java/org/apache/iotdb/tool/common/OptionsUtil.java
+++ 
b/iotdb-client/cli/src/main/java/org/apache/iotdb/tool/common/OptionsUtil.java
@@ -311,7 +311,50 @@ public class OptionsUtil extends Constants {
     return options;
   }
 
-  public static Options createTableExportTsFileSqlOptions() {
+  public static Options createTableExportTsFileOptions() {
+    Options options = createTableExportCommonOptions();
+
+    Option opTable =
+        Option.builder(TABLE_ARGS)
+            .longOpt(TABLE_ARGS)
+            .argName(TABLE_ARGS)
+            .hasArg()
+            .required()
+            .desc(TABLE_DESC_EXPORT)
+            .build();
+    options.addOption(opTable);
+
+    Option opDataType =
+        Option.builder(DATA_TYPE_ARGS)
+            .longOpt(DATA_TYPE_NAME)
+            .argName(DATA_TYPE_NAME)
+            .hasArg()
+            .desc(DATA_TYPE_DESC)
+            .build();
+    options.addOption(opDataType);
+
+    Option opTimeFormat =
+        Option.builder(TIME_FORMAT_ARGS)
+            .longOpt(TIME_FORMAT_NAME)
+            .argName(TIME_FORMAT_NAME)
+            .hasArg()
+            .desc(TIME_FORMAT_DESC)
+            .build();
+    options.addOption(opTimeFormat);
+
+    Option opTimeZone =
+        Option.builder(TIME_ZONE_ARGS)
+            .longOpt(TIME_ZONE_NAME)
+            .argName(TIME_ZONE_NAME)
+            .hasArg()
+            .desc(TIME_ZONE_DESC)
+            .build();
+    options.addOption(opTimeZone);
+
+    return options;
+  }
+
+  public static Options createTableExportSqlOptions() {
     Options options = createTableExportCommonOptions();
 
     Option opTable =
@@ -417,6 +460,15 @@ public class OptionsUtil extends Constants {
             .build();
     options.addOption(opAligned);
 
+    Option opLinesPerFile =
+        Option.builder(LINES_PER_FILE_ARGS)
+            .longOpt(LINES_PER_FILE_NAME)
+            .argName(LINES_PER_FILE_NAME)
+            .hasArg()
+            .desc(LINES_PER_FILE_DESC)
+            .build();
+    options.addOption(opLinesPerFile);
+
     Option opTimeFormat =
         Option.builder(TIME_FORMAT_ARGS)
             .longOpt(TIME_FORMAT_NAME)
diff --git 
a/iotdb-client/cli/src/main/java/org/apache/iotdb/tool/data/ExportData.java 
b/iotdb-client/cli/src/main/java/org/apache/iotdb/tool/data/ExportData.java
index 1831cab2fd4..320e31d17ac 100644
--- a/iotdb-client/cli/src/main/java/org/apache/iotdb/tool/data/ExportData.java
+++ b/iotdb-client/cli/src/main/java/org/apache/iotdb/tool/data/ExportData.java
@@ -103,8 +103,8 @@ public class ExportData extends AbstractDataTool {
       if (Constants.SQL_DIALECT_VALUE_TABLE.equalsIgnoreCase(sqlDialectValue)) 
{
         sqlDialectTree = false;
         csvOptions = OptionsUtil.createTableExportCsvOptions();
-        tsFileOptions = OptionsUtil.createTableExportTsFileSqlOptions();
-        sqlOptions = OptionsUtil.createTableExportTsFileSqlOptions();
+        tsFileOptions = OptionsUtil.createTableExportTsFileOptions();
+        sqlOptions = OptionsUtil.createTableExportSqlOptions();
       } else {
         ioTPrinter.println(String.format("sql_dialect %s is not support", 
sqlDialectValue));
         printHelpOptions(

Reply via email to