Tabnine Logo
DriverQueryPlan.getPlan
Code IndexAdd Tabnine to your IDE (free)

How to use
getPlan
method
in
org.apache.lens.server.api.driver.DriverQueryPlan

Best Java code snippets using org.apache.lens.server.api.driver.DriverQueryPlan.getPlan (Showing top 3 results out of 315)

origin: apache/lens

 /**
  * To query plan.
  *
  * @return the query plan
  * @throws UnsupportedEncodingException the unsupported encoding exception
  */
 public QueryPlan toQueryPlan() throws UnsupportedEncodingException {
  return new QueryPlan(new ArrayList<>(tablesQueried), hasSubQuery, execMode != null ? execMode.name() : null,
   scanMode != null ? scanMode.name() : null, handle,
   URLEncoder.encode(getPlan(), "UTF-8"), new QueryCostTOBuilder(getCost()).build());
 }
}
origin: org.apache.lens/lens-server-api

 /**
  * To query plan.
  *
  * @return the query plan
  * @throws UnsupportedEncodingException the unsupported encoding exception
  */
 public QueryPlan toQueryPlan() throws UnsupportedEncodingException {
  return new QueryPlan(new ArrayList<>(tablesQueried), hasSubQuery, execMode != null ? execMode.name() : null,
   scanMode != null ? scanMode.name() : null, handle,
   URLEncoder.encode(getPlan(), "UTF-8"), new QueryCostTOBuilder(getCost()).build());
 }
}
origin: apache/lens

/**
 * Test explain output.
 *
 * @throws Exception the exception
 */
@Test
public void testExplainOutput() throws Exception {
 int handleSize = getHandleSize();
 createTestTable("explain_test_1");
 createTestTable("explain_test_2");
 SessionState.setCurrentSessionState(ss);
 DriverQueryPlan plan = driver.explain(createExplainContext("SELECT explain_test_1.ID, count(1) FROM "
   + " explain_test_1  join explain_test_2 on explain_test_1.ID = explain_test_2.ID"
   + " WHERE explain_test_1.ID = 'foo' or explain_test_2.ID = 'bar'" + " GROUP BY explain_test_1.ID",
  queryConf));
 assertHandleSize(handleSize);
 assertTrue(plan instanceof HiveQueryPlan);
 assertNotNull(plan.getTablesQueried());
 assertEquals(plan.getTablesQueried().size(), 2);
 assertNotNull(plan.getTableWeights());
 assertTrue(plan.getTableWeights().containsKey(dataBase + ".explain_test_1"));
 assertTrue(plan.getTableWeights().containsKey(dataBase + ".explain_test_2"));
 assertTrue(plan.getPlan() != null && !plan.getPlan().isEmpty());
 driver.closeQuery(plan.getHandle());
}
org.apache.lens.server.api.driverDriverQueryPlangetPlan

Javadoc

Get the query plan

Popular methods of DriverQueryPlan

  • getPartitions
    Get list of partitions queried for each table
  • getTableWeights
    Get the table weights
  • setPrepareHandle
  • getCost
    Get the cost associated with the plan
  • getHandle
  • getTableWeight
    Get the weight of the table.
  • getTablesQueried
    Get the list of tables to be queried
  • toQueryPlan
    To query plan.

Popular in Java

  • Making http requests using okhttp
  • setContentView (Activity)
  • setRequestProperty (URLConnection)
  • notifyDataSetChanged (ArrayAdapter)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Join (org.hibernate.mapping)
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now