private void rewriteRepartitionNodes() {
        final Set<BaseRepartitionNode<?, ?>> nodes = new NodesWithRelaxedNullKeyJoinDownstream(root).find();
        for (final BaseRepartitionNode<?, ?> partitionNode : nodes) {
            if (partitionNode.getProcessorParameters() != null) {
                partitionNode.setProcessorParameters(new ProcessorParameters<>(
                    new KStreamFilter<>((k, v) -> k != null, false),
                    partitionNode.getProcessorParameters().processorName()
                ));
            }
        }
    }
A user can provide either the config OPTIMIZE which means all optimizations rules will be
applied or they can provide a list of optimization rules.
streams/src/main/java/org/apache/kafka/streams/kstream/internals/InternalStreamsBuilder.java