@Override public void initialize(Arguments args) throws DirectiveParseException { this.col = ((ColumnName) args.value("source")).value(); this.start = ((Numeric) args.value("start")).value().intValue(); this.end = ((Numeric) args.value("end")).value().intValue(); this.dest = ((ColumnName) args.value("destination")).value(); this.start = this.start - 1; this.end = this.end - 1; }
@Override public void initialize(Arguments args) throws DirectiveParseException { this.column = ((ColumnName) args.value("column")).value(); if (args.contains("depth")) { this.depth = ((Numeric) args.value("depth")).value().intValue(); } else { this.depth = Integer.MAX_VALUE; } }
@Override public void initialize(Arguments args) throws DirectiveParseException { this.col1 = ((ColumnName) args.value("source")).value(); this.col2 = ((ColumnName) args.value("destination")).value(); List<Triplet<Numeric, Numeric, String>> ranges = ((Ranges) args.value("ranges")).value(); for (Triplet<Numeric, Numeric, String> range : ranges) { double lower = range.getFirst().value().doubleValue(); double upper = range.getSecond().value().doubleValue(); rangeMap.put(Range.closed(lower, upper), range.getThird()); } }
@Override public void initialize(Arguments args) throws DirectiveParseException { this.col = ((ColumnName) args.value("column")).value(); if (args.contains("depth")) { this.depth = ((Numeric) args.value("depth")).value().intValue(); } else { this.depth = Integer.MAX_VALUE; } }
@Override public void initialize(Arguments args) throws DirectiveParseException { this.column = ((ColumnName) args.value("column")).value(); this.schemaId = ((Identifier) args.value("schema-id")).value(); this.type = ((Identifier) args.value("encode-type")).value(); if (!"json".equalsIgnoreCase(type) && !"binary".equalsIgnoreCase(type)) { throw new DirectiveParseException( String.format("Parsing AVRO can be either of type 'json' or 'binary'") ); } if(args.contains("version")) { this.version = ((Numeric) args.value("version")).value().intValue(); } else { this.version = -1; } }
@Override public void initialize(Arguments args) throws DirectiveParseException { column = ((ColumnName) args.value("column")).value(); delimiter = ((Text) args.value("delimiter")).value(); if (args.contains("limit")) { Numeric numeric = args.value("limit"); limit = numeric.value().intValue(); } else { limit = Integer.MAX_VALUE; } }
@Override public void initialize(Arguments args) throws DirectiveParseException { this.column = ((ColumnName) args.value("column")).value(); this.schemaId = ((Identifier) args.value("schema-id")).value(); this.recordName = ((Text) args.value("record-name")).value(); if(args.contains("version")) { this.version = ((Numeric) args.value("version")).value().intValue(); } else { this.version = -1; } }
@Override public void initialize(Arguments args) throws DirectiveParseException { this.variable = ((Identifier) args.value("variable")).value(); this.expression = ((Expression) args.value("condition")).value(); this.incrementBy = ((Numeric) args.value("value")).value().longValue(); try { el.compile(expression); } catch (ELException e) { throw new DirectiveParseException(e.getMessage()); } }
} else if (specification.type() == TokenType.NUMERIC_LIST && token.type() == TokenType.NUMERIC) { List<LazyNumber> values = new ArrayList<>(); values.add(((Numeric) token).value()); tokens.put(specification.name(), new NumericList(values)); pos = pos + 1;
@Override public void initialize(Arguments args) throws DirectiveParseException { this.column = ((ColumnName) args.value("column")).value(); if (args.contains("depth")) { this.depth = ((Numeric) args.value("depth")).value().intValue(); } else { this.depth = Integer.MAX_VALUE; } context = new DefaultHapiContext(); context.setValidationContext(new NoValidation()); ModelClassFactory modelClassFactory = new GenericModelClassFactory(); parser = new PipeParser(modelClassFactory); parser.getParserConfiguration().setAllowUnknownVersions(true); }