This commit is contained in:
@ -33,6 +33,14 @@ public abstract class JniScanner {
|
||||
protected VectorTable vectorTable;
|
||||
protected String[] fields;
|
||||
protected ColumnType[] types;
|
||||
@Deprecated
|
||||
// This predicate is from BE, but no used.
|
||||
// TODO: actually, we can generate the predicate for JNI scanner in FE's planner,
|
||||
// then serialize it to BE, and BE pass it to JNI scanner directly.
|
||||
// NO need to use this intermediate expression, because each JNI scanner has its
|
||||
// own predicate expression format.
|
||||
// For example, Paimon use "PaimonScannerUtils.decodeStringToObject(paimonPredicate)"
|
||||
// to deserialize the predicate string to PaimonPredicate object.
|
||||
protected ScanPredicate[] predicates;
|
||||
protected int batchSize;
|
||||
|
||||
@ -50,11 +58,9 @@ public abstract class JniScanner {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
protected void initTableInfo(ColumnType[] requiredTypes, String[] requiredFields, ScanPredicate[] predicates,
|
||||
int batchSize) {
|
||||
protected void initTableInfo(ColumnType[] requiredTypes, String[] requiredFields, int batchSize) {
|
||||
this.types = requiredTypes;
|
||||
this.fields = requiredFields;
|
||||
this.predicates = predicates;
|
||||
this.batchSize = batchSize;
|
||||
}
|
||||
|
||||
|
||||
@ -20,7 +20,6 @@ package org.apache.doris.common.jni;
|
||||
|
||||
import org.apache.doris.common.jni.vec.ColumnType;
|
||||
import org.apache.doris.common.jni.vec.ColumnValue;
|
||||
import org.apache.doris.common.jni.vec.ScanPredicate;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
@ -187,15 +186,7 @@ public class MockJniScanner extends JniScanner {
|
||||
for (int i = 0; i < types.length; i++) {
|
||||
columnTypes[i] = ColumnType.parseType(requiredFields[i], types[i]);
|
||||
}
|
||||
ScanPredicate[] predicates = new ScanPredicate[0];
|
||||
if (params.containsKey("push_down_predicates")) {
|
||||
long predicatesAddress = Long.parseLong(params.get("push_down_predicates"));
|
||||
if (predicatesAddress != 0) {
|
||||
predicates = ScanPredicate.parseScanPredicates(predicatesAddress, columnTypes);
|
||||
LOG.info("MockJniScanner gets pushed-down predicates: " + ScanPredicate.dump(predicates));
|
||||
}
|
||||
}
|
||||
initTableInfo(columnTypes, requiredFields, predicates, batchSize);
|
||||
initTableInfo(columnTypes, requiredFields, batchSize);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user