You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@orc.apache.org by do...@apache.org on 2022/04/29 21:37:35 UTC

[orc] branch branch-1.7 updated: ORC-1133: [C++] Fix csv-import tool options

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

dongjoon pushed a commit to branch branch-1.7
in repository https://gitbox.apache.org/repos/asf/orc.git


The following commit(s) were added to refs/heads/branch-1.7 by this push:
     new fb00012ff ORC-1133: [C++] Fix csv-import tool options
fb00012ff is described below

commit fb00012ff81e8f3b513685a8f9cf9a390e9fe350
Author: Kyle <ky...@gmail.com>
AuthorDate: Fri Mar 25 17:19:03 2022 +0800

    ORC-1133: [C++] Fix csv-import tool options
    
    This closes #1069
    
    (cherry picked from commit 21259815ae665f6a4beac29edb4fab52c2403e13)
    Signed-off-by: Dongjoon Hyun <do...@apache.org>
---
 tools/src/CSVFileImport.cc | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/tools/src/CSVFileImport.cc b/tools/src/CSVFileImport.cc
index 393367bab..280491b3b 100644
--- a/tools/src/CSVFileImport.cc
+++ b/tools/src/CSVFileImport.cc
@@ -301,7 +301,7 @@ int main(int argc, char* argv[]) {
   static struct option longOptions[] = {
     {"help", no_argument, ORC_NULLPTR, 'h'},
     {"delimiter", required_argument, ORC_NULLPTR, 'd'},
-    {"stripe", required_argument, ORC_NULLPTR, 'p'},
+    {"stripe", required_argument, ORC_NULLPTR, 's'},
     {"block", required_argument, ORC_NULLPTR, 'c'},
     {"batch", required_argument, ORC_NULLPTR, 'b'},
     {"timezone", required_argument, ORC_NULLPTR, 't'},
@@ -311,9 +311,8 @@ int main(int argc, char* argv[]) {
   int opt;
   char *tail;
   do {
-    opt = getopt_long(argc, argv, "i:o:s:b:c:p:t:h", longOptions, ORC_NULLPTR);
+    opt = getopt_long(argc, argv, "d:s:c:b:t:h", longOptions, ORC_NULLPTR);
     switch (opt) {
-      case '?':
       case 'h':
         helpFlag = true;
         opt = -1;
@@ -321,7 +320,7 @@ int main(int argc, char* argv[]) {
       case 'd':
         gDelimiter = optarg[0];
         break;
-      case 'p':
+      case 's':
         stripeSize = strtoul(optarg, &tail, 10);
         if (*tail != '\0') {
           fprintf(stderr, "The --stripe parameter requires an integer option.\n");