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

TajoCli's problem does not show the current status

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • None
    • 0.9.0
    • None
    • 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());
              }
      

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: