private DataType getFieldType(DataType input, TypeContext context) {
        if (input instanceof MapDataType entryInput) {
            if (structFieldName.equals(keyName))
                return entryInput.getKeyType();
            else if (structFieldName.equals(valueName))
                return entryInput.getValueType();
            else if (entryInput.getValueType() instanceof StructuredDataType structInput)
                return getStructFieldType(structInput);
        }
        else if (input instanceof StructuredDataType structInput) {
            return getStructFieldType(structInput);
        }
        throw new VerificationException(this, "Expected a struct or map, but got " + (input == null ? "no value": input.getName()));
    }
Returns the value of a struct field.

@author Simon Thoresen Hult
indexinglanguage/src/main/java/com/yahoo/vespa/indexinglanguage/expressions/GetFieldExpression.java