> On Oct. 18, 2016, 6:51 a.m., pengcheng xiong wrote:
> > ql/src/java/org/apache/hadoop/hive/ql/parse/IdentifiersParser.g, line 445
> > <https://reviews.apache.org/r/52427/diff/3/?file=1535054#file1535054line445>
> >
> >     change this to
> >     {code}
> >     precedenceConcatenateExpression
> >         :
> >         (precedencePlusExpression -> precedencePlusExpression)
> >         (
> >         precedenceConcatenateOperator plus=precedencePlusExpression
> >         -> ^(TOK_FUNCTION {adaptor.create(Identifier, "concat")} 
> > {$precedenceConcatenateExpression.tree} $plus)
> >         )*
> >         -> {$precedenceConcatenateExpression.tree}
> >         ;
> >     {code}
> >     So that we can finish the rewriting in the parser.

i've experimented with the same thing...but I was unable to put it together ;)

thank you for showing it, its far better than that ugly ast rewrite...


> On Oct. 18, 2016, 6:51 a.m., pengcheng xiong wrote:
> > ql/src/test/queries/clientpositive/concat_op.q, line 3
> > <https://reviews.apache.org/r/52427/diff/3/?file=1535056#file1535056line3>
> >
> >     Please confirm that Postgres and/Oracle returns the same result.

If the question is about and/or precedence vs other databases: then yes, hive 
is consistent with them.

I've added a more complete check of the same thing at the end of the qfile - I 
just wanted to check it; and didn't notice it being left in the qfile...but it 
should never break...so I guess its better to add it.


- Zoltan


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


On Oct. 18, 2016, 3:06 p.m., Zoltan Haindrich wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52427/
> -----------------------------------------------------------
> 
> (Updated Oct. 18, 2016, 3:06 p.m.)
> 
> 
> Review request for hive, Ashutosh Chauhan and pengcheng xiong.
> 
> 
> Bugs: HIVE-14580
>     https://issues.apache.org/jira/browse/HIVE-14580
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> adds support for || text concatenation
> 
> * reuses the concat udf for doing the real work
> * same precedence as + / - ; I think this is expected
> * small ast rewrite code in SemanticAnalyzer
> * details about other db || operators: 
> https://issues.apache.org/jira/browse/HIVE-14580?focusedCommentId=15546578&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15546578
> 
> 
> Diffs
> -----
> 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/HiveLexer.g 
> 5d3fa6aeea5251e461c4b0a8277b4ff1b55f9115 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/IdentifiersParser.g 
> 50987c391e435f4e3c71243e90af89fc52f380aa 
>   ql/src/test/queries/clientpositive/concat_op.q PRE-CREATION 
>   ql/src/test/results/clientpositive/concat_op.q.out PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/52427/diff/
> 
> 
> Testing
> -------
> 
> added qtest
> 
> 
> Thanks,
> 
> Zoltan Haindrich
> 
>

Reply via email to