@Test public void testPartitionTable() { PartitionTable operation = SchemaOperations.partitionTable("users") .into("debtors", "credit < 0") .into("creditors", "credit > 0"); Map<String, String> partitions = Maps.newHashMap(); partitions.put("debtors", "credit < 0"); partitions.put("creditors", "credit > 0"); assertEquals("users", operation.getTableName()); assertEquals(partitions, operation.getPartitions()); }
PartitionTable(String tableName) { checkArgument(!Strings.isNullOrEmpty(tableName), "You must specify a 'tableName'."); this.tableName = tableName; this.partitions = Maps.newLinkedHashMap(); }
PartitionTable implements SchemaOperation { PartitionTable(String tableName) { checkArgument(!Strings.isNullOrEmpty(tableName), "You must specify a 'tableName'."); this.tableName = tableName; this.partitions = Maps.newLinkedHashMap(); } }
PartitionTable implements SchemaOperation { PartitionTable(String tableName) { checkArgument(!Strings.isNullOrEmpty(tableName), "You must specify a 'tableName'."); this.tableName = tableName; this.partitions = Maps.newLinkedHashMap(); } PartitionTable(String tableName); }
PartitionTable implements SchemaOperation { PartitionTable(String tableName) { checkArgument(!Strings.isNullOrEmpty(tableName), "You must specify a 'tableName'."); this.tableName = tableName; this.partitions = Maps.newLinkedHashMap(); } PartitionTable(String tableName); PartitionTable into(String tableName, String expression); ImmutableMap<String, String> getPartitions(); }
PartitionTable implements SchemaOperation { PartitionTable(String tableName) { checkArgument(!Strings.isNullOrEmpty(tableName), "You must specify a 'tableName'."); this.tableName = tableName; this.partitions = Maps.newLinkedHashMap(); } PartitionTable(String tableName); PartitionTable into(String tableName, String expression); ImmutableMap<String, String> getPartitions();  }