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();
.getExpressionSchema().getFieldsList(), request.getAlgebra());
result = result && getExpressionSchema() .equals(other.getExpressionSchema());
public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; if (!hasTableIdentifier()) { memoizedIsInitialized = 0; return false; } if (!hasPartitionType()) { memoizedIsInitialized = 0; return false; } if (!hasExpression()) { memoizedIsInitialized = 0; return false; } if (!hasExpressionSchema()) { memoizedIsInitialized = 0; return false; } if (!getTableIdentifier().isInitialized()) { memoizedIsInitialized = 0; return false; } if (!getExpressionSchema().isInitialized()) { memoizedIsInitialized = 0; return false; } memoizedIsInitialized = 1; return true; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasTableIdentifier()) { hash = (37 * hash) + TABLEIDENTIFIER_FIELD_NUMBER; hash = (53 * hash) + getTableIdentifier().hashCode(); } if (hasPartitionType()) { hash = (37 * hash) + PARTITIONTYPE_FIELD_NUMBER; hash = (53 * hash) + hashEnum(getPartitionType()); } if (hasExpression()) { hash = (37 * hash) + EXPRESSION_FIELD_NUMBER; hash = (53 * hash) + getExpression().hashCode(); } if (hasExpressionSchema()) { hash = (37 * hash) + EXPRESSIONSCHEMA_FIELD_NUMBER; hash = (53 * hash) + getExpressionSchema().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; }
@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 Builder mergeFrom(org.apache.tajo.catalog.proto.CatalogProtos.PartitionMethodProto other) { if (other == org.apache.tajo.catalog.proto.CatalogProtos.PartitionMethodProto.getDefaultInstance()) return this; if (other.hasTableIdentifier()) { mergeTableIdentifier(other.getTableIdentifier()); } if (other.hasPartitionType()) { setPartitionType(other.getPartitionType()); } if (other.hasExpression()) { bitField0_ |= 0x00000004; expression_ = other.expression_; onChanged(); } if (other.hasExpressionSchema()) { mergeExpressionSchema(other.getExpressionSchema()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public PartitionMethodDesc(CatalogProtos.PartitionMethodProto proto) { this(proto.getTableIdentifier().getDatabaseName(), proto.getTableIdentifier().getTableName(), proto.getPartitionType(), proto.getExpression(), SchemaFactory.newV1(proto.getExpressionSchema())); }
public PartitionMethodDesc(CatalogProtos.PartitionMethodProto proto) { this(proto.getTableIdentifier().getDatabaseName(), proto.getTableIdentifier().getTableName(), proto.getPartitionType(), proto.getExpression(), new Schema(proto.getExpressionSchema())); }