You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/08/05 09:18:21 UTC
[GitHub] [spark] gaborgsomogyi commented on a change in pull request #24967:
[SPARK-28163][SS] Use CaseInsensitiveMap for KafkaOffsetReader
gaborgsomogyi commented on a change in pull request #24967: [SPARK-28163][SS] Use CaseInsensitiveMap for KafkaOffsetReader
URL: https://github.com/apache/spark/pull/24967#discussion_r310510284
##########
File path: external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/KafkaBatch.scala
##########
@@ -22,12 +22,13 @@ import org.apache.kafka.common.TopicPartition
import org.apache.spark.SparkEnv
import org.apache.spark.internal.Logging
import org.apache.spark.internal.config.Network.NETWORK_TIMEOUT
+import org.apache.spark.sql.catalyst.util.CaseInsensitiveMap
import org.apache.spark.sql.sources.v2.reader.{Batch, InputPartition, PartitionReaderFactory}
private[kafka010] class KafkaBatch(
strategy: ConsumerStrategy,
- sourceOptions: Map[String, String],
+ sourceOptions: CaseInsensitiveMap[String],
Review comment:
Just back from vacation and syncing. So originally I've considered to use `CaseInsensitiveStringMap` but not chosen because of the following:
* `CaseInsensitiveStringMap` implements java `Map` and if we're passing that around then lot of useful feature would disappear (`getOrElse`, `find`, ...) or we just have to add `asScala` to all the places where scala feature are used. All in all converting forth and back was overkill from my point of view.
* `KafkaBatch` is private API and though it can be different due to the considerations above.
As always if you think it worth then I can adapt...
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org