This repository has been archived by the owner on Mar 9, 2019. It is now read-only.
forked from apache/drill
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- code generator support for merge-join's copyLeft(), copyRight(), co…
…mpare() and compareNextLeftKey() - add line prefixes to generated code log - support VectorContainers in declareVectorValueSetupAndMember() - merge master
- Loading branch information
Showing
13 changed files
with
339 additions
and
244 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 5 additions & 4 deletions
9
.../exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/JoinEvaluator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
package org.apache.drill.exec.physical.impl.join; | ||
|
||
import org.apache.drill.exec.record.RecordBatch; | ||
import org.apache.drill.exec.exception.SchemaChangeException; | ||
import org.apache.drill.exec.ops.FragmentContext; | ||
import org.apache.drill.exec.record.VectorContainer; | ||
|
||
public interface JoinEvaluator { | ||
public abstract void setup(RecordBatch left, RecordBatch right, RecordBatch outgoing); | ||
public abstract boolean copy(int leftPosition, int rightPosition, int outputPosition); | ||
public abstract int compare(int leftPosition, int rightPosition); | ||
public abstract void doSetup(FragmentContext context, JoinStatus status, VectorContainer outgoing) throws SchemaChangeException; | ||
|
||
} |
78 changes: 78 additions & 0 deletions
78
.../java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/JoinInnerSignature.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
/******************************************************************************* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
******************************************************************************/ | ||
|
||
package org.apache.drill.exec.physical.impl.join; | ||
|
||
import org.apache.drill.exec.compile.sig.CodeGeneratorSignature; | ||
import org.apache.drill.exec.compile.sig.MappingSet; | ||
import org.apache.drill.exec.exception.SchemaChangeException; | ||
import org.apache.drill.exec.ops.FragmentContext; | ||
import org.apache.drill.exec.record.VectorContainer; | ||
|
||
import javax.inject.Named; | ||
|
||
import static org.apache.drill.exec.compile.sig.GeneratorMapping.GM; | ||
|
||
|
||
public interface JoinInnerSignature extends CodeGeneratorSignature { | ||
|
||
public static final MappingSet SETUP_MAPPING = | ||
new MappingSet("null", "null", | ||
GM("doSetup", "doSetup", null, null), | ||
GM("doSetup", "doSetup", null, null)); | ||
public static final MappingSet COPY_LEFT_MAPPING = | ||
new MappingSet("leftIndex", "outIndex", | ||
GM("doSetup", "doCopyLeft", null, null), | ||
GM("doSetup", "doCopyLeft", null, null)); | ||
public static final MappingSet COPY_RIGHT_MAPPING = | ||
new MappingSet("rightIndex", "outIndex", | ||
GM("doSetup", "doCopyRight", null, null), | ||
GM("doSetup", "doCopyRight", null, null)); | ||
public static final MappingSet COMPARE_MAPPING = | ||
new MappingSet("leftIndex", "rightIndex", | ||
GM("doSetup", "doCompare", null, null), | ||
GM("doSetup", "doCompare", null, null)); | ||
public static final MappingSet COMPARE_RIGHT_MAPPING = | ||
new MappingSet("rightIndex", "null", | ||
GM("doSetup", "doCompare", null, null), | ||
GM("doSetup", "doCompare", null, null)); | ||
public static final MappingSet COMPARE_LEFT_MAPPING = | ||
new MappingSet("leftIndex", "null", | ||
GM("doSetup", "doCompareNextLeftKey", null, null), | ||
GM("doSetup", "doCompareNextLeftKey", null, null)); | ||
public static final MappingSet COMPARE_NEXT_LEFT_MAPPING = | ||
new MappingSet("nextLeftIndex", "null", | ||
GM("doSetup", "doCompareNextLeftKey", null, null), | ||
GM("doSetup", "doCompareNextLeftKey", null, null)); | ||
|
||
public void doSetup(@Named("context") FragmentContext context, | ||
@Named("status") JoinStatus status, | ||
@Named("outgoing") VectorContainer outgoing) throws SchemaChangeException; | ||
|
||
public int doCompare(@Named("leftIndex") int leftIndex, | ||
@Named("rightIndex") int rightIndex); | ||
|
||
public int doCompareNextLeftKey(@Named("leftIndex") int leftIndex); | ||
|
||
public boolean doCopyLeft(@Named("leftIndex") int leftIndex, | ||
@Named("outIndex") int outIndex); | ||
|
||
public boolean doCopyRight(@Named("rightIndex") int rightIndex, | ||
@Named("outIndex") int outIndex); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.