You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lens.apache.org by "Amareshwari Sriramadasu (JIRA)" <ji...@apache.org> on 2015/02/04 12:34:34 UTC

[jira] [Created] (LENS-274) Add estimate api in driver

Amareshwari Sriramadasu created LENS-274:
--------------------------------------------

             Summary: Add estimate api in driver
                 Key: LENS-274
                 URL: https://issues.apache.org/jira/browse/LENS-274
             Project: Apache Lens
          Issue Type: Improvement
          Components: api
            Reporter: Amareshwari Sriramadasu
             Fix For: 2.1


Add estimate api in LensDriver with following :

* Estimates the query cost
* Should return with very less latency - in 10 of milli seconds.

  /**
   * Estimates the query cost.
   * This should be returned with very less latency - should return in 10 of milli seconds.
   * @param ctx The query context
   *
   * @return The query cost object indicating estimated run time and resource usage.
   * @throws LensException the lens exception if cannot estimate 
   */
  QueryCost estimate(AbstractQueryContext ctx) throws LensException;

h3. Why do we need such api besides explain?

Explain is more elaborative which gives plan of the query with respect to execution as well. When we are using explain for comparison across drivers, we would need only the cost and the full plan is not required. So, this api will be used to know the query cost and pick an appropriate driver quickly.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)