Skip to content

Commit 45deceb

Browse files
gaurav8297raunaqmorarka
authored andcommitted
Rename NodeRepresentation identifier to descriptor
1 parent b814e35 commit 45deceb

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

core/trino-main/src/main/java/io/trino/sql/planner/planprinter/JsonRenderer.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ private JsonRenderedNode renderJson(PlanRepresentation plan, NodeRepresentation
4848
return new JsonRenderedNode(
4949
node.getId().toString(),
5050
node.getName(),
51-
node.getIdentifier(),
51+
node.getDescriptor(),
5252
node.getOutputs(),
5353
node.getDetails(),
5454
node.getEstimates(plan.getTypes()),
@@ -62,7 +62,7 @@ public static class JsonRenderedNode
6262
{
6363
private final String id;
6464
private final String name;
65-
private final String identifier;
65+
private final String descriptor;
6666
private final List<TypedSymbol> outputs;
6767
private final String details;
6868
private final List<PlanNodeStatsAndCostSummary> estimates;
@@ -72,7 +72,7 @@ public static class JsonRenderedNode
7272
public JsonRenderedNode(
7373
String id,
7474
String name,
75-
String identifier,
75+
String descriptor,
7676
List<TypedSymbol> outputs,
7777
String details,
7878
List<PlanNodeStatsAndCostSummary> estimates,
@@ -81,7 +81,7 @@ public JsonRenderedNode(
8181
{
8282
this.id = requireNonNull(id, "id is null");
8383
this.name = requireNonNull(name, "name is null");
84-
this.identifier = requireNonNull(identifier, "identifier is null");
84+
this.descriptor = requireNonNull(descriptor, "descriptor is null");
8585
this.outputs = requireNonNull(outputs, "outputs is null");
8686
this.details = requireNonNull(details, "details is null");
8787
this.estimates = requireNonNull(estimates, "estimates is null");
@@ -102,9 +102,9 @@ public String getName()
102102
}
103103

104104
@JsonProperty
105-
public String getIdentifier()
105+
public String getDescriptor()
106106
{
107-
return identifier;
107+
return descriptor;
108108
}
109109

110110
@JsonProperty

core/trino-main/src/main/java/io/trino/sql/planner/planprinter/NodeRepresentation.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public class NodeRepresentation
3737
private final PlanNodeId id;
3838
private final String name;
3939
private final String type;
40-
private final String identifier;
40+
private final String descriptor;
4141
private final List<TypedSymbol> outputs;
4242
private final List<PlanNodeId> children;
4343
private final List<PlanFragmentId> remoteSources;
@@ -52,7 +52,7 @@ public NodeRepresentation(
5252
PlanNodeId id,
5353
String name,
5454
String type,
55-
String identifier,
55+
String descriptor,
5656
List<TypedSymbol> outputs,
5757
Optional<PlanNodeStats> stats,
5858
List<PlanNodeStatsEstimate> estimatedStats,
@@ -64,7 +64,7 @@ public NodeRepresentation(
6464
this.id = requireNonNull(id, "id is null");
6565
this.name = requireNonNull(name, "name is null");
6666
this.type = requireNonNull(type, "type is null");
67-
this.identifier = requireNonNull(identifier, "identifier is null");
67+
this.descriptor = requireNonNull(descriptor, "descriptor is null");
6868
this.outputs = requireNonNull(outputs, "outputs is null");
6969
this.stats = requireNonNull(stats, "stats is null");
7070
this.estimatedStats = requireNonNull(estimatedStats, "estimatedStats is null");
@@ -107,9 +107,9 @@ public String getType()
107107
return type;
108108
}
109109

110-
public String getIdentifier()
110+
public String getDescriptor()
111111
{
112-
return identifier;
112+
return descriptor;
113113
}
114114

115115
public List<TypedSymbol> getOutputs()

core/trino-main/src/main/java/io/trino/sql/planner/planprinter/PlanPrinter.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1560,25 +1560,25 @@ public NodeRepresentation addNode(PlanNode node, String name)
15601560
return addNode(node, name, "");
15611561
}
15621562

1563-
public NodeRepresentation addNode(PlanNode node, String name, String identifier)
1563+
public NodeRepresentation addNode(PlanNode node, String name, String descriptor)
15641564
{
1565-
return addNode(node, name, identifier, node.getSources(), Optional.empty());
1565+
return addNode(node, name, descriptor, node.getSources(), Optional.empty());
15661566
}
15671567

1568-
public NodeRepresentation addNode(PlanNode node, String name, String identifier, Optional<PlanNodeStatsAndCostSummary> reorderJoinStatsAndCost)
1568+
public NodeRepresentation addNode(PlanNode node, String name, String descriptor, Optional<PlanNodeStatsAndCostSummary> reorderJoinStatsAndCost)
15691569
{
1570-
return addNode(node, name, identifier, node.getSources(), reorderJoinStatsAndCost);
1570+
return addNode(node, name, descriptor, node.getSources(), reorderJoinStatsAndCost);
15711571
}
15721572

1573-
public NodeRepresentation addNode(PlanNode node, String name, String identifier, List<PlanNode> children, Optional<PlanNodeStatsAndCostSummary> reorderJoinStatsAndCost)
1573+
public NodeRepresentation addNode(PlanNode node, String name, String descriptor, List<PlanNode> children, Optional<PlanNodeStatsAndCostSummary> reorderJoinStatsAndCost)
15741574
{
1575-
return addNode(node, name, identifier, ImmutableList.of(node.getId()), children, ImmutableList.of(), reorderJoinStatsAndCost);
1575+
return addNode(node, name, descriptor, ImmutableList.of(node.getId()), children, ImmutableList.of(), reorderJoinStatsAndCost);
15761576
}
15771577

15781578
public NodeRepresentation addNode(
15791579
PlanNode rootNode,
15801580
String name,
1581-
String identifier,
1581+
String descriptor,
15821582
List<PlanNodeId> allNodes,
15831583
List<PlanNode> children,
15841584
List<PlanFragmentId> remoteSources,
@@ -1596,7 +1596,7 @@ public NodeRepresentation addNode(
15961596
rootNode.getId(),
15971597
name,
15981598
rootNode.getClass().getSimpleName(),
1599-
identifier,
1599+
descriptor,
16001600
rootNode.getOutputSymbols().stream()
16011601
.map(s -> new TypedSymbol(s, types.get(s).getDisplayName()))
16021602
.collect(toImmutableList()),

core/trino-main/src/main/java/io/trino/sql/planner/planprinter/TextRenderer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ private String writeTextOutput(StringBuilder output, PlanRepresentation plan, In
6565
{
6666
output.append(indent.nodeIndent())
6767
.append(node.getName())
68-
.append(node.getIdentifier())
68+
.append(node.getDescriptor())
6969
.append("\n");
7070

7171
String columns = node.getOutputs().stream()

0 commit comments

Comments
 (0)