You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Flink Jira Bot (Jira)" <ji...@apache.org> on 2021/07/02 22:40:01 UTC
[jira] [Updated] (FLINK-22884) Select view columns fail when store
metadata with hive
[ https://issues.apache.org/jira/browse/FLINK-22884?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Flink Jira Bot updated FLINK-22884:
-----------------------------------
Labels: pull-request-available stale-assigned (was: pull-request-available)
I am the [Flink Jira Bot|https://github.com/apache/flink-jira-bot/] and I help the community manage its development. I see this issue is assigned but has not received an update in 14 days, so it has been labeled "stale-assigned".
If you are still working on the issue, please remove the label and add a comment updating the community on your progress. If this issue is waiting on feedback, please consider this a reminder to the committer/reviewer. Flink is a very active project, and so we appreciate your patience.
If you are no longer working on the issue, please unassign yourself so someone else may work on it. If the "warning_label" label is not removed in 7 days, the issue will be automatically unassigned.
> Select view columns fail when store metadata with hive
> ------------------------------------------------------
>
> Key: FLINK-22884
> URL: https://issues.apache.org/jira/browse/FLINK-22884
> Project: Flink
> Issue Type: Bug
> Components: Connectors / Hive
> Affects Versions: 1.13.1
> Reporter: ELLEX_SHEN
> Assignee: Rui Li
> Priority: Major
> Labels: pull-request-available, stale-assigned
>
> I am use hive for filnk metadata, so select view table will mismatch to hive table after create view, I founded is a bug in HiveCatalog.classs, all view table is default mark to hive table unexpected.
> after store in hive metadata, view table without "is_generic" or "connector" properties.
> bug is here:
> @VisibleForTesting
> public Table getHiveTable(ObjectPath tablePath) throws TableNotExistException {
> try {
> Table table = this.client.getTable(tablePath.getDatabaseName(), tablePath.getObjectName());
> boolean isHiveTable;
> if (table.getParameters().containsKey("is_generic")) {
> isHiveTable = !Boolean.parseBoolean((String)table.getParameters().remove("is_generic"));
> } else {
> isHiveTable = !table.getParameters().containsKey("flink." + FactoryUtil.CONNECTOR.key()) && !table.getParameters().containsKey("flink.connector.type");
> }
> if (isHiveTable) {
> table.getParameters().put(FactoryUtil.CONNECTOR.key(), "hive");
> }
> return table;
> } catch (NoSuchObjectException var4) {
> throw new TableNotExistException(this.getName(), tablePath);
> } catch (TException var5) {
> throw new CatalogException(String.format("Failed to get table %s from Hive metastore", tablePath.getFullName()), var5);
> }
> }
--
This message was sent by Atlassian Jira
(v8.3.4#803005)