pstmt.setString(2, table.getPartition().getPartitionType().name()); pstmt.setString(3, table.getPartition().getExpression()); pstmt.setBytes(4, table.getPartition().getExpressionSchema().toByteArray()); pstmt.executeUpdate();
pstmt.setString(2, table.getPartition().getPartitionType().name()); pstmt.setString(3, table.getPartition().getExpression()); pstmt.setBytes(4, table.getPartition().getExpressionSchema().toByteArray()); pstmt.executeUpdate();
parititonColumns = tableDesc.getPartition().getExpressionSchema().getFieldsList();
TableDescProto tableDesc = getTable(request.getDatabaseName(), request.getTableName()); pair = getSelectStatementAndPartitionFilterSet(tableDesc.getTableName(), tableDesc.getPartition() .getExpressionSchema().getFieldsList(), request.getAlgebra());
result = result && getPartition() .equals(other.getPartition());
hash = (53 * hash) + getPartition().hashCode();
if (!getPartition().isInitialized()) { memoizedIsInitialized = 0; return false;
public Builder mergeFrom(org.apache.tajo.catalog.proto.CatalogProtos.TableDescProto other) { if (other == org.apache.tajo.catalog.proto.CatalogProtos.TableDescProto.getDefaultInstance()) return this; if (other.hasTableName()) { bitField0_ |= 0x00000001; tableName_ = other.tableName_; onChanged(); } if (other.hasPath()) { bitField0_ |= 0x00000002; path_ = other.path_; onChanged(); } if (other.hasMeta()) { mergeMeta(other.getMeta()); } if (other.hasSchema()) { mergeSchema(other.getSchema()); } if (other.hasStats()) { mergeStats(other.getStats()); } if (other.hasPartition()) { mergePartition(other.getPartition()); } if (other.hasIsExternal()) { setIsExternal(other.getIsExternal()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
@Override public List<PartitionDescProto> getPartitionsByAlgebra(PartitionsByAlgebraProto request) throws UndefinedDatabaseException, UndefinedTableException, UndefinedPartitionMethodException, UnsupportedException { List<PartitionDescProto> list = null; try { String databaseName = request.getDatabaseName(); String tableName = request.getTableName(); if (!existDatabase(databaseName)) { throw new UndefinedDatabaseException(tableName); } if (!existTable(databaseName, tableName)) { throw new UndefinedTableException(tableName); } if (!existPartitionMethod(databaseName, tableName)) { throw new UndefinedPartitionMethodException(tableName); } TableDescProto tableDesc = getTable(databaseName, tableName); String filter = getFilter(databaseName, tableName, tableDesc.getPartition().getExpressionSchema().getFieldsList() , request.getAlgebra()); list = getPartitionsFromHiveMetaStore(databaseName, tableName, filter); } catch (UnsupportedException ue) { throw ue; } catch (Exception se) { throw new TajoInternalError(se); } return list; }
public TableDesc(TableDescProto proto) { this(proto.getTableName(), proto.hasSchema() ? SchemaFactory.newV1(proto.getSchema()) : null, new TableMeta(proto.getMeta()), proto.hasPath() ? URI.create(proto.getPath()) : null, proto.getIsExternal()); if(proto.hasStats()) { this.stats = new TableStats(proto.getStats()); } if (proto.hasPartition()) { this.partitionMethodDesc = new PartitionMethodDesc(proto.getPartition()); } }
public TableDesc(TableDescProto proto) { this(proto.getTableName(), proto.hasSchema() ? new Schema(proto.getSchema()) : null, new TableMeta(proto.getMeta()), proto.hasPath() ? URI.create(proto.getPath()) : null, proto.getIsExternal()); if(proto.hasStats()) { this.stats = new TableStats(proto.getStats()); } if (proto.hasPartition()) { this.partitionMethodDesc = new PartitionMethodDesc(proto.getPartition()); } }