public ClickHouseClientBuilder nodeSelector(ClickHouseNodeSelector nodeSelector) {
        if (!ClickHouseChecker.nonNull(nodeSelector, "nodeSelector").equals(this.nodeSelector)) {
            this.nodeSelector = (nodeSelector.getPreferredProtocols().isEmpty() || nodeSelector.getPreferredProtocols()
                    .equals(Collections.singletonList(ClickHouseProtocol.ANY)))
                    && nodeSelector.getPreferredTags().isEmpty()
                            ? ClickHouseNodeSelector.EMPTY
                            : nodeSelector;
            resetConfig();
        }

        return this;
    }
Sets node selector.

@param nodeSelector non-null node selector
@return this builder
clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseClientBuilder.java