micheal-o commented on code in PR #47927:
URL: https://github.com/apache/spark/pull/47927#discussion_r1776366535


##########
connector/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/KafkaSourceProvider.scala:
##########
@@ -271,6 +271,11 @@ private[kafka010] class KafkaSourceProvider extends 
DataSourceRegister
       if (p <= 0) throw new IllegalArgumentException("minPartitions must be 
positive")
     }
 
+    if (params.contains(MAX_RECORDS_PER_PARTITIONS_OPTION_KEY)) {
+      val p = params(MAX_RECORDS_PER_PARTITIONS_OPTION_KEY).toLong
+      if (p <= 0) throw new IllegalArgumentException("maxRecordsPerPartition 
must be positive")

Review Comment:
   nit: use `MAX_RECORDS_PER_PARTITION_OPTION_KEY` instead of re-typing it here



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to