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

Danny Chen commented on FLINK-13197:
------------------------------------

Checking out the code of `RelOptUtil#createCastRel`, i'm wondering if we can 
rename the LogicalProject directly without add any above new projections with 
casts. After all, the code already rename the project with the constructor:

{code:java}
    if (rename) {
      // Use names and types from castRowType.
      return projectFactory.createProject(rel, castExps,
          castRowType.getFieldNames());
    }
{code}

So i thought if we can"
# If the view rel root node is a LogicalProject, get its input then construct 
the new project with the renamed one.
# If the view rel is not a LogicalProject, add a project above it with renamed 
input refs.


> support querying Hive's view in Flink
> -------------------------------------
>
>                 Key: FLINK-13197
>                 URL: https://issues.apache.org/jira/browse/FLINK-13197
>             Project: Flink
>          Issue Type: Improvement
>          Components: Connectors / Hive
>            Reporter: Bowen Li
>            Assignee: Rui Li
>            Priority: Major
>             Fix For: 1.10.0
>
>
> One goal of HiveCatalog and hive integration is to enable Flink-Hive 
> interoperability, that is Flink should understand existing Hive meta-objects, 
> and Hive meta-objects created thru Flink should be understood by Hive.
> Taking an example of a Hive view v1 in HiveCatalog and database hc.db. Unlike 
> an equivalent Flink view whose full path in expanded query should be 
> hc.db.v1, the Hive view's full path in the expanded query should be db.v1 
> such that Hive can understand it, no matter it's created by Hive or Flink.
> [~lirui] can you help to ensure that Flink can also query Hive's view in both 
> Flink planner and Blink planner?
> cc [~xuefuz]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to