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