Github user sureshsubbiah commented on a diff in the pull request:

    https://github.com/apache/trafodion/pull/1420#discussion_r164610299
  
    --- Diff: core/sql/regress/udr/EXPECTED103 ---
    @@ -396,6 +458,68 @@ CREATE LIBRARY TRAFODION.UDR103SCH.FUNCTIONSFORTEST103 
FILE '/mnt2/ansharma/ansh
     +>  library functionsForTest103
     +>  deterministic no sql final call allow any parallelism state area size 
1024 ;
     
    +--- SQL operation complete.
    +>>
    +>>create function nonDeterministicRandom
    ++>  () returns (r integer)
    ++>  language c parameter style sql external name 'nonDeterministicRandom'
    ++>  library functionsForTest103
    ++>  not deterministic no sql final call allow any parallelism state area 
size 1024 ;
    +
    +--- SQL operation complete.
    +>>
    +>>cqd nested_joins 'off';
    +
    +--- SQL operation complete.
    +>>cqd merge_joins 'off';
    +
    +--- SQL operation complete.
    +>>cqd join_order_by_user 'on';
    +
    +--- SQL operation complete.
    +>>prepare s from
    ++>select a, nonDeterministicRandom() r1,
    ++>       generateRandomNumber(a, 4) r2, generateRandomNumber(123, 4) r3
    ++>from (values (1), (2), (3)) T(a);
    +
    +--- SQL command prepared.
    +>>explain options 'f' s;
    --- End diff --
    
    Will we get the same join order every time? I wonder what in the compiler 
affects the join order for such a query. This is a general question, not 
specific to this change.


---

Reply via email to