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

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


                try {
                    dCtx.getCurrentDateTime(datetimep);
                    long value = datetimep.getTimezoneHour() * DateTime.CHRONON_OF_HOUR + datetimep.getTimezoneMinute()
                            * DateTime.CHRONON_OF_MINUTE;

                    abvs.reset();
                    dOut.write(ValueTag.XS_DAY_TIME_DURATION_TAG);
                    dOut.writeLong(value);
                    result.set(abvs);
                } catch (IOException e) {
                    throw new SystemException(ErrorCode.SYSE0001, e);
View Full Code Here


                    if (tvp2.getTag() != ValueTag.XS_INTEGER_TAG) {
                        throw new SystemException(ErrorCode.FORG0006);
                    }
                    tvp2.getValue(longp);

                    abvs.reset();
                    sb.reset(abvs);
                    TaggedValuePointable tvp1 = args[0];
                    TaggedValuePointable tvp3 = args[2];
                    if (tvp1.getTag() == ValueTag.SEQUENCE_TAG) {
                        tvp1.getValue(seq);
View Full Code Here

                    // Neither match.
                    throw new SystemException(ErrorCode.FORG0008);
                }

                try {
                    abvs.reset();
                    dOut.write(ValueTag.XS_DATETIME_TAG);
                    dOut.write(datep.getByteArray(), datep.getStartOffset(),
                            XSDatePointable.TYPE_TRAITS.getFixedLength() - 2);
                    dOut.write(timep.getByteArray(), timep.getStartOffset(),
                            XSTimePointable.TYPE_TRAITS.getFixedLength() - 2);
View Full Code Here

                        // TODO Update function to support cast to a string from any atomic value.
                        if (!FunctionHelper.isDerivedFromString(tvp.getTag())) {

                            try {
                                abvsInner.reset();
                                switch (tvp.getTag()) {
                                    case ValueTag.XS_ANY_URI_TAG:
                                        tvp.getValue(tp.utf8sp);
                                        castToString.convertAnyURI(tp.utf8sp, dOutInner);
                                        break;
View Full Code Here

                case ValueTag.XS_UNSIGNED_INT_TAG:
                case ValueTag.XS_SHORT_TAG:
                case ValueTag.XS_UNSIGNED_SHORT_TAG:
                case ValueTag.XS_BYTE_TAG:
                case ValueTag.XS_UNSIGNED_BYTE_TAG:
                    abvsArgument2.reset();
                    getIntegerPointable(tvp2, dOutArgument2);
                    longp2.set(abvsArgument2.getByteArray(), abvsArgument2.getStartOffset() + 1,
                            LongPointable.TYPE_TRAITS.getFixedLength());
                    break;
                case ValueTag.XS_DOUBLE_TAG:
View Full Code Here

                    tvp2.getValue(doublep2);
                    break;
                case ValueTag.XS_UNTYPED_ATOMIC_TAG:
                    tid2 = ValueTag.XS_DOUBLE_TAG;
                    tvp2.getValue(tp2.utf8sp);
                    abvsArgument2.reset();
                    castToDouble.convertUntypedAtomic(tp2.utf8sp, dOutArgument2);
                    doublep2.set(abvsArgument2.getByteArray(), abvsArgument2.getStartOffset() + 1,
                            DoublePointable.TYPE_TRAITS.getFixedLength());
                    break;
            }
View Full Code Here

                tvp1new.set(abvsArgument1.getByteArray(), abvsArgument1.getStartOffset(),
                        LongPointable.TYPE_TRAITS.getFixedLength() + 1);
            } else {
                tvp1new = tvp1;
            }
            abvsArgument2.reset();
            if (tvp2.getTag() == ValueTag.XS_UNTYPED_ATOMIC_TAG) {
                tvp2.getValue(stringp2);
                castToDouble.convertUntypedAtomic(stringp2, dOutArgument2);
                tvp2new.set(abvsArgument2.getByteArray(), abvsArgument2.getStartOffset(),
                        DoublePointable.TYPE_TRAITS.getFixedLength() + 1);
View Full Code Here

        return new AbstractCharacterIteratorCopyingEvaluator(args, charIterator) {
            @Override
            protected void preEvaluate(TaggedValuePointable[] args) throws SystemException {
                int startingLocation = 1;
                int length = Integer.MAX_VALUE;
                abvs.reset();
                charIterator.reset();

                // Only accept string, double, and optional double as input.
                TaggedValuePointable tvp1 = args[0];
                if (tvp1.getTag() == ValueTag.SEQUENCE_TAG) {
View Full Code Here

                } else {
                    tz = ctxDatetimep.getTimezoneHour() * 60 + ctxDatetimep.getTimezoneMinute();
                }

                try {
                    abvsInner.reset();
                    DateTime.adjustDateTimeToTimezone(datetimep, tz, dOutInner);
                    result.set(abvsInner);
                } catch (IOException e) {
                    throw new SystemException(ErrorCode.SYSE0001, e);
                }
View Full Code Here

                            }
                        }

                        // Set count as a TaggedValuePointable.
                        try {
                            abvs.reset();
                            dOut.write(ValueTag.XS_INTEGER_TAG);
                            dOut.writeLong(seqLen);
                            tvpCount.set(abvs);
                        } catch (Exception e) {
                            throw new SystemException(ErrorCode.SYSE0001, 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.