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

ASF GitHub Bot logged work on HIVE-20552:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 16/Jun/20 16:52
            Start Date: 16/Jun/20 16:52
    Worklog Time Spent: 10m 
      Work Description: github-actions[bot] closed pull request #433:
URL: https://github.com/apache/hive/pull/433


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 446664)
    Time Spent: 20m  (was: 10m)

> 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
>             Fix For: 4.0.0, 3.2.0
>
>         Attachments: HIVE-20552.1.patch, HIVE-20552.2.patch, 
> HIVE-20552.3.patch
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> 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
(v8.3.4#803005)

Reply via email to