> On Aug. 22, 2014, 5:36 p.m., John Pullokkaran wrote:
> > branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/optimizer/optiq/translator/SqlFunctionConverter.java,
> >  line 125
> > <https://reviews.apache.org/r/24981/diff/1/?file=667267#file667267line125>
> >
> >     It seems that only change needed is to add unuary plus, minus to 
> > builder table.
> >     registerFunction("++", SqlStdOperatorTable.UNARY_PLUS, 
> > hToken(HiveParser.PLUS, "PLUS"));
> >     registerFunction("--", SqlStdOperatorTable.UNARY_MINUS, 
> > hToken(HiveParser.PLUS, "MINUS"));

I am not sure how this can work, since in both map and reverse lookup map, + is 
overloaded for both unary & binary (+) operators. 
What you suggested can work only if we change annotation description of 
GenericUDFOpNegative in Hive & UnaryMinus in Optiq from - to --.


- Ashutosh


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/24981/#review51296
-----------------------------------------------------------


On Aug. 22, 2014, 3:16 p.m., Ashutosh Chauhan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/24981/
> -----------------------------------------------------------
> 
> (Updated Aug. 22, 2014, 3:16 p.m.)
> 
> 
> Review request for hive and John Pullokkaran.
> 
> 
> Bugs: HIVE-7852
>     https://issues.apache.org/jira/browse/HIVE-7852
> 
> 
> Repository: hive
> 
> 
> Description
> -------
> 
> Handle unary op.
> 
> 
> Diffs
> -----
> 
>   
> branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/optimizer/optiq/translator/SqlFunctionConverter.java
>  1619831 
>   branches/cbo/ql/src/test/queries/clientpositive/cbo_correctness.q 1619831 
>   branches/cbo/ql/src/test/results/clientpositive/cbo_correctness.q.out 
> 1619831 
> 
> Diff: https://reviews.apache.org/r/24981/diff/
> 
> 
> Testing
> -------
> 
> Added new test.
> 
> 
> Thanks,
> 
> Ashutosh Chauhan
> 
>

Reply via email to