Package edu.uci.ics.hyracks.data.std.util

Examples of edu.uci.ics.hyracks.data.std.util.ArrayBackedValueStorage.reset()


        return new AbstractTaggedValueArgumentScalarEvaluator(args) {
            @Override
            protected void evaluate(TaggedValuePointable[] args, IPointable result) throws SystemException {
                TaggedValuePointable tvp1 = args[0];
                try {
                    abvs.reset();
                    switch (tvp1.getTag()) {
                        case ValueTag.XS_STRING_TAG:
                            tvp1.getValue(tp.utf8sp);
                            castToDouble.convertString(tp.utf8sp, dOut);
                            break;
View Full Code Here


                    }

                    result.set(abvs);
                } catch (SystemException e) {
                    try {
                        abvs.reset();
                        dOut.write(ValueTag.XS_DOUBLE_TAG);
                        dOut.writeDouble(Double.NaN);
                        result.set(abvs);
                    } catch (IOException e1) {
                        throw new SystemException(ErrorCode.SYSE0001, e);
View Full Code Here

                        int seqLen = seq.getEntryCount();
                        for (int j = 0; j < seqLen; ++j) {
                            seq.getEntry(j, p);
                            tvp.set(p.getByteArray(), p.getStartOffset(), p.getLength());
                            if (FunctionHelper.compareTaggedValues(aOp, tvp, tvp2, dCtx)) {
                                abvsInner.reset();
                                dOutInner.write(ValueTag.XS_INTEGER_TAG);
                                dOutInner.writeLong(j + 1);
                                sb.addItem(abvsInner);
                            }
                        }
View Full Code Here

                                sb.addItem(abvsInner);
                            }
                        }
                    } else {
                        if (FunctionHelper.compareTaggedValues(aOp, tvp1, tvp2, dCtx)) {
                            abvsInner.reset();
                            dOutInner.write(ValueTag.XS_INTEGER_TAG);
                            dOutInner.writeLong(1);
                            sb.addItem(abvsInner);
                        }
                    }
View Full Code Here

                    if (count != 0) {
                        tvp2.set(abvs.getByteArray(), abvs.getStartOffset(), abvs.getLength());
                    }
                    if (count == 0 || FunctionHelper.transformThenCompareMinMaxTaggedValues(aOp, tvp1, tvp2, dCtx, tp1, tp2)) {
                        try {
                            abvs.reset();
                            dOut.write(tvp1.getByteArray(), tvp1.getStartOffset(), tvp1.getLength());
                        } catch (IOException e) {
                            throw new SystemException(ErrorCode.SYSE0001, e);
                        }
                    }
View Full Code Here

            protected boolean transformThenCompareTaggedValues(AbstractValueComparisonOperation aOp,
                    TaggedValuePointable tvpArg1, TaggedValuePointable tvpArg2, DynamicContext dCtx)
                    throws SystemException {
                boolean tagTransformed1 = false, tagTransformed2 = false;
                abvsInner1.reset();
                abvsInner2.reset();
                tvpTransform1.set(tvpArg1);
                tvpTransform2.set(tvpArg2);
                int tid1 = FunctionHelper.getBaseTypeForGeneralComparisons(tvpTransform1.getTag());
                int tid2 = FunctionHelper.getBaseTypeForGeneralComparisons(tvpTransform2.getTag());
View Full Code Here

                        dOutCount.write(ValueTag.XS_INTEGER_TAG);
                        dOutCount.writeLong(count);
                        tvpCount.set(abvsCount);

                        // Save intermediate result.
                        abvsSeq.reset();
                        sb.reset(abvsSeq);
                        sb.addItem(tvpCount);
                        sb.addItem(tvpSum);
                        sb.finish();
                        result.set(abvsSeq);
View Full Code Here

        return new AbstractTaggedValueArgumentScalarEvaluator(args) {
            @Override
            protected void evaluate(TaggedValuePointable[] args, IPointable result) throws SystemException {
                TaggedValuePointable tvp1 = args[0];
                try {
                    abvs.reset();
                    switch (tvp1.getTag()) {
                        case ValueTag.XS_STRING_TAG:
                            tvp1.getValue(tp.utf8sp);
                            castToDouble.convertString(tp.utf8sp, dOut);
                            break;
View Full Code Here

                    }

                    result.set(abvs);
                } catch (SystemException e) {
                    try {
                        abvs.reset();
                        dOut.write(ValueTag.XS_DOUBLE_TAG);
                        dOut.writeDouble(Double.NaN);
                        result.set(abvs);
                    } catch (IOException e1) {
                        throw new SystemException(ErrorCode.SYSE0001, e);
View Full Code Here

                try {
                    int localNodeId = FunctionHelper.getLocalNodeId(tvp1, tp);
                    if (localNodeId == -1) {
                        XDMConstants.setEmptySequence(result);
                    } else {
                        abvs.reset();
                        dOut.write(ValueTag.XS_INT_TAG);
                        dOut.writeInt(localNodeId);
                        result.set(abvs);
                    }
                } catch (Exception e) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.