Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.
Closed
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 @@ -45,6 +45,7 @@ public class ExecutorPreCompiler extends BasicLogicalPlanVisitor<ExecutorPreComp
public static void compile(CompilationContext context, LogicalNode node) throws PlanningException {
instance.visit(context, null, null, node, new Stack<LogicalNode>());
context.compiledEvals = Collections.unmodifiableMap(context.compiledEvals);
context.compiledComparators = Collections.unmodifiableMap(context.compiledComparators);
}

public static Map<Pair<Schema, EvalNode>, EvalNode> compile(TajoClassLoader classLoader, LogicalNode node)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,7 @@ public class BaseTupleComparator extends TupleComparator implements ProtoObject<
private final int[] sortKeyIds;
private final boolean[] asc;
@SuppressWarnings("unused")
private final boolean[] nullFirsts;

private Datum left;
private Datum right;
private int compVal;
private final boolean[] nullFirsts;

/**
* @param schema The schema of input tuples
Expand Down Expand Up @@ -108,9 +104,10 @@ public boolean isAscendingFirstKey() {

@Override
public int compare(Tuple tuple1, Tuple tuple2) {
int compVal = 0;
for (int i = 0; i < sortKeyIds.length; i++) {
left = tuple1.get(sortKeyIds[i]);
right = tuple2.get(sortKeyIds[i]);
Datum left = tuple1.get(sortKeyIds[i]);
Datum right = tuple2.get(sortKeyIds[i]);

if (left.isNull() || right.isNull()) {
if (!left.equals(right)) {
Expand Down Expand Up @@ -144,7 +141,7 @@ public int compare(Tuple tuple1, Tuple tuple2) {

@Override
public int hashCode() {
return Objects.hashCode(sortKeyIds);
return Objects.hashCode(sortSpecs);
}

@Override
Expand Down