throw new InvalidFieldReferenceException("Invalid POJO field reference \""+fieldExpression+"\"."); throw new InvalidFieldReferenceException("Unable to find field \""+field+"\" in type "+this+"."); throw new InvalidFieldReferenceException("Nested field expression \""+tail+"\" not possible on atomic type "+fieldType+".");
if(!matcher.matches()) { if (fieldExpression.equals(ExpressionKeys.SELECT_ALL_CHAR) || fieldExpression.equals(ExpressionKeys.SELECT_ALL_CHAR_SCALA)) { throw new InvalidFieldReferenceException("Wildcard expressions are not allowed here."); } else { throw new InvalidFieldReferenceException("Invalid format of tuple field expression \""+fieldExpression+"\"."); throw new InvalidFieldReferenceException("Tuple field expression \""+fieldStr+"\" out of bounds of "+this.toString()+"."); return ((CompositeType<?>) fieldType).getTypeAt(tail); } else { throw new InvalidFieldReferenceException("Nested field expression \""+tail+"\" not possible on atomic type "+fieldType+".");
if(!matcher.matches()) { if (fieldExpression.equals(ExpressionKeys.SELECT_ALL_CHAR) || fieldExpression.equals(ExpressionKeys.SELECT_ALL_CHAR_SCALA)) { throw new InvalidFieldReferenceException("Wildcard expressions are not allowed here."); } else { throw new InvalidFieldReferenceException("Invalid format of tuple field expression \""+fieldExpression+"\"."); throw new InvalidFieldReferenceException("Tuple field expression \""+fieldStr+"\" out of bounds of "+this.toString()+"."); return ((CompositeType<?>) fieldType).getTypeAt(tail); } else { throw new InvalidFieldReferenceException("Nested field expression \""+tail+"\" not possible on atomic type "+fieldType+".");
RecursiveProductFieldAccessor(int pos, TypeInformation<T> typeInfo, FieldAccessor<R, F> innerAccessor, ExecutionConfig config) { int arity = ((TupleTypeInfoBase) typeInfo).getArity(); if (pos < 0 || pos >= arity) { throw new CompositeType.InvalidFieldReferenceException( "Tried to select " + ((Integer) pos).toString() + ". field on \"" + typeInfo.toString() + "\", which is an invalid index."); } checkNotNull(typeInfo, "typeInfo must not be null."); checkNotNull(innerAccessor, "innerAccessor must not be null."); this.pos = pos; this.fieldType = ((TupleTypeInfoBase<T>) typeInfo).getTypeAt(pos); this.serializer = (TupleSerializerBase<T>) typeInfo.createSerializer(config); this.length = this.serializer.getArity(); this.fields = new Object[this.length]; this.innerAccessor = innerAccessor; }
private static TypeInformation<?> getExpressionTypeInformation(String fieldStr, TypeInformation<?> typeInfo) { Matcher wildcardMatcher = PATTERN_WILDCARD.matcher(fieldStr); if (wildcardMatcher.matches()) { return typeInfo; } else { Matcher expMatcher = PATTERN_FIELD.matcher(fieldStr); if (!expMatcher.matches()) { throw new InvalidFieldReferenceException("Invalid field expression \"" + fieldStr + "\"."); } if (typeInfo instanceof CompositeType<?>) { return ((CompositeType<?>) typeInfo).getTypeAt(expMatcher.group(1)); } else { throw new InvalidFieldReferenceException("Nested field expression \"" + fieldStr + "\" not possible on atomic type (" + typeInfo + ")."); } } }
RecursiveProductFieldAccessor(int pos, TypeInformation<T> typeInfo, FieldAccessor<R, F> innerAccessor, ExecutionConfig config) { int arity = ((TupleTypeInfoBase) typeInfo).getArity(); if (pos < 0 || pos >= arity) { throw new CompositeType.InvalidFieldReferenceException( "Tried to select " + ((Integer) pos).toString() + ". field on \"" + typeInfo.toString() + "\", which is an invalid index."); } checkNotNull(typeInfo, "typeInfo must not be null."); checkNotNull(innerAccessor, "innerAccessor must not be null."); this.pos = pos; this.fieldType = ((TupleTypeInfoBase<T>) typeInfo).getTypeAt(pos); this.serializer = (TupleSerializerBase<T>) typeInfo.createSerializer(config); this.length = this.serializer.getArity(); this.fields = new Object[this.length]; this.innerAccessor = innerAccessor; }
RecursiveTupleFieldAccessor(int pos, FieldAccessor<R, F> innerAccessor, TypeInformation<T> typeInfo) { checkNotNull(typeInfo, "typeInfo must not be null."); checkNotNull(innerAccessor, "innerAccessor must not be null."); int arity = ((TupleTypeInfo) typeInfo).getArity(); if (pos < 0 || pos >= arity) { throw new CompositeType.InvalidFieldReferenceException( "Tried to select " + ((Integer) pos).toString() + ". field on \"" + typeInfo.toString() + "\", which is an invalid index."); } if (pos < 0) { throw new CompositeType.InvalidFieldReferenceException("Tried to select " + ((Integer) pos).toString() + ". field."); } this.pos = pos; this.innerAccessor = innerAccessor; this.fieldType = innerAccessor.fieldType; }
private static TypeInformation<?> getExpressionTypeInformation(String fieldStr, TypeInformation<?> typeInfo) { Matcher wildcardMatcher = PATTERN_WILDCARD.matcher(fieldStr); if (wildcardMatcher.matches()) { return typeInfo; } else { Matcher expMatcher = PATTERN_FIELD.matcher(fieldStr); if (!expMatcher.matches()) { throw new InvalidFieldReferenceException("Invalid field expression \"" + fieldStr + "\"."); } if (typeInfo instanceof CompositeType<?>) { return ((CompositeType<?>) typeInfo).getTypeAt(expMatcher.group(1)); } else { throw new InvalidFieldReferenceException("Nested field expression \"" + fieldStr + "\" not possible on atomic type (" + typeInfo + ")."); } } }
RecursiveProductFieldAccessor(int pos, TypeInformation<T> typeInfo, FieldAccessor<R, F> innerAccessor, ExecutionConfig config) { int arity = ((TupleTypeInfoBase) typeInfo).getArity(); if (pos < 0 || pos >= arity) { throw new CompositeType.InvalidFieldReferenceException( "Tried to select " + ((Integer) pos).toString() + ". field on \"" + typeInfo.toString() + "\", which is an invalid index."); } checkNotNull(typeInfo, "typeInfo must not be null."); checkNotNull(innerAccessor, "innerAccessor must not be null."); this.pos = pos; this.fieldType = ((TupleTypeInfoBase<T>) typeInfo).getTypeAt(pos); this.serializer = (TupleSerializerBase<T>) typeInfo.createSerializer(config); this.length = this.serializer.getArity(); this.fields = new Object[this.length]; this.innerAccessor = innerAccessor; }
SimpleProductFieldAccessor(int pos, TypeInformation<T> typeInfo, ExecutionConfig config) { checkNotNull(typeInfo, "typeInfo must not be null."); int arity = ((TupleTypeInfoBase) typeInfo).getArity(); if (pos < 0 || pos >= arity) { throw new CompositeType.InvalidFieldReferenceException( "Tried to select " + ((Integer) pos).toString() + ". field on \"" + typeInfo.toString() + "\", which is an invalid index."); } this.pos = pos; this.fieldType = ((TupleTypeInfoBase<T>) typeInfo).getTypeAt(pos); this.serializer = (TupleSerializerBase<T>) typeInfo.createSerializer(config); this.length = this.serializer.getArity(); this.fields = new Object[this.length]; }
SimpleProductFieldAccessor(int pos, TypeInformation<T> typeInfo, ExecutionConfig config) { checkNotNull(typeInfo, "typeInfo must not be null."); int arity = ((TupleTypeInfoBase) typeInfo).getArity(); if (pos < 0 || pos >= arity) { throw new CompositeType.InvalidFieldReferenceException( "Tried to select " + ((Integer) pos).toString() + ". field on \"" + typeInfo.toString() + "\", which is an invalid index."); } this.pos = pos; this.fieldType = ((TupleTypeInfoBase<T>) typeInfo).getTypeAt(pos); this.serializer = (TupleSerializerBase<T>) typeInfo.createSerializer(config); this.length = this.serializer.getArity(); this.fields = new Object[this.length]; }
SimpleProductFieldAccessor(int pos, TypeInformation<T> typeInfo, ExecutionConfig config) { checkNotNull(typeInfo, "typeInfo must not be null."); int arity = ((TupleTypeInfoBase) typeInfo).getArity(); if (pos < 0 || pos >= arity) { throw new CompositeType.InvalidFieldReferenceException( "Tried to select " + ((Integer) pos).toString() + ". field on \"" + typeInfo.toString() + "\", which is an invalid index."); } this.pos = pos; this.fieldType = ((TupleTypeInfoBase<T>) typeInfo).getTypeAt(pos); this.serializer = (TupleSerializerBase<T>) typeInfo.createSerializer(config); this.length = this.serializer.getArity(); this.fields = new Object[this.length]; }
private static FieldExpression decomposeFieldExpression(String fieldExpression) { Matcher matcher = PATTERN_NESTED_FIELDS_WILDCARD.matcher(fieldExpression); if (!matcher.matches()) { throw new CompositeType.InvalidFieldReferenceException("Invalid field expression \"" + fieldExpression + "\"."); } String head = matcher.group(0); if (head.equals(Keys.ExpressionKeys.SELECT_ALL_CHAR) || head.equals(Keys.ExpressionKeys.SELECT_ALL_CHAR_SCALA)) { throw new CompositeType.InvalidFieldReferenceException("No wildcards are allowed here."); } else { head = matcher.group(1); } String tail = matcher.group(3); return new FieldExpression(head, tail); }
private static FieldExpression decomposeFieldExpression(String fieldExpression) { Matcher matcher = PATTERN_NESTED_FIELDS_WILDCARD.matcher(fieldExpression); if (!matcher.matches()) { throw new CompositeType.InvalidFieldReferenceException("Invalid field expression \"" + fieldExpression + "\"."); } String head = matcher.group(0); if (head.equals(Keys.ExpressionKeys.SELECT_ALL_CHAR) || head.equals(Keys.ExpressionKeys.SELECT_ALL_CHAR_SCALA)) { throw new CompositeType.InvalidFieldReferenceException("No wildcards are allowed here."); } else { head = matcher.group(1); } String tail = matcher.group(3); return new FieldExpression(head, tail); }
private static FieldExpression decomposeFieldExpression(String fieldExpression) { Matcher matcher = PATTERN_NESTED_FIELDS_WILDCARD.matcher(fieldExpression); if (!matcher.matches()) { throw new CompositeType.InvalidFieldReferenceException("Invalid field expression \"" + fieldExpression + "\"."); } String head = matcher.group(0); if (head.equals(Keys.ExpressionKeys.SELECT_ALL_CHAR) || head.equals(Keys.ExpressionKeys.SELECT_ALL_CHAR_SCALA)) { throw new CompositeType.InvalidFieldReferenceException("No wildcards are allowed here."); } else { head = matcher.group(1); } String tail = matcher.group(3); return new FieldExpression(head, tail); }
RecursiveTupleFieldAccessor(int pos, FieldAccessor<R, F> innerAccessor, TypeInformation<T> typeInfo) { checkNotNull(typeInfo, "typeInfo must not be null."); checkNotNull(innerAccessor, "innerAccessor must not be null."); int arity = ((TupleTypeInfo) typeInfo).getArity(); if (pos < 0 || pos >= arity) { throw new CompositeType.InvalidFieldReferenceException( "Tried to select " + ((Integer) pos).toString() + ". field on \"" + typeInfo.toString() + "\", which is an invalid index."); } this.pos = pos; this.innerAccessor = innerAccessor; this.fieldType = innerAccessor.fieldType; }
RecursiveTupleFieldAccessor(int pos, FieldAccessor<R, F> innerAccessor, TypeInformation<T> typeInfo) { checkNotNull(typeInfo, "typeInfo must not be null."); checkNotNull(innerAccessor, "innerAccessor must not be null."); int arity = ((TupleTypeInfo) typeInfo).getArity(); if (pos < 0 || pos >= arity) { throw new CompositeType.InvalidFieldReferenceException( "Tried to select " + ((Integer) pos).toString() + ". field on \"" + typeInfo.toString() + "\", which is an invalid index."); } this.pos = pos; this.innerAccessor = innerAccessor; this.fieldType = innerAccessor.fieldType; }
public ArrayFieldAccessor(int pos, TypeInformation typeInfo) { if (pos < 0) { throw new CompositeType.InvalidFieldReferenceException("The " + ((Integer) pos).toString() + ". field selected on" + " an array, which is an invalid index."); } checkNotNull(typeInfo, "typeInfo must not be null."); this.pos = pos; this.fieldType = BasicTypeInfo.getInfoFor(typeInfo.getTypeClass().getComponentType()); }
private static List<FlatFieldDescriptor> getFlatFields(String fieldStr, TypeInformation<?> typeInfo) { if (typeInfo instanceof CompositeType<?>) { return ((CompositeType<?>) typeInfo).getFlatFields(fieldStr); } else { Matcher wildcardMatcher = PATTERN_WILDCARD.matcher(fieldStr); if (wildcardMatcher.matches()) { return Collections.singletonList(new FlatFieldDescriptor(0, typeInfo)); } else { throw new InvalidFieldReferenceException("Nested field expression \"" + fieldStr + "\" not possible on atomic type (" + typeInfo + ")."); } } }
public ArrayFieldAccessor(int pos, TypeInformation typeInfo) { if (pos < 0) { throw new CompositeType.InvalidFieldReferenceException("The " + ((Integer) pos).toString() + ". field selected on" + " an array, which is an invalid index."); } checkNotNull(typeInfo, "typeInfo must not be null."); this.pos = pos; this.fieldType = BasicTypeInfo.getInfoFor(typeInfo.getTypeClass().getComponentType()); }