aboutsummaryrefslogtreecommitdiffstats
path: root/config-model
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@online.no>2022-06-29 13:21:48 +0200
committerTor Egge <Tor.Egge@online.no>2022-06-29 13:21:48 +0200
commitb5394b940f60a10123f247dfc19bac18cb9b370e (patch)
treee2947e48aefb6d81a11f64bfa8ef150f83d5e4ae /config-model
parent4eff6c24b1db63eca7c5a43f82768eda043cfedf (diff)
Style fixes. Add member function comment.
Diffstat (limited to 'config-model')
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/SummaryConsistency.java10
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/documentmodel/SummaryField.java4
2 files changed, 9 insertions, 5 deletions
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/SummaryConsistency.java b/config-model/src/main/java/com/yahoo/schema/processing/SummaryConsistency.java
index bcb0917b61a..4aa8f6f0e37 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/SummaryConsistency.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/SummaryConsistency.java
@@ -71,8 +71,8 @@ public class SummaryConsistency extends Processor {
/** If the source is a complex field with only struct field attributes then make this use the attribute combiner transform */
private void makeAttributeCombinerTransformIfAppropriate(SummaryField summaryField, Schema schema) {
if (summaryField.getTransform() == SummaryTransform.NONE) {
- String source_field_name = summaryField.getSingleSource();
- ImmutableSDField source = schema.getField(source_field_name);
+ String sourceFieldName = summaryField.getSingleSource();
+ ImmutableSDField source = schema.getField(sourceFieldName);
if (source != null && isComplexFieldWithOnlyStructFieldAttributes(source)) {
summaryField.setTransform(SummaryTransform.ATTRIBUTECOMBINER);
}
@@ -80,12 +80,12 @@ public class SummaryConsistency extends Processor {
}
/*
- * This function must be called after makeAttributeCombinerIfAppropriate().
+ * This function must be called after makeAttributeCombinerTransformIfAppropriate().
*/
private void makeCopyTransformIfAppropriate(SummaryField summaryField, Schema schema) {
if (summaryField.getTransform() == SummaryTransform.NONE) {
- String source_field_name = summaryField.getSingleSource();
- ImmutableSDField source = schema.getField(source_field_name);
+ String sourceFieldName = summaryField.getSingleSource();
+ ImmutableSDField source = schema.getField(sourceFieldName);
if (source != null && source.usesStructOrMap() && summaryField.hasExplicitSingleSource()) {
summaryField.setTransform(SummaryTransform.COPY);
}
diff --git a/config-model/src/main/java/com/yahoo/vespa/documentmodel/SummaryField.java b/config-model/src/main/java/com/yahoo/vespa/documentmodel/SummaryField.java
index 61889eb36e2..58044163885 100644
--- a/config-model/src/main/java/com/yahoo/vespa/documentmodel/SummaryField.java
+++ b/config-model/src/main/java/com/yahoo/vespa/documentmodel/SummaryField.java
@@ -263,6 +263,10 @@ public class SummaryField extends Field implements Cloneable, TypedKey {
}
}
+ /**
+ * Returns true if the summary field uses an explicit source, i.e.
+ * a field with different name that is not a nested field.
+ */
public boolean hasExplicitSingleSource() {
String fieldName = getName();
String sourceName = getSingleSource();