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

Supports parameter values in the SQL file.

    Details

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

      Description

      In the case of running a SQL file in CLI mode, should be able to pass as a parameter value. See bellow use case.

      test.sql

      select * from lineitem where l_tax > ${tax} and l_discount > ${discount}
      
      bin/tsql -f ./test.sql --param tax=10 --param discount=20
      
      1. TAJO-758_2.patch
        7 kB
        Hyoungjun Kim
      2. TAJO-758.patch
        6 kB
        Hyoungjun Kim

        Activity

        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-master-build #203 (See https://builds.apache.org/job/Tajo-master-build/203/)

        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-master-build #203 (See https://builds.apache.org/job/Tajo-master-build/203/ )
        Hide
        hyunsik Hyunsik Choi added a comment -

        committed it to master branch.

        Show
        hyunsik Hyunsik Choi added a comment - committed it to master branch.
        Hide
        hyunsik Hyunsik Choi added a comment - - edited

        +1

        Thank you for your contribution. It would be a very useful feature.

        Show
        hyunsik Hyunsik Choi added a comment - - edited +1 Thank you for your contribution. It would be a very useful feature.
        Hide
        tajoqa Tajo QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12641641/TAJO-758_2.patch
        against master revision 8c92a9d.

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 1 new or modified test files.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 javadoc. The applied patch does not increase the total number of javadoc warnings.

        +1 checkstyle. The patch generated 0 code style errors.

        -1 findbugs. The patch appears to cause Findbugs (version 1.3.9) to fail.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed unit tests in tajo-client tajo-core.

        Test results: https://builds.apache.org/job/PreCommit-TAJO-Build/384//testReport/
        Findbugs results: https://builds.apache.org/job/PreCommit-TAJO-Build/384//findbugsResult
        Console output: https://builds.apache.org/job/PreCommit-TAJO-Build/384//console

        This message is automatically generated.

        Show
        tajoqa Tajo QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12641641/TAJO-758_2.patch against master revision 8c92a9d. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 1 new or modified test files. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 javadoc. The applied patch does not increase the total number of javadoc warnings. +1 checkstyle. The patch generated 0 code style errors. -1 findbugs. The patch appears to cause Findbugs (version 1.3.9) to fail. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed unit tests in tajo-client tajo-core. Test results: https://builds.apache.org/job/PreCommit-TAJO-Build/384//testReport/ Findbugs results: https://builds.apache.org/job/PreCommit-TAJO-Build/384//findbugsResult Console output: https://builds.apache.org/job/PreCommit-TAJO-Build/384//console This message is automatically generated.
        Hide
        hjkim Hyoungjun Kim added a comment -

        Rebase and fix TestTajoCli error.

        Show
        hjkim Hyoungjun Kim added a comment - Rebase and fix TestTajoCli error.
        Hide
        tajoqa Tajo QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12640042/TAJO-758.patch
        against master revision 8982684.

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 1 new or modified test files.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 javadoc. The applied patch does not increase the total number of javadoc warnings.

        +1 checkstyle. The patch generated 0 code style errors.

        -1 findbugs. The patch appears to introduce 201 new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        -1 core tests. The patch failed these unit tests in tajo-client tajo-core/tajo-core-backend:
        org.apache.tajo.cli.TestTajoCli

        Test results: https://builds.apache.org/job/PreCommit-TAJO-Build/339//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-TAJO-Build/339//artifact/incubator-tajo/patchprocess/newPatchFindbugsWarningstajo-core-backend.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-TAJO-Build/339//artifact/incubator-tajo/patchprocess/newPatchFindbugsWarningstajo-client.html
        Console output: https://builds.apache.org/job/PreCommit-TAJO-Build/339//console

        This message is automatically generated.

        Show
        tajoqa Tajo QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12640042/TAJO-758.patch against master revision 8982684. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 1 new or modified test files. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 javadoc. The applied patch does not increase the total number of javadoc warnings. +1 checkstyle. The patch generated 0 code style errors. -1 findbugs. The patch appears to introduce 201 new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed these unit tests in tajo-client tajo-core/tajo-core-backend: org.apache.tajo.cli.TestTajoCli Test results: https://builds.apache.org/job/PreCommit-TAJO-Build/339//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-TAJO-Build/339//artifact/incubator-tajo/patchprocess/newPatchFindbugsWarningstajo-core-backend.html Findbugs warnings: https://builds.apache.org/job/PreCommit-TAJO-Build/339//artifact/incubator-tajo/patchprocess/newPatchFindbugsWarningstajo-client.html Console output: https://builds.apache.org/job/PreCommit-TAJO-Build/339//console This message is automatically generated.
        Hide
        hjkim Hyoungjun Kim added a comment -

        I attached a patch. Please review. Thanks

        Show
        hjkim Hyoungjun Kim added a comment - I attached a patch. Please review. Thanks
        Hide
        hjkim Hyoungjun Kim added a comment -

        Additionally configuration value is able to pass to Tajo Shell.

        bin/tsql -f ./test.sql --conf tajo.cli.print.pause=false
        
        Show
        hjkim Hyoungjun Kim added a comment - Additionally configuration value is able to pass to Tajo Shell. bin/tsql -f ./test.sql --conf tajo.cli.print.pause=false

          People

          • Assignee:
            hjkim Hyoungjun Kim
            Reporter:
            hjkim Hyoungjun Kim
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development