You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tajo.apache.org by blrunner <gi...@git.apache.org> on 2015/01/07 08:16:00 UTC

[GitHub] tajo pull request: TAJO-1260: Add ALTER TABLE ADD/DROP PARTITION s...

GitHub user blrunner opened a pull request:

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

    TAJO-1260: Add ALTER TABLE ADD/DROP PARTITION statement to parser

    I plan to implement ALTER TABLE ADD/DROP PARTITION statement stage by stage. For the first time, I'll add the statement to parser.
    
    * Syntax
    
    ALTER TABLE table_name [IF NOT EXISTS] ADD PARTITION (key1 = 'val2', key2 = 'val2', ...) [LOCATION 'partition_path_of_directory'];
    
    ALTER TABLE table_name [IF NOT EXISTS] DROP PARTITION (key1 = 'val2', key2 = 'val2', ...);

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

    $ git pull https://github.com/blrunner/tajo TAJO-1260

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

    https://github.com/apache/tajo/pull/335.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 #335
    
----
commit ead3c99954ba417852085221bd3b2a2680893be5
Author: JaeHwa Jung <bl...@apache.org>
Date:   2015-01-07T07:14:34Z

    TAJO-1260: Add ALTER TABLE ADD/DROP PARTITION statement to parser

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] tajo pull request: TAJO-1260: Add ALTER TABLE ADD/DROP PARTITION s...

Posted by blrunner <gi...@git.apache.org>.
Github user blrunner commented on the pull request:

    https://github.com/apache/tajo/pull/335#issuecomment-69270517
  
    Hi @hyunsik 
    
    I've just merged the master branch to TAJO-1260 branch.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] tajo pull request: TAJO-1260: Add ALTER TABLE ADD/DROP PARTITION s...

Posted by hyunsik <gi...@git.apache.org>.
Github user hyunsik commented on the pull request:

    https://github.com/apache/tajo/pull/335#issuecomment-72601449
  
    @blrunner Could you trigger TravisCI?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] tajo pull request: TAJO-1260: Add ALTER TABLE ADD/DROP PARTITION s...

Posted by hyunsik <gi...@git.apache.org>.
Github user hyunsik commented on the pull request:

    https://github.com/apache/tajo/pull/335#issuecomment-69447746
  
    ``ALTER TABLE .. [ADD | DROP] PARTITION`` statement will cause error if this statement is given in JDBC driver or tsql. So, could you add some exception handling code to prevent ugly errors?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] tajo pull request: TAJO-1260: Add ALTER TABLE ADD/DROP PARTITION s...

Posted by blrunner <gi...@git.apache.org>.
Github user blrunner commented on the pull request:

    https://github.com/apache/tajo/pull/335#issuecomment-68992733
  
    Hi @hyunsik 
    
    Thanks for your quick review. I used FileUtil.readTextFileFromResource instead of direct paths and I added more unit test cases.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] tajo pull request: TAJO-1260: Add ALTER TABLE ADD/DROP PARTITION s...

Posted by hyunsik <gi...@git.apache.org>.
Github user hyunsik commented on the pull request:

    https://github.com/apache/tajo/pull/335#issuecomment-72958948
  
    +1 ship it. Thanks.
    
    It should be committed to only master branch.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] tajo pull request: TAJO-1260: Add ALTER TABLE ADD/DROP PARTITION s...

Posted by blrunner <gi...@git.apache.org>.
Github user blrunner commented on the pull request:

    https://github.com/apache/tajo/pull/335#issuecomment-72773906
  
    @hyunsik 
    
    Sure, I've just triggered it. :)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] tajo pull request: TAJO-1260: Add ALTER TABLE ADD/DROP PARTITION s...

Posted by hyunsik <gi...@git.apache.org>.
Github user hyunsik commented on the pull request:

    https://github.com/apache/tajo/pull/335#issuecomment-69169946
  
    Could you trigger the travisCI job?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] tajo pull request: TAJO-1260: Add ALTER TABLE ADD/DROP PARTITION s...

Posted by blrunner <gi...@git.apache.org>.
Github user blrunner commented on the pull request:

    https://github.com/apache/tajo/pull/335#issuecomment-71165638
  
    Hi @hyunsik 
    
    I added the exception handling code. If possible, could you check the pathch again?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] tajo pull request: TAJO-1260: Add ALTER TABLE ADD/DROP PARTITION s...

Posted by hyunsik <gi...@git.apache.org>.
Github user hyunsik commented on a diff in the pull request:

    https://github.com/apache/tajo/pull/335#discussion_r22575086
  
    --- Diff: tajo-core/src/test/java/org/apache/tajo/engine/parser/TestSQLAnalyzer.java ---
    @@ -367,6 +364,59 @@ public void testCreateTablePartitionByColumn() throws IOException {
       }
     
       @Test
    +  public void testAlterTableAddPartition1() throws IOException {
    +    String sql = FileUtil.readTextFile(new File("src/test/resources/queries/default/alter_table_add_partition_1.sql"));
    --- End diff --
    
    could you use FileUtil.readTextFileFromResource instead of direct paths? Direct path can cause errors without setting a base directory.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] tajo pull request: TAJO-1260: Add ALTER TABLE ADD/DROP PARTITION s...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] tajo pull request: TAJO-1260: Add ALTER TABLE ADD/DROP PARTITION s...

Posted by hyunsik <gi...@git.apache.org>.
Github user hyunsik commented on the pull request:

    https://github.com/apache/tajo/pull/335#issuecomment-69288694
  
    +1
    The patch looks good to me. 
    
    BTW, you need to consider inequality expression in DROP PARTITION. But, the current patch is good starting point. We can improve it later in another jira.
    ```sql
    ALTER TABLE table_name [IF EXISTS] DROP PARTITION  (key1 [=|<|<=|>|>=|!=] 'val1', key2 ...,);
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] tajo pull request: TAJO-1260: Add ALTER TABLE ADD/DROP PARTITION s...

Posted by hyunsik <gi...@git.apache.org>.
Github user hyunsik commented on the pull request:

    https://github.com/apache/tajo/pull/335#issuecomment-71201071
  
    Sure, I'll review it soon.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---