public RegexpReplaceFunction(List<Expression> children) { super(children); init(); }
AbstractBasePattern pattern = this.pattern; if (pattern == null) { Expression e = getPatternStrExpression(); if (!e.evaluate(tuple, ptr)) { return false; return false; } else { pattern = compilePatternSpec(patternStr); int rStrOffset = this.rStrOffset, rStrLen = this.rStrLen; if (rStrBytes == null) { Expression replaceStrExpression = getReplaceStrExpression(); if (!replaceStrExpression.evaluate(tuple, ptr)) { return false; Expression sourceStrExpression = getSourceStrExpression(); if (!sourceStrExpression.evaluate(tuple, ptr)) { return false;
private void init() { ImmutableBytesWritable tmpPtr = new ImmutableBytesWritable(); Expression e = getPatternStrExpression(); if (e.isStateless() && e.getDeterminism() == Determinism.ALWAYS && e.evaluate(null, tmpPtr)) { String patternStr = (String) TYPE.toObject(tmpPtr, e.getDataType(), e.getSortOrder()); if (patternStr != null) pattern = compilePatternSpec(patternStr); } e = getReplaceStrExpression(); if (e.isStateless() && e.getDeterminism() == Determinism.ALWAYS && e.evaluate(null, tmpPtr)) { TYPE.coerceBytes(tmpPtr, TYPE, e.getSortOrder(), SortOrder.ASC); rStrBytes = tmpPtr.get(); rStrOffset = tmpPtr.getOffset(); rStrLen = tmpPtr.getLength(); } else { rStrBytes = null; } }
AbstractBasePattern pattern = this.pattern; if (pattern == null) { Expression e = getPatternStrExpression(); if (!e.evaluate(tuple, ptr)) { return false; return false; } else { pattern = compilePatternSpec(patternStr); int rStrOffset = this.rStrOffset, rStrLen = this.rStrLen; if (rStrBytes == null) { Expression replaceStrExpression = getReplaceStrExpression(); if (!replaceStrExpression.evaluate(tuple, ptr)) { return false; Expression sourceStrExpression = getSourceStrExpression(); if (!sourceStrExpression.evaluate(tuple, ptr)) { return false;
private void init() { ImmutableBytesWritable tmpPtr = new ImmutableBytesWritable(); Expression e = getPatternStrExpression(); if (e.isStateless() && e.getDeterminism() == Determinism.ALWAYS && e.evaluate(null, tmpPtr)) { String patternStr = (String) TYPE.toObject(tmpPtr, e.getDataType(), e.getSortOrder()); if (patternStr != null) pattern = compilePatternSpec(patternStr); } e = getReplaceStrExpression(); if (e.isStateless() && e.getDeterminism() == Determinism.ALWAYS && e.evaluate(null, tmpPtr)) { TYPE.coerceBytes(tmpPtr, TYPE, e.getSortOrder(), SortOrder.ASC); rStrBytes = tmpPtr.get(); rStrOffset = tmpPtr.getOffset(); rStrLen = tmpPtr.getLength(); } else { rStrBytes = null; } }
AbstractBasePattern pattern = this.pattern; if (pattern == null) { Expression e = getPatternStrExpression(); if (!e.evaluate(tuple, ptr)) { return false; return false; } else { pattern = compilePatternSpec(patternStr); int rStrOffset = this.rStrOffset, rStrLen = this.rStrLen; if (rStrBytes == null) { Expression replaceStrExpression = getReplaceStrExpression(); if (!replaceStrExpression.evaluate(tuple, ptr)) { return false; Expression sourceStrExpression = getSourceStrExpression(); if (!sourceStrExpression.evaluate(tuple, ptr)) { return false;
private void init() { ImmutableBytesWritable tmpPtr = new ImmutableBytesWritable(); Expression e = getPatternStrExpression(); if (e.isStateless() && e.getDeterminism() == Determinism.ALWAYS && e.evaluate(null, tmpPtr)) { String patternStr = (String) TYPE.toObject(tmpPtr, e.getDataType(), e.getSortOrder()); if (patternStr != null) pattern = compilePatternSpec(patternStr); } e = getReplaceStrExpression(); if (e.isStateless() && e.getDeterminism() == Determinism.ALWAYS && e.evaluate(null, tmpPtr)) { TYPE.coerceBytes(tmpPtr, TYPE, e.getSortOrder(), SortOrder.ASC); rStrBytes = tmpPtr.get(); rStrOffset = tmpPtr.getOffset(); rStrLen = tmpPtr.getLength(); } else { rStrBytes = null; } }
@Override public void readFields(DataInput input) throws IOException { super.readFields(input); init(); }
public RegexpReplaceFunction(List<Expression> children) { super(children); init(); }
public RegexpReplaceFunction(List<Expression> children) { super(children); init(); }
@Override public void readFields(DataInput input) throws IOException { super.readFields(input); init(); }
@Override public void readFields(DataInput input) throws IOException { super.readFields(input); init(); }