File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
clickhouse-core/src/main/scala/com/clickhouse/spark/spec Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -37,21 +37,21 @@ object TableEngineUtils extends Logging {
37
37
val clusterName = if (distributedEngineSpec.cluster.contains(" {" )) {
38
38
val macrosMap = macrosSpecs.map(spec => (spec.name, spec.substitution)).toMap
39
39
40
- var clusterName = distributedEngineSpec.cluster
41
- var startPos = clusterName .indexOf('{' )
40
+ var resolvedClusterName = distributedEngineSpec.cluster
41
+ var startPos = resolvedClusterName .indexOf('{' )
42
42
while (startPos >= 0 ) {
43
- val endPos = clusterName .indexOf('}' , startPos)
43
+ val endPos = resolvedClusterName .indexOf('}' , startPos)
44
44
if (endPos > startPos) {
45
- val macroName = clusterName .substring(startPos + 1 , endPos)
45
+ val macroName = resolvedClusterName .substring(startPos + 1 , endPos)
46
46
val substitution = macrosMap.getOrElse(macroName, throw CHClientException (s " Unknown macro: ${macroName}" ))
47
- clusterName = clusterName
47
+ resolvedClusterName = resolvedClusterName
48
48
.substring(0 , startPos)
49
49
.concat(substitution)
50
- .concat(clusterName .substring(endPos + 1 ))
50
+ .concat(resolvedClusterName .substring(endPos + 1 ))
51
51
}
52
- startPos = clusterName .indexOf('{' )
52
+ startPos = resolvedClusterName .indexOf('{' )
53
53
}
54
- clusterName
54
+ resolvedClusterName
55
55
} else {
56
56
distributedEngineSpec.cluster
57
57
}
You can’t perform that action at this time.
0 commit comments