Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spotless fixes #441

Merged
merged 1 commit into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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