hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Barna Zsombor Klara (JIRA)" <>
Subject [jira] [Commented] (HIVE-14226) Invalid check on an ASTNode#toStringTree in CalcitePlanner
Date Wed, 13 Jul 2016 14:42:20 GMT


Barna Zsombor Klara commented on HIVE-14226:

Hi [~jcamachorodriguez],
I would like to provide a meaningful unit test for this case, but I am a bit lost in the CalcitePlanner.
My first approach was to generate a simple syntax tree containing a TOK_FUNCTIONDI, then set
it on the QueryBlock of a CalcitePlanner, and call the CalcitePlanner#getOptimizedAST, but
it seems the QueryBlock needs a lot more setup than just an ASTNode to work properly.
Since you are handling CBO jiras, could you maybe help me with a better approach?

Alternatively I can provide a unit test of an ASTNode showing that TOK_FUNCTIONDI and other
tokens are indeed turned lowercase in the string tree.

> Invalid check on an ASTNode#toStringTree in CalcitePlanner
> ----------------------------------------------------------
>                 Key: HIVE-14226
>                 URL:
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Barna Zsombor Klara
>            Priority: Minor
> The patch for HIVE-12590 has modified the string tree representation of an ASTNode, so
that everything except string literals are now lowercase.
> However CalcitePlanner#genSelectLogicalPlan is still checking the occurrence of an uppercase
TOK_FUNCTIONDI constant in the string tree.
> (Line 2997 in CalcitePlanner on master)
> I think this check will never evaluate to true, so we should either be using a lowercase
String, or remove the check if it is unnecessary.

This message was sent by Atlassian JIRA

View raw message