hehuiyuan commented on issue #24270: [SPARK-27343][KAFKA][SS]Avoid hardcoded for spark-sql-kafka-0-10 URL: https://github.com/apache/spark/pull/24270#issuecomment-481100585 > @hehuiyuan I see 2 ways: > > * MAX_OFFSET_PER_TRIGGER.toLowerCase > * Find out whether `maxOffsetsPerTrigger` works at all on other places (I have a long standing suspicion that parameters with DSv2 are lowercase) > > Since the first one covers your PR and the second is significantly harder I think your latest suggestion is fine. > > UPDATE: since its a long standing suspicion of mine double checked `maxOffsetsPerTrigger` path whether all lowercase can be used: > > * `KafkaSourceProvider` uses caseInsensitiveParams which is lowercase all the time => Good > * `KafkaMicroBatchStream` uses `CaseInsensitiveStringMap` where get operation uses lowercase [conversion](https://github.com/apache/spark/blob/master/sql/catalyst/src/main/java/org/apache/spark/sql/util/CaseInsensitiveStringMap.java#L92). => Good > * `KafkaSource` uses `CaseInsensitiveMap` where get operation uses lowercase [conversion](https://github.com/apache/spark/blob/215609def22da14c464b37374ceae4f53a39a145/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/CaseInsensitiveMap.scala#L35). => Good I think you may be right.
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org