Examples of toIntegerValue()


Examples of com.asakusafw.dmdl.model.AstLiteral.toIntegerValue()

            DmdlSemantics environment, AstAttribute attribute,
            Map<String, AstAttributeElement> elements, OrcFileTrait result) {
        AstLiteral stripeSize = take(environment, attribute, elements, ELEMENT_STRIPE_SIZE, LiteralKind.INTEGER);
        if (stripeSize != null) {
            String label = label(ELEMENT_STRIPE_SIZE);
            BigInteger value = stripeSize.toIntegerValue();
            if (AttributeUtil.checkRange(environment, stripeSize, label, value, MINIMUM_STRIPE_SIZE, Long.MAX_VALUE)) {
                result.configuration().withStripeSize(value.longValue());
            }
        }
    }
View Full Code Here

Examples of com.asakusafw.dmdl.model.AstLiteral.toIntegerValue()

            Map<String, AstAttributeElement> elements,
            HiveFieldTrait trait) {
        AstLiteral length = AttributeUtil.takeLiteral(
                environment, attribute, elements, ELEMENT_NAME, LiteralKind.INTEGER, true);
        if (length != null) {
            BigInteger value = length.toIntegerValue();
            if (AttributeUtil.checkRange(
                    environment, length, label(ELEMENT_NAME),
                    value, 1L, (long) HiveVarchar.MAX_VARCHAR_LENGTH)) {
                trait.setVarcharTypeInfo(value.intValue());
            }
View Full Code Here

Examples of com.asakusafw.dmdl.model.AstLiteral.toIntegerValue()

            Map<String, AstAttributeElement> elements,
            HiveFieldTrait trait) {
        AstLiteral length = AttributeUtil.takeLiteral(
                environment, attribute, elements, ELEMENT_NAME, LiteralKind.INTEGER, true);
        if (length != null) {
            BigInteger value = length.toIntegerValue();
            if (AttributeUtil.checkRange(
                    environment, length, label(ELEMENT_NAME),
                    value, 1L, (long) HiveChar.MAX_CHAR_LENGTH)) {
                trait.setCharTypeInfo(value.intValue());
            }
View Full Code Here

Examples of com.asakusafw.dmdl.model.AstLiteral.toIntegerValue()

                environment, attribute, elements, ELEMENT_PRECISION_NAME, LiteralKind.INTEGER, true);
        int precisionValue = -1;
        if (precision != null) {
            if (AttributeUtil.checkRange(
                    environment, precision, label(ELEMENT_PRECISION_NAME),
                    precision.toIntegerValue(), 1L, (long) HiveDecimal.MAX_PRECISION)) {
                precisionValue = precision.toIntegerValue().intValue();
            }
        }
        AstLiteral scale = AttributeUtil.takeLiteral(
                environment, attribute, elements, ELEMENT_SCALE_NAME, LiteralKind.INTEGER, true);
View Full Code Here

Examples of com.asakusafw.dmdl.model.AstLiteral.toIntegerValue()

        int precisionValue = -1;
        if (precision != null) {
            if (AttributeUtil.checkRange(
                    environment, precision, label(ELEMENT_PRECISION_NAME),
                    precision.toIntegerValue(), 1L, (long) HiveDecimal.MAX_PRECISION)) {
                precisionValue = precision.toIntegerValue().intValue();
            }
        }
        AstLiteral scale = AttributeUtil.takeLiteral(
                environment, attribute, elements, ELEMENT_SCALE_NAME, LiteralKind.INTEGER, true);
        int scaleValue = -1;
View Full Code Here

Examples of com.asakusafw.dmdl.model.AstLiteral.toIntegerValue()

                environment, attribute, elements, ELEMENT_SCALE_NAME, LiteralKind.INTEGER, true);
        int scaleValue = -1;
        if (scale != null) {
            if (AttributeUtil.checkRange(
                    environment, scale, label(ELEMENT_SCALE_NAME),
                    scale.toIntegerValue(), 0L, (long) HiveDecimal.MAX_SCALE)) {
                scaleValue = scale.toIntegerValue().intValue();
            }
        }
        if (precisionValue >= 0 && scaleValue >= 0) {
            if (precisionValue < scaleValue) {
View Full Code Here

Examples of com.asakusafw.dmdl.model.AstLiteral.toIntegerValue()

        int scaleValue = -1;
        if (scale != null) {
            if (AttributeUtil.checkRange(
                    environment, scale, label(ELEMENT_SCALE_NAME),
                    scale.toIntegerValue(), 0L, (long) HiveDecimal.MAX_SCALE)) {
                scaleValue = scale.toIntegerValue().intValue();
            }
        }
        if (precisionValue >= 0 && scaleValue >= 0) {
            if (precisionValue < scaleValue) {
                environment.report(new Diagnostic(
View Full Code Here

Examples of com.asakusafw.dmdl.model.AstLiteral.toIntegerValue()

            Map<String, AstAttributeElement> elements,
            String key, long min, long max) {
        AstLiteral size = take(environment, attribute, elements, key, LiteralKind.INTEGER);
        if (size != null) {
            String label = label(key);
            BigInteger value = size.toIntegerValue();
            if (AttributeUtil.checkRange(environment, size, label, value, min, max)) {
                return value.intValue();
            }
        }
        return null;
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.