Skip to content

Commit

Permalink
Fix code style issues (confluentinc#599)
Browse files Browse the repository at this point in the history
* Fix code style issue

* Add white space back
  • Loading branch information
satybald authored and Sayat Satybaldiyev committed Jan 17, 2018
1 parent ef64f44 commit 8657654
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 12 deletions.
7 changes: 3 additions & 4 deletions ksql-engine/src/main/java/io/confluent/ksql/KsqlEngine.java
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ public List<QueryMetadata> buildMultipleQueries(
List<Pair<String, Statement>> queries = parseQueries(queriesString, overriddenProperties, tempMetaStore);

return planQueries(queries, overriddenProperties, tempMetaStore);

}

public List<QueryMetadata> planQueries(final List<Pair<String, Statement>> statementList,
Expand All @@ -173,9 +172,9 @@ public List<QueryMetadata> planQueries(final List<Pair<String, Statement>> state
// Physical plan creation from logical plans.
List<QueryMetadata> runningQueries = queryEngine.buildPhysicalPlans(
logicalPlans,
statementList,
overriddenProperties,
true
statementList,
overriddenProperties,
true
);

for (QueryMetadata queryMetadata : runningQueries) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,7 @@ private StructuredDataSource timestampColumn(AliasedRelation aliasedRelation,
@Override
protected Node visitAliasedRelation(AliasedRelation node, AnalysisContext context) {
String structuredDataSourceName = ((Table) node.getRelation()).getName().getSuffix();
if (metaStore.getSource(structuredDataSourceName)
== null) {
if (metaStore.getSource(structuredDataSourceName) == null) {
throw new KsqlException(structuredDataSourceName + " does not exist.");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,7 @@ public KudafInitializer(List initialGenericRowColumns) {

@Override
public GenericRow apply() {
List rowColumns = new ArrayList();
for (Object obj: initialGenericRowColumns) {
rowColumns.add(obj);
}
List rowColumns = new ArrayList(initialGenericRowColumns);
return new GenericRow(rowColumns);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public Object evaluate(Object... args) {
+ " date value and format.");
}
try {
if(dateFormat == null) {
if (dateFormat == null) {
dateFormat = new SimpleDateFormat(args[1].toString());
}
return dateFormat.parse(args[0].toString()).getTime();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ public static KsqlRestApplication buildApplication(

try {
short replicationFactor = 1;
if(restConfig.getOriginals().containsKey(KsqlConfig.SINK_NUMBER_OF_REPLICAS_PROPERTY)) {
if (restConfig.getOriginals().containsKey(KsqlConfig.SINK_NUMBER_OF_REPLICAS_PROPERTY)) {
replicationFactor = Short.parseShort(restConfig.getOriginals()
.get(KsqlConfig.SINK_NUMBER_OF_REPLICAS_PROPERTY).toString());
}
Expand Down

0 comments on commit 8657654

Please sign in to comment.