You are viewing a plain text version of this content. The canonical link for it is here.
Posted to codereview@trafodion.apache.org by traflm <gi...@git.apache.org> on 2018/06/25 00:51:53 UTC

[GitHub] trafodion pull request #1619: [TRAFODION-3101] enhance get command to show r...

GitHub user traflm opened a pull request:

    https://github.com/apache/trafodion/pull/1619

    [TRAFODION-3101] enhance get command to show rows get

    At field, engineers issue get tables to list all tables, and want to count how many tables got, it will be good to show that info by 'get' command itself.
    The current implementation is to show that count as part of get command output, just as header info.

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

    $ git pull https://github.com/traflm/trafodion TRAFODION-3101

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

    https://github.com/apache/trafodion/pull/1619.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 #1619
    
----
commit 591e0fa60a13f9f57eee1bc7a9b35fe5a10145a2
Author: Liu Ming <ov...@...>
Date:   2018-06-25T00:48:37Z

    [TRAFODION-3101] enhance get command to show rows get

----


---

[GitHub] trafodion pull request #1619: [TRAFODION-3101] enhance get command to show r...

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

    https://github.com/apache/trafodion/pull/1619#discussion_r197666711
  
    --- Diff: core/sql/executor/ExExeUtilGet.cpp ---
    @@ -949,6 +949,7 @@ short ExExeUtilGetMetadataInfoTcb::displayHeading()
     {
       if (getMItdb().noHeader())
         {
    +printf("LMDBG noheader is true\n");
    --- End diff --
    
    sorry, I will remove this...


---

[GitHub] trafodion pull request #1619: [TRAFODION-3101] enhance get command to show r...

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

    https://github.com/apache/trafodion/pull/1619#discussion_r197692791
  
    --- Diff: core/sql/regress/compGeneral/EXPECTED023 ---
    @@ -23,6 +23,10 @@ SB_HISTOGRAMS
     SB_HISTOGRAM_INTERVALS
     SB_PERSISTENT_SAMPLES
     
    +=======================
    --- End diff --
    
    Let me change it step by step.


---

[GitHub] trafodion pull request #1619: [TRAFODION-3101] enhance get command to show r...

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

    https://github.com/apache/trafodion/pull/1619


---

[GitHub] trafodion pull request #1619: [TRAFODION-3101] enhance get command to show r...

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

    https://github.com/apache/trafodion/pull/1619#discussion_r197905685
  
    --- Diff: core/sql/regress/compGeneral/EXPECTED023 ---
    @@ -23,6 +23,10 @@ SB_HISTOGRAMS
     SB_HISTOGRAM_INTERVALS
     SB_PERSISTENT_SAMPLES
     
    +=======================
    --- End diff --
    
    This is not that much of science fiction. 
    get commands can be used as derived tables within selects.
    
    For ex: one can do the following to get this result:
    >>create table if not exists "finance" (a int);
    
    --- SQL operation complete.
    >>select left(b, 10) from
    +>((select * from (get tables in schema sch) x(a))
    +> union all
    +> (select * from (get users) x(a))) z(b)
    +>where b like 'finance%';
    
    (EXPR)                                  
    ----------------------------------------
    
    finance                                 
    
    --- 1 row(s) selected.
    >>



---

[GitHub] trafodion pull request #1619: [TRAFODION-3101] enhance get command to show r...

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

    https://github.com/apache/trafodion/pull/1619#discussion_r197692662
  
    --- Diff: core/sql/regress/compGeneral/EXPECTED023 ---
    @@ -23,6 +23,10 @@ SB_HISTOGRAMS
     SB_HISTOGRAM_INTERVALS
     SB_PERSISTENT_SAMPLES
     
    +=======================
    --- End diff --
    
    I agree, this looks much better!


---

[GitHub] trafodion pull request #1619: [TRAFODION-3101] enhance get command to show r...

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

    https://github.com/apache/trafodion/pull/1619#discussion_r197922161
  
    --- Diff: core/sql/regress/compGeneral/EXPECTED023 ---
    @@ -23,6 +23,10 @@ SB_HISTOGRAMS
     SB_HISTOGRAM_INTERVALS
     SB_PERSISTENT_SAMPLES
     
    +=======================
    --- End diff --
    
    Very cool, thanks!


---

[GitHub] trafodion pull request #1619: [TRAFODION-3101] enhance get command to show r...

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

    https://github.com/apache/trafodion/pull/1619#discussion_r197893009
  
    --- Diff: core/sql/regress/compGeneral/EXPECTED023 ---
    @@ -23,6 +23,10 @@ SB_HISTOGRAMS
     SB_HISTOGRAM_INTERVALS
     SB_PERSISTENT_SAMPLES
     
    +=======================
    --- End diff --
    
    Agree with Venkat. The GET statement should behave like a SELECT as much as possible. Ideally, we would someday allow it in places where we allow select:
    
    ```
    select *
    from (get users union all get schemas) T(o)
    where o like 'finance%'
    ```
    
    I know, that's science fiction for now, but it would be good to make sure this will some day be possible.


---

[GitHub] trafodion pull request #1619: [TRAFODION-3101] enhance get command to show r...

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

    https://github.com/apache/trafodion/pull/1619#discussion_r197666875
  
    --- Diff: core/sql/regress/compGeneral/EXPECTED023 ---
    @@ -23,6 +23,10 @@ SB_HISTOGRAMS
     SB_HISTOGRAM_INTERVALS
     SB_PERSISTENT_SAMPLES
     
    +=======================
    --- End diff --
    
    Would it be better to change the GET output like SELECT where we say "n row(s) returned" where n >=0


---