[
https://issues.apache.org/jira/browse/FLINK-13197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16989518#comment-16989518
]
Dawid Wysakowicz edited comment on FLINK-13197 at 12/6/19 8:27 AM:
-------------------------------------------------------------------
[~lirui] View is not just a "query". It is closer to a Table than to a query.
There can be a whole query built on top of a view that assumed correct
information retrieved from the catalog. Moreover view can be even writable if
certain requirements are met.
[~danny0405] I fully agree with you we should not introduce redundant cast. I
am not sure though if the cast we are talking about is redundant.
* It cannot be solved through DDL. The views are not always created from Flink.
We also need to support views created in Hive externally.
* How does type inference relate in this case? If I am not mistaken Hive (at
least in earlier versions) will always give you nullable types for literals
when calcite will derive not null types which will never match.
BTW If I am not mistaken the utility method I suggest to use will not add
additional cast nodes if the types and names match.
was (Author: dawidwys):
[~lirui] View is not just a "query". It is closer to a Table than to a query.
There can be a whole query built on top of a view that assumed correct
information retrieved from the catalog. Moreover view can be even writable if
certain requirements are met.
[~danny0405] I fully agree with you we should not introduce redundant cast. I
am not sure though if the cast we are talking about is redundant.
* It cannot be solved through DDL. The views are not always created from Flink.
We also need to support views created in Hive externally.
* How does type inference relate in this case? If I am not mistaken Hive (at
least in earlier versions) will always give you nullable types for literals
when calcite will derive not null types which will never match.
> 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)