hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hive QA (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-20552) Get Schema from LogicalPlan faster
Date Fri, 14 Sep 2018 07:52:00 GMT

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

Hive QA commented on HIVE-20552:
--------------------------------



Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12939550/HIVE-20552.2.patch

{color:red}ERROR:{color} -1 due to build exiting with an error

Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/13775/testReport
Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/13775/console
Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-13775/

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
Tests exited with: Exception: Patch URL https://issues.apache.org/jira/secure/attachment/12939550/HIVE-20552.2.patch
was found in seen patch url's cache and a test was probably run already on it. Aborting...
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12939550 - PreCommit-HIVE-Build

> Get Schema from LogicalPlan faster
> ----------------------------------
>
>                 Key: HIVE-20552
>                 URL: https://issues.apache.org/jira/browse/HIVE-20552
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Teddy Choi
>            Assignee: Teddy Choi
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: HIVE-20552.1.patch, HIVE-20552.2.patch
>
>
> To get the schema of a query faster, it currently needs to compile, optimize, and generate
a TezPlan, which creates extra overhead when only the LogicalPlan is needed.
> 1. Copy the method \{{HiveMaterializedViewsRegistry.parseQuery}}, making it \{{public
static}} and putting it in a utility class. 
> 2. Change the return statement of the method to \{{return analyzer.getResultSchema();}}
> 3. Change the return type of the method to \{{List<FieldSchema>}}
> 4. Call the new method from \{{GenericUDTFGetSplits.createPlanFragment}} replacing the
current code which does this:
> {code}
>  if(num == 0) {
>  //Schema only
>  return new PlanFragment(null, schema, null);
>  }
> {code}
> moving the call earlier in \{{getPlanFragment}} ... right after the HiveConf is created
... bypassing the code that uses \{{HiveTxnManager}} and \{{Driver}}.
> 5. Convert the \{{List<FieldSchema>}} to \{{org.apache.hadoop.hive.llap.Schema}}.
> 6. return from \{{getPlanFragment}} by returning \{{new PlanFragment(null, schema, null)}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message