[ 
https://issues.apache.org/jira/browse/ASTERIXDB-2760?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17162325#comment-17162325
 ] 

ASF subversion and git services commented on ASTERIXDB-2760:
------------------------------------------------------------

Commit a51c80ea0b95dd6ea6ce6b1c69825f76e24f5ec5 in asterixdb's branch 
refs/heads/master from Dmitry Lychagin
[ https://gitbox.apache.org/repos/asf?p=asterixdb.git;h=a51c80e ]

[ASTERIXDB-2760][COMP] Improve function call resolution

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Refactor function call resolution and perform it earlier,
  before GROUP BY expressions are substituted
- Consolidate gby-expr testcases into a single one
- Introduce QueryTranslator.handleDeclareFunctionStatement()
- Rename existing SqlppCaseExpressionVisitor to
  SqlppCaseAggregateExtractionVisitor
- Move CASE expression rewriting code from
  SqlppBuiltinFunctionRewriteVisitor into a separate visitor:
  SqlppCaseExpressionVisitor
- Remove function name normalization code from SqlppAstPrintVisitor
  and updated existing reference results

Change-Id: I527ffbff487b8534f66ca27d48788e96c65aec9b
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/7264
Integration-Tests: Jenkins <[email protected]>
Tested-by: Jenkins <[email protected]>
Reviewed-by: Dmitry Lychagin <[email protected]>
Reviewed-by: Ali Alsuliman <[email protected]>


> Group by expression substitution must be case insensitive for builtin 
> function names
> ------------------------------------------------------------------------------------
>
>                 Key: ASTERIXDB-2760
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-2760
>             Project: Apache AsterixDB
>          Issue Type: Bug
>          Components: COMP - Compiler
>    Affects Versions: 0.9.4
>            Reporter: Dmitry Lychagin
>            Assignee: Dmitry Lychagin
>            Priority: Major
>             Fix For: 0.9.6
>
>
> When a grouping expression is used in the SELECT clause the compiler replaces 
> the expression in the SELECT clause with a variable assigned to that 
> expression by the  GROUP BY clause.
> {noformat}
> SELECT f(x) FROM ds GROUP BY f(x) AS y
> {noformat}
> is rewritten by the compiler into 
> {noformat}
> SELECT y FROM ds GROUP BY f(x) AS y
> {noformat}
> However when comparing GROUP BY / SELECT expressions the compiler currently 
> compares function names in a case-sensitive fashion (function names are not 
> yet normalized at that point). This is incorrect for built-in functions 
> because their names are supposed to be case insensitive.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to