Skip to content

Commit

Permalink
fixed a horizontal test, extracted parts of dml update
Browse files Browse the repository at this point in the history
  • Loading branch information
datomo committed Oct 28, 2023
1 parent d30deff commit 176bbeb
Show file tree
Hide file tree
Showing 6 changed files with 312 additions and 348 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,21 +107,6 @@ public interface AllocationRelationalCatalog extends AllocationCatalog {

void addPartitionProperty( long tableId, PartitionProperty partitionProperty );

/**
* Effectively partitions a table with the specified partitionType
*
* @param tableId Table to be partitioned
*/
void partitionTable( long tableId, PartitionProperty partitionProperty );

/**
* Merges a partitioned table.
* Resets all objects and structures which were introduced by partitionTable.
*
* @param tableId Table to be merged
*/
void mergeTable( long tableId );

/**
* Assign the partition to a new partitionGroup
*
Expand Down Expand Up @@ -155,25 +140,6 @@ public interface AllocationRelationalCatalog extends AllocationCatalog {

void deleteAllocation( long allocId );

/**
* Updates and overrides list of associated columnPlacements {@code &} partitionPlacements for a given data placement
*
* @param adapterId adapter where placement is located
* @param tableId table to retrieve the placement from
* @param columnIds List of columnIds to be located on a specific store for the table
* @param partitionIds List of partitionIds to be located on a specific store for the table
*/
void updateDataPlacement( long adapterId, long tableId, List<Long> columnIds, List<Long> partitionIds );


/**
* Deletes a placement for a partition.
*
* @param adapterId The adapter on which the table should be placed on
* @param partitionId The id of a partition which shall be removed from that store.
*/
void deletePartitionPlacement( long adapterId, long partitionId );


Map<Long, AllocationTable> getTables();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,21 +221,6 @@ public void addPartitionProperty( long tableId, PartitionProperty partitionPrope
}


@Override
public void partitionTable( long tableId, PartitionProperty partitionProperty ) {
properties.put( partitionProperty.entityId, partitionProperty );

/*if ( partitionProperty.reliesOnPeriodicChecks ) {
addTableToPeriodicProcessing( tableId );
}*/
}


@Override
public void mergeTable( long tableId ) {

}


@Override
public void updatePartition( long partitionId, Long partitionGroupId ) {
Expand Down Expand Up @@ -266,48 +251,39 @@ public AllocationTable addAllocation( long adapterId, long placementId, long par
long id = idBuilder.getNewAllocId();
AllocationTable table = new AllocationTable( id, placementId, partitionId, logicalId, namespace.id, adapterId );
tables.put( id, table );
change();
return table;
}


@Override
public void deleteAllocation( long allocId ) {
tables.remove( allocId );

change();
}


@Override
public void updateDataPlacement( long adapterId, long tableId, List<Long> columnIds, List<Long> partitionIds ) {

}


@Override
public void deletePartitionPlacement( long adapterId, long partitionId ) {

}


@Override
public AllocationPlacement addPlacement( long logicalEntityId, long namespaceId, long adapterId ) {
long id = idBuilder.getNewPlacementId();
AllocationPlacement placement = new AllocationPlacement( id, logicalEntityId, namespaceId, adapterId );

placements.put( id, placement );
change();
return placement;
}


@Override
public void deletePlacement( long id ) {
placements.remove( id );
change();
}


@Override
public void deleteProperty( long id ) {
properties.remove( id );
change();
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,6 @@ private void dropAllocation( long namespaceId, DataStore<?> store, Statement sta
// Physically delete the data from the storeId
store.dropTable( statement.getPrepareContext(), allocId );

// Remove allocations, physical will be removed on next rebuild
catalog.getAllocRel( namespaceId ).deleteAllocation( allocId );
}

Expand Down
Loading

0 comments on commit 176bbeb

Please sign in to comment.