You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lens.apache.org by "Rajat Khandelwal (JIRA)" <ji...@apache.org> on 2016/01/08 08:04:39 UTC
[jira] [Commented] (LENS-813) For multifact queries, having clauses
are getting added to both sub queries.
[ https://issues.apache.org/jira/browse/LENS-813?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15088806#comment-15088806 ]
Rajat Khandelwal commented on LENS-813:
---------------------------------------
Posting the thought process here:
* Having clause has a boolean expression
* Hence, having AST is the AST of a boolean expression
* For multi-fact queries, the AST is copied to both facts and then both facts independently resolve expression in the AST recursively.
** If a fact is unable to resolve an expression, it just leaves it as it is.
* Multi-fact queries are by-design queries involving measures not present in a single fact.
* The measures in multi-fact queries are split over the facts.
* Having clause only involves conditions over measures and expressions over them.
* For a multi-fact query, the whole having clause makes sense only after all the measures are in context, which is in the outer query.
* Special cases of having clause can be pushed down. Necessary conditions:
** The boolean expression should be *and* over multiple boolean expressions.
** Each single boolean expression should be evaluable by a single fact.
For the sake of correctness, I'm planning to implement the easier version first, which is to have *having* at the outer query level and the ingredients at inner query level.
> For multifact queries, having clauses are getting added to both sub queries.
> -----------------------------------------------------------------------------
>
> Key: LENS-813
> URL: https://issues.apache.org/jira/browse/LENS-813
> Project: Apache Lens
> Issue Type: Bug
> Components: cube
> Reporter: Rajat Khandelwal
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)