Skip to content

Commit

Permalink
spotless fixes (#441)
Browse files Browse the repository at this point in the history
  • Loading branch information
kortemik authored Dec 3, 2024
1 parent fa56c50 commit a47ab33
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,8 @@ public Node visitT_bloomOptionParameter(final DPLParser.T_bloomOptionParameterCo
estimateCol.value()
);
rv = new StepListNode(Arrays.asList(aggregateStep, bloomStepWithRegexAndTable));
} else {
}
else {
final TeragrepBloomStep bloomStep = new TeragrepBloomStep(
this.zplnConfig,
mode.value(),
Expand All @@ -521,7 +522,7 @@ public Node visitT_bloomOptionParameter(final DPLParser.T_bloomOptionParameterCo
rv = new StepNode(bloomStep);
}

return rv;
return rv;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ public EstimateColumnFromBloomContext(final DPLParser.T_bloomOptionParameterCont
public String value() {
final String value;
if (ctx.t_estimatesParameter() != null) {
value = new UnquotedText(
new TextString(ctx.t_estimatesParameter().fieldType().getText())
).read();
value = new UnquotedText(new TextString(ctx.t_estimatesParameter().fieldType().getText())).read();
}
else {
value = String.format("estimate(%s)", inputCol);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ public InputColumnFromBloomContext(DPLParser.T_bloomOptionParameterContext ctx)
public String value() {
final String value;
if (ctx.t_inputParameter() != null) {
value = new UnquotedText(
new TextString(ctx.t_inputParameter().fieldType().getText())
).read();
value = new UnquotedText(new TextString(ctx.t_inputParameter().fieldType().getText())).read();
}
else {
value = "tokens";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ public OutputColumnFromBloomContext(final DPLParser.T_bloomOptionParameterContex
public String value() {
final String outputCol;
if (ctx.t_outputParameter() != null) {
outputCol = new UnquotedText(
new TextString(ctx.t_outputParameter().fieldType().getText())
).read();
outputCol = new UnquotedText(new TextString(ctx.t_outputParameter().fieldType().getText())).read();
}
else {
outputCol = String.format("estimate(%s)", inputCol);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ public RegexValueFromBloomContext(final DPLParser.T_bloomOptionParameterContext
public String value() {
final String regex;
if (ctx.t_regexParameter() != null) {
regex = new UnquotedText(
new TextString(ctx.t_regexParameter().stringType().getText())
).read();
regex = new UnquotedText(new TextString(ctx.t_regexParameter().stringType().getText())).read();
}
else {
throw new IllegalArgumentException("Missing regex parameter in '| teragrep exec bloom'.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ public TableNameFromBloomContext(final DPLParser.T_bloomOptionParameterContext c
public String value() {
final String tableName;
if (ctx.t_tableParameter() != null) {
tableName = new UnquotedText(
new TextString(ctx.t_tableParameter().fieldType().getText())
).read();
tableName = new UnquotedText(new TextString(ctx.t_tableParameter().fieldType().getText())).read();
}
else {
throw new IllegalArgumentException("Missing table parameter in '| teragrep exec bloom'.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ public void testReplaceWithoutWildcardsInWith() {
Assertions.assertEquals("SomethingNew", listOfRawCol.get(0));
});
}
//"?$.data^){"

//"?$.data^){"
@Test
@DisabledIfSystemProperty(
named = "skipSparkTest",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ void testCreateExceptionOnConstraintFailure() {
Config config = ConfigFactory.parseProperties(properties);
BloomFilterTable table = new BloomFilterTable(config, tableName);
RuntimeException e = Assertions.assertThrows(RuntimeException.class, table::create);
String expectedMessage = "Error creating bloom filter table: org.h2.jdbc.JdbcSQLSyntaxErrorException: Schema \"journaldb\" not found; SQL statement:\n" +
"CREATE TABLE IF NOT EXISTS `test_table`(`id` BIGINT UNSIGNED NOT NULL auto_increment PRIMARY KEY,`partition_id` BIGINT UNSIGNED NOT NULL UNIQUE,`filter_type_id` BIGINT UNSIGNED NOT NULL,`filter` LONGBLOB NOT NULL,CONSTRAINT `test_table_ibfk_1` FOREIGN KEY (filter_type_id) REFERENCES filtertype (id)ON DELETE CASCADE,CONSTRAINT `test_table_ibfk_2` FOREIGN KEY (partition_id) REFERENCES journaldb.logfile (id)ON DELETE CASCADE); [90079-224]";
String expectedMessage = "Error creating bloom filter table: org.h2.jdbc.JdbcSQLSyntaxErrorException: Schema \"journaldb\" not found; SQL statement:\n"
+ "CREATE TABLE IF NOT EXISTS `test_table`(`id` BIGINT UNSIGNED NOT NULL auto_increment PRIMARY KEY,`partition_id` BIGINT UNSIGNED NOT NULL UNIQUE,`filter_type_id` BIGINT UNSIGNED NOT NULL,`filter` LONGBLOB NOT NULL,CONSTRAINT `test_table_ibfk_1` FOREIGN KEY (filter_type_id) REFERENCES filtertype (id)ON DELETE CASCADE,CONSTRAINT `test_table_ibfk_2` FOREIGN KEY (partition_id) REFERENCES journaldb.logfile (id)ON DELETE CASCADE); [90079-224]";
Assertions.assertEquals(expectedMessage, e.getMessage());
}

Expand Down

0 comments on commit a47ab33

Please sign in to comment.