@Override public int getColumnCount() throws SQLException { return rowProjector.getColumnCount(); }
private static List<TargetDataExpression> checkProjectionNumAndExpressions( List<QueryPlan> selectPlans) throws SQLException { int columnCount = selectPlans.get(0).getProjector().getColumnCount(); List<TargetDataExpression> targetTypes = new ArrayList<TargetDataExpression>(columnCount); for (int i = 0; i < columnCount; i++) { for (QueryPlan plan : selectPlans) { if (columnCount !=plan.getProjector().getColumnCount()) { throw new SQLExceptionInfo.Builder(SQLExceptionCode .SELECT_COLUMN_NUM_IN_UNIONALL_DIFFS).setMessage("1st query has " + columnCount + " columns whereas 2nd " + "query has " + plan.getProjector().getColumnCount()) .build().buildException(); } ColumnProjector colproj = plan.getProjector().getColumnProjector(i); if(targetTypes.size() < i+1 ) { targetTypes.add(new TargetDataExpression(colproj.getExpression())); } else { compareExperssions(i, colproj.getExpression(), targetTypes); } } } return targetTypes; }
@Override public int getColumnCount() throws SQLException { return rowProjector.getColumnCount(); }
RowProjector projector = plan.getProjector(); ImmutableBytesWritable ptr = new ImmutableBytesWritable(); int columnCount = projector.getColumnCount(); int rowCount = 0; PDataType baseType = PVarbinary.INSTANCE;
@Override public int getColumnCount() throws SQLException { return rowProjector.getColumnCount(); }
private static void assertLiteralEquals(Object o, RowProjector p, int i) { assertTrue(i < p.getColumnCount()); Expression e = p.getColumnProjector(i).getExpression(); assertTrue(e instanceof LiteralExpression); LiteralExpression l = (LiteralExpression)e; Object lo = l.getValue(); assertEquals(o, lo); }
for (int i = 0; i < plan.getProjector().getColumnCount(); i++) { ColumnProjector colProj = plan.getProjector().getColumnProjector(i); String name = selectNodes == null ? colProj.getName() : selectNodes.get(i).getAlias();
private QueryPlan addPlan(PhoenixStatement statement, SelectStatement select, PTable index, List<? extends PDatum> targetColumns, ParallelIteratorFactory parallelIteratorFactory, QueryPlan dataPlan, boolean isHinted) throws SQLException { int nColumns = dataPlan.getProjector().getColumnCount(); String tableAlias = dataPlan.getTableRef().getTableAlias(); String alias = tableAlias==null ? null : '"' + tableAlias + '"'; // double quote in case it's case sensitive if (plan.getProjector().getColumnCount() == nColumns) { return plan; } else if (index.getIndexType() == IndexType.GLOBAL) {
parallelIteratorFactoryToBe = null; nValuesToSet = queryPlanToBe.getProjector().getColumnCount();
private static List<TargetDataExpression> checkProjectionNumAndExpressions( List<QueryPlan> selectPlans) throws SQLException { int columnCount = selectPlans.get(0).getProjector().getColumnCount(); List<TargetDataExpression> targetTypes = new ArrayList<TargetDataExpression>(columnCount); for (int i = 0; i < columnCount; i++) { for (QueryPlan plan : selectPlans) { if (columnCount !=plan.getProjector().getColumnCount()) { throw new SQLExceptionInfo.Builder(SQLExceptionCode .SELECT_COLUMN_NUM_IN_UNIONALL_DIFFS).setMessage("1st query has " + columnCount + " columns whereas 2nd " + "query has " + plan.getProjector().getColumnCount()) .build().buildException(); } ColumnProjector colproj = plan.getProjector().getColumnProjector(i); if(targetTypes.size() < i+1 ) { targetTypes.add(new TargetDataExpression(colproj.getExpression())); } else { compareExperssions(i, colproj.getExpression(), targetTypes); } } } return targetTypes; }
private static List<TargetDataExpression> checkProjectionNumAndExpressions( List<QueryPlan> selectPlans) throws SQLException { int columnCount = selectPlans.get(0).getProjector().getColumnCount(); List<TargetDataExpression> targetTypes = new ArrayList<TargetDataExpression>(columnCount); for (int i = 0; i < columnCount; i++) { for (QueryPlan plan : selectPlans) { if (columnCount !=plan.getProjector().getColumnCount()) { throw new SQLExceptionInfo.Builder(SQLExceptionCode .SELECT_COLUMN_NUM_IN_UNIONALL_DIFFS).setMessage("1st query has " + columnCount + " columns whereas 2nd " + "query has " + plan.getProjector().getColumnCount()) .build().buildException(); } ColumnProjector colproj = plan.getProjector().getColumnProjector(i); if(targetTypes.size() < i+1 ) { targetTypes.add(new TargetDataExpression(colproj.getExpression())); } else { compareExperssions(i, colproj.getExpression(), targetTypes); } } } return targetTypes; }
for (int i = 0; i < plan.getProjector().getColumnCount(); i++) { ColumnProjector colProj = plan.getProjector().getColumnProjector(i); String name = selectNodes == null ? colProj.getName() : selectNodes.get(i).getAlias();
RowProjector projector = plan.getProjector(); ImmutableBytesWritable ptr = new ImmutableBytesWritable(); int columnCount = projector.getColumnCount(); int rowCount = 0; PDataType baseType = PVarbinary.INSTANCE;
RowProjector projector = plan.getProjector(); ImmutableBytesWritable ptr = new ImmutableBytesWritable(); int columnCount = projector.getColumnCount(); int rowCount = 0; PDataType baseType = PVarbinary.INSTANCE;
for (int i = 0; i < plan.getProjector().getColumnCount(); i++) { ColumnProjector colProj = plan.getProjector().getColumnProjector(i); String name = selectNodes == null ? colProj.getName() : selectNodes.get(i).getAlias();
private QueryPlan addPlan(PhoenixStatement statement, SelectStatement select, PTable index, List<? extends PDatum> targetColumns, ParallelIteratorFactory parallelIteratorFactory, QueryPlan dataPlan, boolean isHinted) throws SQLException { int nColumns = dataPlan.getProjector().getColumnCount(); String tableAlias = dataPlan.getTableRef().getTableAlias(); String alias = tableAlias==null ? null : '"' + tableAlias + '"'; // double quote in case it's case sensitive if (plan.getProjector().getColumnCount() == nColumns) { return plan; } else if (index.getIndexType() == IndexType.GLOBAL) {
parallelIteratorFactoryToBe = null; nValuesToSet = queryPlanToBe.getProjector().getColumnCount();
parallelIteratorFactoryToBe = null; nValuesToSet = queryPlanToBe.getProjector().getColumnCount();
private QueryPlan addPlan(PhoenixStatement statement, SelectStatement select, PTable index, List<? extends PDatum> targetColumns, ParallelIteratorFactory parallelIteratorFactory, QueryPlan dataPlan, boolean isHinted) throws SQLException { int nColumns = dataPlan.getProjector().getColumnCount(); String tableAlias = dataPlan.getTableRef().getTableAlias(); String alias = tableAlias==null ? null : '"' + tableAlias + '"'; // double quote in case it's case sensitive if (plan.getProjector().getColumnCount() == nColumns) { return plan; } else if (index.getIndexType() == IndexType.GLOBAL) {