@Override public String vectorExpressionParameters() { return getColumnParamString(0, colNum) + ", start " + startIdx + ", length " + length; }
if (inV.noNulls || !inV.isNull[0]) { outputIsNull[0] = false; populateSubstrOffsets(vector[0], start[0], len[0], startIdx, length, offsetArray); if (offsetArray[0] != -1) { outputColVector.setVal(0, vector[0], offsetArray[0], offsetArray[1]); if (!inV.isNull[selected]) { outputIsNull[selected] = false; populateSubstrOffsets(vector[selected], start[selected], len[selected], startIdx, length, offsetArray); if (offsetArray[0] != -1) { int selected = sel[i]; outputColVector.isNull[selected] = false; populateSubstrOffsets(vector[selected], start[selected], len[selected], startIdx, length, offsetArray); if (offsetArray[0] != -1) { if (!inV.isNull[i]) { outputIsNull[i] = false; populateSubstrOffsets(vector[i], start[i], len[i], startIdx, length, offsetArray); if (offsetArray[0] != -1) { outputColVector.setVal(i, vector[i], offsetArray[0], offsetArray[1]); populateSubstrOffsets(vector[i], start[i], len[i], startIdx, length, offsetArray); if (offsetArray[0] != -1) { outputColVector.setVal(i, vector[i], offsetArray[0], offsetArray[1]);
StringSubstrColStartLen expr = new StringSubstrColStartLen(0, 6, 6, 1); expr.evaluate(batch); BytesColumnVector outCol = (BytesColumnVector) batch.cols[1]; Assert.assertEquals(3, batch.size); expr = new StringSubstrColStartLen(0, -6, 6, 1); expr.evaluate(batch); outCol = (BytesColumnVector) batch.cols[1]; Assert.assertFalse(outCol.isRepeating); expr = new StringSubstrColStartLen(0, 1, 0, 1); outCol = (BytesColumnVector) batch.cols[1]; expr.evaluate(batch); Assert.assertEquals(3, batch.size); Assert.assertFalse(outCol.isRepeating); expr = new StringSubstrColStartLen(0, 0, 11, 1); outCol = (BytesColumnVector) batch.cols[1]; expr.evaluate(batch); Assert.assertEquals(3, batch.size); Assert.assertFalse(outCol.isRepeating); expr = new StringSubstrColStartLen(0, 6, 10, 1); expr.evaluate(batch); outCol = (BytesColumnVector) batch.cols[1]; Assert.assertEquals(3, batch.size); expr.evaluate(batch); Assert.assertEquals(3, batch.size);
} else { outV.noNulls = true; populateSubstrOffsets(vector[0], start[0], len[0], startIdx, length, offsetArray); if (offsetArray[0] != -1) { outV.setVal(0, vector[0], offsetArray[0], offsetArray[1]); if (!inV.isNull[selected]) { outV.isNull[selected] = false; populateSubstrOffsets(vector[selected], start[selected], len[selected], startIdx, length, offsetArray); if (offsetArray[0] != -1) { int selected = sel[i]; outV.isNull[selected] = false; populateSubstrOffsets(vector[selected], start[selected], len[selected], startIdx, length, offsetArray); if (offsetArray[0] != -1) { for (int i = 0; i != n; ++i) { if (!inV.isNull[i]) { populateSubstrOffsets(vector[i], start[i], len[i], startIdx, length, offsetArray); if (offsetArray[0] != -1) { outV.setVal(i, vector[i], offsetArray[0], offsetArray[1]); for (int i = 0; i != n; ++i) { outV.isNull[i] = false; populateSubstrOffsets(vector[i], start[i], len[i], startIdx, length, offsetArray); if (offsetArray[0] != -1) { outV.setVal(i, vector[i], offsetArray[0], offsetArray[1]);
} else { outV.noNulls = true; populateSubstrOffsets(vector[0], start[0], len[0], startIdx, length, offsetArray); if (offsetArray[0] != -1) { outV.setVal(0, vector[0], offsetArray[0], offsetArray[1]); if (!inV.isNull[selected]) { outV.isNull[selected] = false; populateSubstrOffsets(vector[selected], start[selected], len[selected], startIdx, length, offsetArray); if (offsetArray[0] != -1) { int selected = sel[i]; outV.isNull[selected] = false; populateSubstrOffsets(vector[selected], start[selected], len[selected], startIdx, length, offsetArray); if (offsetArray[0] != -1) { for (int i = 0; i != n; ++i) { if (!inV.isNull[i]) { populateSubstrOffsets(vector[i], start[i], len[i], startIdx, length, offsetArray); if (offsetArray[0] != -1) { outV.setVal(i, vector[i], offsetArray[0], offsetArray[1]); for (int i = 0; i != n; ++i) { outV.isNull[i] = false; populateSubstrOffsets(vector[i], start[i], len[i], startIdx, length, offsetArray); if (offsetArray[0] != -1) { outV.setVal(i, vector[i], offsetArray[0], offsetArray[1]);