@ThriftField(2) public String getType() { return type; }
case THRIFT_FIELD: if (annotation != null) { if (annotation.value() != Short.MIN_VALUE) { id = annotation.value(); isLegacyId = annotation.isLegacyId(); if (!annotation.name().isEmpty()) { name = annotation.name(); requiredness = requireNonNull(annotation.requiredness()); for (ThriftIdlAnnotation idlAnnotation : annotation.idlAnnotations()) { annotationMapBuilder.put(idlAnnotation.key(), idlAnnotation.value()); if (annotation.isRecursive() != ThriftField.Recursiveness.UNSPECIFIED) { switch (annotation.isRecursive()) { case TRUE: isRecursiveReference = true;
resolveFieldTypes(type, method.getGenericParameterTypes()), extractParameterNames(method)); if (annotation.value() != Short.MIN_VALUE) { metadataErrors.addError("A method with annotated parameters can not have a field id specified: %s.%s ", clazz.getName(), method.getName()); if (!annotation.name().isEmpty()) { metadataErrors.addError("A method with annotated parameters can not have a field name specified: %s.%s ", clazz.getName(), method.getName()); if (annotation.requiredness() == Requiredness.REQUIRED) { metadataErrors.addError("A method with annotated parameters can not be marked as required: %s.%s ", clazz.getName(), method.getName());
private static Optional<String> getThriftFieldParameterName(Parameter parameter) { return Optional.ofNullable(parameter.getAnnotation(ThriftField.class)) .flatMap(thriftField -> Optional.ofNullable(emptyToNull(thriftField.name()))); }
Requiredness parameterRequiredness = Requiredness.UNSPECIFIED; if (thriftField != null) { thriftFieldId = thriftField.value(); isLegacyId = thriftField.isLegacyId(); parameterRequiredness = thriftField.requiredness(); ImmutableMap.Builder<String, String> idlAnnotationsBuilder = ImmutableMap.builder(); for (ThriftIdlAnnotation idlAnnotation : thriftField.idlAnnotations()) { idlAnnotationsBuilder.put(idlAnnotation.key(), idlAnnotation.value()); if (!thriftField.name().isEmpty()) { parameterName = thriftField.name();
@ThriftField(2) public String getTableName() { return tableName; }
@ThriftField(2) public PrestoThriftBound getBound() { return bound; }
@ThriftField(2) public int getPort() { return port; }
@ThriftField(1) public String getName() { return name; }
@ThriftField(1) public boolean isAll() { return all; }
/** * Returns data in a columnar format. * Columns in this list must be in the order they were requested by the engine. */ @ThriftField(1) public List<PrestoThriftBlock> getColumnBlocks() { return columnBlocks; }
@ThriftField(1) public boolean isWhiteList() { return whiteList; }
@ThriftField(2) public PrestoThriftMarker getHigh() { return high; }
@ThriftField(4) public boolean isHidden() { return hidden; }
@ThriftField(1) public PrestoThriftSchemaTableName getSchemaTableName() { return schemaTableName; }
@ThriftField(2) public List<PrestoThriftColumnMetadata> getColumns() { return columns; }
/** * Encodes all the information needed to identify a batch of rows to return to Presto. * For a basic scan, includes schema name, table name, and output constraint. * For an index scan, includes schema name, table name, set of keys to lookup and output constraint. */ @ThriftField(1) public PrestoThriftId getSplitId() { return splitId; }
/** * Identifies the set of hosts on which the rows are available. If empty, then the rows * are expected to be available on any host. The hosts in this list may be independent * from the hosts used to serve metadata requests. */ @ThriftField(2) public List<PrestoThriftHostAddress> getHosts() { return hosts; }
@ThriftField(1) public List<PrestoThriftRange> getRanges() { return ranges; }
@ThriftField(1) public String getHost() { return host; }