Uploaded image for project: 'Tajo'
  1. Tajo
  2. TAJO-960

TajoCli's problem does not show the current status

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9.0
    • Component/s: None
    • Labels:
      None

      Description

      TajoCli is designed to show the status of completeness of SQL statements.

      For example, it should work as follows:

      tpch> CREATE TABLE T1 (
      > l_orderkey INT,
      > l_partkey INT)
      > 
      Created T1
      
      tpch> SELECT 
      > t1,
      > ..
      

      But, the current TajoCli does not handle this status. So, it works as follows:

      tpch> CREATE TABLE T1 (
      tpch> t1 int,
      tpch> t2 int);
      Created T1
      tpch>
      

      Users cannot know if current status continues to take statements or is a ready status to start new statement.

      The solution is to place executeParsedResults(parsedResults); and currentPrompt = updatePrompt(parser.getState()); to outside of if (parsedResults.size() > 0) statement.

      if (parsedResults.size() > 0) {
                for (ParsedResult parsed : parsedResults) {
                  history.addStatement(parsed.getHistoryStatement() + (parsed.getType() == STATEMENT ? ";" : ""));
                }
                executeParsedResults(parsedResults);
                currentPrompt = updatePrompt(parser.getState());
              }
      

        Activity

        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-master-build #305 (See https://builds.apache.org/job/Tajo-master-build/305/)
        TAJO-960: TajoCli's problem does not show the current status. (hyunsik: rev 40ae9c048e388ccb9e058fe27dc4f0b9d582fbff)

        • tajo-client/src/main/java/org/apache/tajo/cli/TajoCli.java
        • CHANGES
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-master-build #305 (See https://builds.apache.org/job/Tajo-master-build/305/ ) TAJO-960 : TajoCli's problem does not show the current status. (hyunsik: rev 40ae9c048e388ccb9e058fe27dc4f0b9d582fbff) tajo-client/src/main/java/org/apache/tajo/cli/TajoCli.java CHANGES
        Hide
        hyunsik Hyunsik Choi added a comment -

        Thank you for the quick review. committed it to master.

        Show
        hyunsik Hyunsik Choi added a comment - Thank you for the quick review. committed it to master.
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user asfgit closed the pull request at:

        https://github.com/apache/tajo/pull/83

        Show
        githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/tajo/pull/83
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user blrunner commented on the pull request:

        https://github.com/apache/tajo/pull/83#issuecomment-49545084

        +1

        Good idea! The patch ran as expected on my testing cluster.
        Push it.

        Show
        githubbot ASF GitHub Bot added a comment - Github user blrunner commented on the pull request: https://github.com/apache/tajo/pull/83#issuecomment-49545084 +1 Good idea! The patch ran as expected on my testing cluster. Push it.
        Hide
        githubbot ASF GitHub Bot added a comment -

        GitHub user hyunsik opened a pull request:

        https://github.com/apache/tajo/pull/83

        TAJO-960: TajoCli's problem does not show the current status.

        You can merge this pull request into a Git repository by running:

        $ git pull https://github.com/hyunsik/tajo TAJO-960

        Alternatively you can review and apply these changes as the patch at:

        https://github.com/apache/tajo/pull/83.patch

        To close this pull request, make a commit to your master/trunk branch
        with (at least) the following in the commit message:

        This closes #83


        commit b01e4635929eb6300150bc3b4cd67d1f544a1adb
        Author: Hyunsik Choi <hyunsik@apache.org>
        Date: 2014-07-20T08:46:59Z

        TAJO-960: TajoCli's problem does not show the current status.


        Show
        githubbot ASF GitHub Bot added a comment - GitHub user hyunsik opened a pull request: https://github.com/apache/tajo/pull/83 TAJO-960 : TajoCli's problem does not show the current status. You can merge this pull request into a Git repository by running: $ git pull https://github.com/hyunsik/tajo TAJO-960 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/tajo/pull/83.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #83 commit b01e4635929eb6300150bc3b4cd67d1f544a1adb Author: Hyunsik Choi <hyunsik@apache.org> Date: 2014-07-20T08:46:59Z TAJO-960 : TajoCli's problem does not show the current status.

          People

          • Assignee:
            hyunsik Hyunsik Choi
            Reporter:
            hyunsik Hyunsik Choi
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development