Skip to content

Commit 7d9e184

Browse files
committed
namespace -> urn
1 parent 3ffcb9d commit 7d9e184

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

core/src/main/java/io/substrait/extension/ImmutableExtensionLookup.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ public Builder from(ExtendedExpression extendedExpression) {
4141
private Builder from(
4242
List<SimpleExtensionURN> simpleExtensionURNs,
4343
List<SimpleExtensionDeclaration> simpleExtensionDeclarations) {
44-
Map<Integer, String> namespaceMap = new HashMap<>();
44+
Map<Integer, String> urnMap = new HashMap<>();
4545
// Handle URN format
4646
for (SimpleExtensionURN extension : simpleExtensionURNs) {
47-
namespaceMap.put(extension.getExtensionUrnAnchor(), extension.getUrn());
47+
urnMap.put(extension.getExtensionUrnAnchor(), extension.getUrn());
4848
}
4949

5050
// Add all functions used in plan to the functionMap
@@ -54,14 +54,14 @@ private Builder from(
5454
}
5555
SimpleExtensionDeclaration.ExtensionFunction func = extension.getExtensionFunction();
5656
int reference = func.getFunctionAnchor();
57-
String namespace = namespaceMap.get(func.getExtensionUrnReference());
58-
if (namespace == null) {
57+
String urn = urnMap.get(func.getExtensionUrnReference());
58+
if (urn == null) {
5959
throw new IllegalStateException(
6060
"Could not find extension URN for function reference "
6161
+ func.getExtensionUrnReference());
6262
}
6363
String name = func.getName();
64-
SimpleExtension.FunctionAnchor anchor = SimpleExtension.FunctionAnchor.of(namespace, name);
64+
SimpleExtension.FunctionAnchor anchor = SimpleExtension.FunctionAnchor.of(urn, name);
6565
functionMap.put(reference, anchor);
6666
}
6767

@@ -72,13 +72,13 @@ private Builder from(
7272
}
7373
SimpleExtensionDeclaration.ExtensionType type = extension.getExtensionType();
7474
int reference = type.getTypeAnchor();
75-
String namespace = namespaceMap.get(type.getExtensionUrnReference());
76-
if (namespace == null) {
75+
String urn = urnMap.get(type.getExtensionUrnReference());
76+
if (urn == null) {
7777
throw new IllegalStateException(
7878
"Could not find extension URN for type reference " + type.getExtensionUrnReference());
7979
}
8080
String name = type.getName();
81-
SimpleExtension.TypeAnchor anchor = SimpleExtension.TypeAnchor.of(namespace, name);
81+
SimpleExtension.TypeAnchor anchor = SimpleExtension.TypeAnchor.of(urn, name);
8282
typeMap.put(reference, anchor);
8383
}
8484

0 commit comments

Comments
 (0)