reswqa commented on code in PR #29: URL: https://github.com/apache/flink-connector-pulsar/pull/29#discussion_r1108030494
########## flink-connector-pulsar/src/main/java/org/apache/flink/connector/pulsar/source/enumerator/topic/TopicPartition.java: ########## @@ -96,8 +100,12 @@ public TopicPartition(String topic, List<TopicRange> ranges) { public TopicPartition(String topic, int partitionId, List<TopicRange> ranges) { checkArgument(partitionId >= NON_PARTITION_ID, "Invalid partition id."); - this.topic = topicName(checkNotNull(topic)); - this.partitionId = partitionId; + TopicName topicName = TopicName.get(topic); + this.topic = topicName.getPartitionedTopicName(); + this.partitionId = + partitionId == NON_PARTITION_ID && topicName.isPartitioned() Review Comment: If we forced replace the partitionId here, we may need to print a warn level log to avoid confuse. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org