@Test public void testIndexDescProto() { IndexDescProto proto = desc1.getProto(); assertEquals(desc1.getProto(), proto); assertEquals(desc1, new IndexDesc(proto)); }
@Override public IndexDescProto getProto() { IndexDescProto.Builder builder = IndexDescProto.newBuilder(); CatalogProtos.TableIdentifierProto.Builder tableIdentifierBuilder = CatalogProtos.TableIdentifierProto.newBuilder(); if (databaseName != null) { tableIdentifierBuilder.setDatabaseName(databaseName); } if (tableName != null) { tableIdentifierBuilder.setTableName(tableName); } builder.setTableIdentifier(tableIdentifierBuilder.build()); builder.setIndexName(indexMeta.getIndexName()); builder.setIndexPath(indexMeta.getIndexPath().toString()); for (SortSpec colSpec : indexMeta.getKeySortSpecs()) { builder.addKeySortSpecs(colSpec.getProto()); } builder.setIndexMethod(indexMeta.getIndexMethod()); builder.setIsUnique(indexMeta.isUnique()); builder.setIsClustered(indexMeta.isClustered()); builder.setTargetRelationSchema(indexMeta.getTargetRelationSchema().getProto()); return builder.build(); }
IndexDesc implements ProtoObject<IndexDescProto>, Cloneable { @Override public IndexDescProto getProto() { IndexDescProto.Builder builder = IndexDescProto.newBuilder(); CatalogProtos.TableIdentifierProto.Builder tableIdentifierBuilder = CatalogProtos.TableIdentifierProto.newBuilder(); if (databaseName != null) { tableIdentifierBuilder.setDatabaseName(databaseName); } if (tableName != null) { tableIdentifierBuilder.setTableName(tableName); } builder.setTableIdentifier(tableIdentifierBuilder.build()); builder.setIndexName(indexMeta.getIndexName()); builder.setIndexPath(indexMeta.getIndexPath().toString()); for (SortSpec colSpec : indexMeta.getKeySortSpecs()) { builder.addKeySortSpecs(colSpec.getProto()); } builder.setIndexMethod(indexMeta.getIndexMethod()); builder.setIsUnique(indexMeta.isUnique()); builder.setIsClustered(indexMeta.isClustered()); builder.setTargetRelationSchema(indexMeta.getTargetRelationSchema().getProto()); return builder.build(); } }
IndexDesc implements ProtoObject<IndexDescProto>, Cloneable { @Override public IndexDescProto getProto() { IndexDescProto.Builder builder = IndexDescProto.newBuilder(); CatalogProtos.TableIdentifierProto.Builder tableIdentifierBuilder = CatalogProtos.TableIdentifierProto.newBuilder(); if (databaseName != null) { tableIdentifierBuilder.setDatabaseName(databaseName); } if (tableName != null) { tableIdentifierBuilder.setTableName(tableName); } builder.setTableIdentifier(tableIdentifierBuilder.build()); builder.setIndexName(indexMeta.getIndexName()); builder.setIndexPath(indexMeta.getIndexPath().toString()); for (SortSpec colSpec : indexMeta.getKeySortSpecs()) { builder.addKeySortSpecs(colSpec.getProto()); } builder.setIndexMethod(indexMeta.getIndexMethod()); builder.setIsUnique(indexMeta.isUnique()); builder.setIsClustered(indexMeta.isClustered()); builder.setTargetRelationSchema(indexMeta.getTargetRelationSchema().getProto()); return builder.build(); } IndexDesc();  IndexDesc(String databaseName, String tableName, String indexName, URI indexPath, SortSpec[] keySortSpecs,
                   IndexMethod type,  boolean isUnique, boolean isClustered, Schema targetRelationSchema);  IndexDesc(IndexDescProto proto); }
IndexDesc implements ProtoObject<IndexDescProto>, Cloneable { @Override public IndexDescProto getProto() { IndexDescProto.Builder builder = IndexDescProto.newBuilder(); CatalogProtos.TableIdentifierProto.Builder tableIdentifierBuilder = CatalogProtos.TableIdentifierProto.newBuilder(); if (databaseName != null) { tableIdentifierBuilder.setDatabaseName(databaseName); } if (tableName != null) { tableIdentifierBuilder.setTableName(tableName); } builder.setTableIdentifier(tableIdentifierBuilder.build()); builder.setIndexName(indexMeta.getIndexName()); builder.setIndexPath(indexMeta.getIndexPath().toString()); for (SortSpec colSpec : indexMeta.getKeySortSpecs()) { builder.addKeySortSpecs(colSpec.getProto()); } builder.setIndexMethod(indexMeta.getIndexMethod()); builder.setIsUnique(indexMeta.isUnique()); builder.setIsClustered(indexMeta.isClustered()); builder.setTargetRelationSchema(indexMeta.getTargetRelationSchema().getProto()); return builder.build(); } IndexDesc();  IndexDesc(String databaseName, String tableName, String indexName, URI indexPath, SortSpec[] keySortSpecs,
                   IndexMethod type,  boolean isUnique, boolean isClustered, Schema targetRelationSchema);  IndexDesc(IndexDescProto proto); void set(String databaseName, String tableName, String indexName, URI indexPath, SortSpec[] keySortSpecs,
                  IndexMethod type,  boolean isUnique, boolean isClustered, Schema targetRelationSchema); String getDatabaseName(); String getTableName(); String getName(); URI getIndexPath(); SortSpec[] getKeySortSpecs(); IndexMethod getIndexMethod(); boolean isClustered(); boolean isUnique(); Schema getTargetRelationSchema(); @Override IndexDescProto getProto(); boolean equals(Object obj); int hashCode(); Object clone(); String toString(); }
IndexDesc implements ProtoObject<IndexDescProto>, Cloneable { @Override public IndexDescProto getProto() { IndexDescProto.Builder builder = IndexDescProto.newBuilder(); CatalogProtos.TableIdentifierProto.Builder tableIdentifierBuilder = CatalogProtos.TableIdentifierProto.newBuilder(); if (databaseName != null) { tableIdentifierBuilder.setDatabaseName(databaseName); } if (tableName != null) { tableIdentifierBuilder.setTableName(tableName); } builder.setTableIdentifier(tableIdentifierBuilder.build()); builder.setIndexName(indexMeta.getIndexName()); builder.setIndexPath(indexMeta.getIndexPath().toString()); for (SortSpec colSpec : indexMeta.getKeySortSpecs()) { builder.addKeySortSpecs(colSpec.getProto()); } builder.setIndexMethod(indexMeta.getIndexMethod()); builder.setIsUnique(indexMeta.isUnique()); builder.setIsClustered(indexMeta.isClustered()); builder.setTargetRelationSchema(indexMeta.getTargetRelationSchema().getProto()); return builder.build(); } IndexDesc();  IndexDesc(String databaseName, String tableName, String indexName, URI indexPath, SortSpec[] keySortSpecs,
                   IndexMethod type,  boolean isUnique, boolean isClustered, Schema targetRelationSchema);  IndexDesc(IndexDescProto proto); void set(String databaseName, String tableName, String indexName, URI indexPath, SortSpec[] keySortSpecs,
                  IndexMethod type,  boolean isUnique, boolean isClustered, Schema targetRelationSchema); String getDatabaseName(); String getTableName(); String getName(); URI getIndexPath(); SortSpec[] getKeySortSpecs(); IndexMethod getIndexMethod(); boolean isClustered(); boolean isUnique(); Schema getTargetRelationSchema(); @Override IndexDescProto getProto(); boolean equals(Object obj); int hashCode(); Object clone(); String toString();  }