Package org.apache.phoenix.schema

Examples of org.apache.phoenix.schema.KeyValueSchema


                }
                for (int i = 0; i < dup; i++) {
                    resultQueue.offer(tuple);
                }
            } else {
                KeyValueSchema schema = joinInfo.getJoinedSchema();
                if (!joinInfo.forceProjection()) {
                    tuple = projector.projectResults(tuple);
                }
                resultQueue.offer(tuple);
                for (int i = 0; i < count; i++) {
View Full Code Here


            return null;
        }
        ByteArrayInputStream stream = new ByteArrayInputStream(proj);
        try {
            DataInputStream input = new DataInputStream(stream);
            KeyValueSchema schema = new KeyValueSchema();
            schema.readFields(input);
            int count = WritableUtils.readVInt(input);
            Expression[] expressions = new Expression[count];
            for (int i = 0; i < count; i++) {
              int ordinal = WritableUtils.readVInt(input);
              expressions[i] = ExpressionType.values()[ordinal].newInstance();
View Full Code Here

            // TODO: can have an hint to skip joining back to data table, in that case if any column to
            // project is not present in the index then we need to skip this plan.
            if (!dataColumns.isEmpty()) {
                // Set data columns to be join back from data table.
                serializeDataTableColumnsToJoin(scan, dataColumns);
                KeyValueSchema schema = ProjectedColumnExpression.buildSchema(dataColumns);
                // Set key value schema of the data columns.
                serializeSchemaIntoScan(scan, schema);
                String schemaName = context.getCurrentTable().getTable().getSchemaName().getString();
                String parentTable = context.getCurrentTable().getTable().getParentTableName().getString();
                final ParseNodeFactory FACTORY = new ParseNodeFactory();
View Full Code Here

                serailizeArrayIndexInformationAndSetInScan(context, arrayKVFuncs, arrayKVRefs);
                KeyValueSchemaBuilder builder = new KeyValueSchemaBuilder(0);
                for (Expression expression : arrayKVRefs) {
                    builder.addField(expression);
                }
                KeyValueSchema kvSchema = builder.build();
                arrayIndexesBitSet = ValueBitSet.newInstance(kvSchema);
                builder = new KeyValueSchemaBuilder(0);
                for (Expression expression : arrayKVFuncs) {
                    builder.addField(expression);
                }
View Full Code Here

  }

    @Override
    public void readFields(DataInput input) throws IOException {
        super.readFields(input);
        schema = new KeyValueSchema();
        schema.readFields(input);
        bitSet = ValueBitSet.newInstance(schema);
        position = input.readInt();
        displayName = input.readUTF();
    }
View Full Code Here

            return null;
        }
        ByteArrayInputStream stream = new ByteArrayInputStream(join);
        try {
            DataInputStream input = new DataInputStream(stream);
            KeyValueSchema joinedSchema = new KeyValueSchema();
            joinedSchema.readFields(input);
            int count = WritableUtils.readVInt(input);
            ImmutableBytesPtr[] joinIds = new ImmutableBytesPtr[count];
            List<Expression>[] joinExpressions = new List[count];
            JoinType[] joinTypes = new JoinType[count];
            boolean[] earlyEvaluation = new boolean[count];
            KeyValueSchema[] schemas = new KeyValueSchema[count];
            int[] fieldPositions = new int[count];
            for (int i = 0; i < count; i++) {
                joinIds[i] = new ImmutableBytesPtr();
                joinIds[i].readFields(input);
                int nExprs = WritableUtils.readVInt(input);
                joinExpressions[i] = new ArrayList<Expression>(nExprs);
                for (int j = 0; j < nExprs; j++) {
                    int expressionOrdinal = WritableUtils.readVInt(input);
                    Expression expression = ExpressionType.values()[expressionOrdinal].newInstance();
                    expression.readFields(input);
                    joinExpressions[i].add(expression);                   
                }
                int type = WritableUtils.readVInt(input);
                joinTypes[i] = JoinType.values()[type];
                earlyEvaluation[i] = input.readBoolean();
                schemas[i] = new KeyValueSchema();
                schemas[i].readFields(input);
                fieldPositions[i] = WritableUtils.readVInt(input);
            }
            Expression postJoinFilterExpression = null;
            int expressionOrdinal = WritableUtils.readVInt(input);
View Full Code Here

            return null;
        }
        ByteArrayInputStream stream = new ByteArrayInputStream(proj);
        try {
            DataInputStream input = new DataInputStream(stream);
            KeyValueSchema schema = new KeyValueSchema();
            schema.readFields(input);
            int count = WritableUtils.readVInt(input);
            Expression[] expressions = new Expression[count];
            for (int i = 0; i < count; i++) {
              int ordinal = WritableUtils.readVInt(input);
              expressions[i] = ExpressionType.values()[ordinal].newInstance();
View Full Code Here

                }
                for (int i = 0; i < dup; i++) {
                    resultQueue.offer(tuple);
                }
            } else {
                KeyValueSchema schema = joinInfo.getJoinedSchema();
                resultQueue.offer(projector.projectResults(tuple));
                for (int i = 0; i < count; i++) {
                    boolean earlyEvaluation = joinInfo.earlyEvaluation()[i];
                    if (earlyEvaluation && tempTuples[i] == null)
                        continue;
View Full Code Here

  }

    @Override
    public void readFields(DataInput input) throws IOException {
        super.readFields(input);
        schema = new KeyValueSchema();
        schema.readFields(input);
        bitSet = ValueBitSet.newInstance(schema);
        position = input.readInt();
        displayName = input.readUTF();
    }
View Full Code Here

TOP

Related Classes of org.apache.phoenix.schema.KeyValueSchema

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.