spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uncleGen <...@git.apache.org>
Subject [GitHub] spark pull request #17209: [SPARK-19853][SS] uppercase kafka topics fail whe...
Date Sun, 12 Mar 2017 09:49:15 GMT
Github user uncleGen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/17209#discussion_r105553128
  
    --- Diff: external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/KafkaSourceProvider.scala
---
    @@ -128,18 +123,18 @@ private[kafka010] class KafkaSourceProvider extends DataSourceRegister
             .map { k => k.drop(6).toString -> parameters(k) }
             .toMap
     
    -    val startingRelationOffsets =
    -      caseInsensitiveParams.get(STARTING_OFFSETS_OPTION_KEY).map(_.trim.toLowerCase)
match {
    -        case Some("earliest") => EarliestOffsetRangeLimit
    -        case Some(json) => SpecificOffsetRangeLimit(JsonUtils.partitionOffsets(json))
    -        case None => EarliestOffsetRangeLimit
    +    val startingRelationOffsets = KafkaSourceProvider.getKafkaOffsetRangeLimit(
    +      caseInsensitiveParams, STARTING_OFFSETS_OPTION_KEY, EarliestOffsetRangeLimit) match
{
    +        case earliest @ EarliestOffsetRangeLimit => earliest
    --- End diff --
    
    👍  much more simple


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message