Skip to content

Commit

Permalink
SQL leftovers (#2640)
Browse files Browse the repository at this point in the history
  • Loading branch information
viliam-durina authored Nov 5, 2020
1 parent 6a74b4a commit 4ec1e18
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ public enum JobStatus {

/**
* Returns {@code true} if this state is terminal - a job in this state
* will never have any other state and will not execute again. It's {@link
* #COMPLETED} or {@link #FAILED}.
* will never have any other state and will never execute again. It's
* {@link #COMPLETED} or {@link #FAILED}.
*/
public boolean isTerminal() {
return this == COMPLETED || this == FAILED;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public Vertex sink(
QueryDataType[] types = fields.stream().map(TableField::getType).toArray(QueryDataType[]::new);

Vertex vStart = dag.newVertex(
"Project(IMap" + "[" + table.getSchemaName() + "." + table.getSqlName() + "])",
"Project(" + toString(table) + ")",
KvProcessors.entryProjector(
paths,
types,
Expand All @@ -154,11 +154,15 @@ public Vertex sink(
);

Vertex vEnd = dag.newVertex(
"IMap[" + table.getSchemaName() + "." + table.getSqlName() + ']',
toString(table),
SinkProcessors.writeMapP(table.getMapName())
);

dag.edge(between(vStart, vEnd));
return vStart;
}

private static String toString(PartitionedMapTable table) {
return "IMap" + "[" + table.getSchemaName() + "." + table.getSqlName() + "]";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,12 @@ public static RuleSet getRuleSet() {
ValuesReduceRule.PROJECT_FILTER_INSTANCE,
ValuesUnionLogicalRule.INSTANCE,

PruneEmptyRules.PROJECT_INSTANCE,
PruneEmptyRules.FILTER_INSTANCE,

// Insert rules
InsertLogicalRule.INSTANCE
InsertLogicalRule.INSTANCE,

// Miscellaneous
PruneEmptyRules.PROJECT_INSTANCE,
PruneEmptyRules.FILTER_INSTANCE
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* Complementary interface to {@link Converter} that converts values back to
* the class returned by {@link Converter#getValueClass()}.
*/
public abstract class ToConverter {
public abstract class ToConverter {

private final Class<?> normalizedValueClass;

Expand Down

0 comments on commit 4ec1e18

Please sign in to comment.