本文整理了Java中org.apache.hadoop.hive.metastore.api.Table.setViewOriginalText()
方法的一些代码示例,展示了Table.setViewOriginalText()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.setViewOriginalText()
方法的具体详情如下:
包路径:org.apache.hadoop.hive.metastore.api.Table
类名称:Table
方法名:setViewOriginalText
暂无
代码示例来源:origin: apache/hive
/**
* @param viewOriginalText
* the original view text to set
*/
public void setViewOriginalText(String viewOriginalText) {
tTable.setViewOriginalText(viewOriginalText);
}
代码示例来源:origin: apache/drill
/**
* @param viewOriginalText
* the original view text to set
*/
public void setViewOriginalText(String viewOriginalText) {
tTable.setViewOriginalText(viewOriginalText);
}
代码示例来源:origin: prestodb/presto
public static org.apache.hadoop.hive.metastore.api.Table toMetastoreApiTable(Table table, PrincipalPrivileges privileges)
{
org.apache.hadoop.hive.metastore.api.Table result = new org.apache.hadoop.hive.metastore.api.Table();
result.setDbName(table.getDatabaseName());
result.setTableName(table.getTableName());
result.setOwner(table.getOwner());
result.setTableType(table.getTableType());
result.setParameters(table.getParameters());
result.setPartitionKeys(table.getPartitionColumns().stream().map(ThriftMetastoreUtil::toMetastoreApiFieldSchema).collect(toList()));
result.setSd(makeStorageDescriptor(table.getTableName(), table.getDataColumns(), table.getStorage()));
result.setPrivileges(toMetastoreApiPrincipalPrivilegeSet(table.getOwner(), privileges));
result.setViewOriginalText(table.getViewOriginalText().orElse(null));
result.setViewExpandedText(table.getViewExpandedText().orElse(null));
return result;
}
代码示例来源:origin: apache/hive
view.setTableType(TableType.VIRTUAL_VIEW.name());
view.setPartitionKeys(viewPartitionCols);
view.setViewOriginalText("SELECT income, name FROM " + tblName);
view.setViewExpandedText("SELECT `" + tblName + "`.`income`, `" + tblName +
"`.`name` FROM `" + dbName + "`.`" + tblName + "`");
代码示例来源:origin: apache/hive
unsetViewOriginalText();
} else {
setViewOriginalText((String)value);
代码示例来源:origin: com.facebook.presto.hive/hive-apache
/**
* @param viewOriginalText
* the original view text to set
*/
public void setViewOriginalText(String viewOriginalText) {
tTable.setViewOriginalText(viewOriginalText);
}
代码示例来源:origin: org.apache.hadoop.hive/hive-exec
/**
* @param viewOriginalText
* the original view text to set
*/
public void setViewOriginalText(String viewOriginalText) {
tTable.setViewOriginalText(viewOriginalText);
}
代码示例来源:origin: Netflix/metacat
private void updateTableTypeAndViewInfo(final TableDto dto, final Table table) {
final ViewDto viewDto = dto.getView();
if (null == dto.getView() || Strings.isNullOrEmpty(viewDto.getViewOriginalText())) {
table.setTableType(TableType.EXTERNAL_TABLE.name());
return;
}
table.setTableType(TableType.VIRTUAL_VIEW.name());
table.setViewOriginalText(viewDto.getViewOriginalText());
table.setViewExpandedText(viewDto.getViewExpandedText());
}
代码示例来源:origin: com.netflix.metacat/metacat-thrift
private void updateTableTypeAndViewInfo(final TableDto dto, final Table table) {
final ViewDto viewDto = dto.getView();
if (null == dto.getView() || Strings.isNullOrEmpty(viewDto.getViewOriginalText())) {
table.setTableType(TableType.EXTERNAL_TABLE.name());
return;
}
table.setTableType(TableType.VIRTUAL_VIEW.name());
table.setViewOriginalText(viewDto.getViewOriginalText());
table.setViewExpandedText(viewDto.getViewExpandedText());
}
代码示例来源:origin: prestosql/presto
public static org.apache.hadoop.hive.metastore.api.Table toMetastoreApiTable(Table table, PrincipalPrivileges privileges)
{
org.apache.hadoop.hive.metastore.api.Table result = new org.apache.hadoop.hive.metastore.api.Table();
result.setDbName(table.getDatabaseName());
result.setTableName(table.getTableName());
result.setOwner(table.getOwner());
result.setTableType(table.getTableType());
result.setParameters(table.getParameters());
result.setPartitionKeys(table.getPartitionColumns().stream().map(ThriftMetastoreUtil::toMetastoreApiFieldSchema).collect(toList()));
result.setSd(makeStorageDescriptor(table.getTableName(), table.getDataColumns(), table.getStorage()));
result.setPrivileges(toMetastoreApiPrincipalPrivilegeSet(privileges));
result.setViewOriginalText(table.getViewOriginalText().orElse(null));
result.setViewExpandedText(table.getViewExpandedText().orElse(null));
return result;
}
代码示例来源:origin: uk.co.nichesolutions.presto/presto-hive
table.setTableType(TableType.VIRTUAL_VIEW.name());
table.setParameters(properties);
table.setViewOriginalText(encodeViewData(viewData));
table.setViewExpandedText("/* Presto View */");
table.setSd(sd);
代码示例来源:origin: com.hotels/circus-train-hive-view
@Override
public Table transform(Table table) {
if (!MetaStoreUtils.isView(table)) {
return table;
}
LOG.info("Translating HQL of view {}.{}", table.getDbName(), table.getTableName());
String tableQualifiedName = Warehouse.getQualifiedName(table);
String hql = hqlTranslator.translate(tableQualifiedName, table.getViewOriginalText());
String expandedHql = hqlTranslator.translate(tableQualifiedName, table.getViewExpandedText());
Table transformedView = new Table(table);
transformedView.setViewOriginalText(hql);
transformedView.setViewExpandedText(expandedHql);
if (!replicaHiveConf.getBoolean(SKIP_TABLE_EXIST_CHECKS, false)) {
LOG
.info("Validating that tables used by the view {}.{} exist in the replica catalog", table.getDbName(),
table.getTableName());
validateReferencedTables(transformedView);
}
return transformedView;
}
代码示例来源:origin: HotelsDotCom/circus-train
@Override
public Table transform(Table table) {
if (!MetaStoreUtils.isView(table)) {
return table;
}
LOG.info("Translating HQL of view {}.{}", table.getDbName(), table.getTableName());
String tableQualifiedName = Warehouse.getQualifiedName(table);
String hql = hqlTranslator.translate(tableQualifiedName, table.getViewOriginalText());
String expandedHql = hqlTranslator.translate(tableQualifiedName, table.getViewExpandedText());
Table transformedView = new Table(table);
transformedView.setViewOriginalText(hql);
transformedView.setViewExpandedText(expandedHql);
if (!replicaHiveConf.getBoolean(SKIP_TABLE_EXIST_CHECKS, false)) {
LOG
.info("Validating that tables used by the view {}.{} exist in the replica catalog", table.getDbName(),
table.getTableName());
validateReferencedTables(transformedView);
}
return transformedView;
}
代码示例来源:origin: org.apache.hadoop.hive/hive-metastore
unsetViewOriginalText();
} else {
setViewOriginalText((String)value);
代码示例来源:origin: com.facebook.presto.hive/hive-apache
unsetViewOriginalText();
} else {
setViewOriginalText((String)value);
代码示例来源:origin: org.spark-project.hive/hive-metastore
unsetViewOriginalText();
} else {
setViewOriginalText((String)value);
代码示例来源:origin: org.apache.hive/hive-standalone-metastore
unsetViewOriginalText();
} else {
setViewOriginalText((String)value);
内容来源于网络,如有侵权,请联系作者删除!