public CatalogTable( String tableType, TableSchema tableSchema, TableStats tableStats, Map<String, String> properties, boolean isStreaming) { this.tableType = tableType; this.tableSchema = tableSchema; this.tableStats = tableStats; this.properties = properties; this.isStreaming = isStreaming; this.richTableSchema = new RichTableSchema(tableSchema.getFieldNames(), tableSchema.getFieldTypes()); }
/** * Create an CatalogTable from Hive table. */ public static CatalogTable createCatalogTable(Table hiveTable, TableSchema tableSchema, TableStats tableStats) { return new CatalogTable( "hive", tableSchema, getPropertiesFromHiveTable(hiveTable), new RichTableSchema(tableSchema.getFieldNames(), tableSchema.getFieldTypes()), tableStats, null, getPartitionCols(hiveTable), hiveTable.getPartitionKeysSize() != 0, null, null, -1L, (long) hiveTable.getCreateTime(), (long) hiveTable.getLastAccessTime(), false); }