Copilot commented on code in PR #13237:
URL: https://github.com/apache/gluten/pull/13237#discussion_r4366518786


##########
backends-velox/src-kafka/main/scala/org/apache/gluten/component/VeloxKafkaComponent.scala:
##########
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.gluten.component
+
+import org.apache.gluten.backendsapi.velox.VeloxBackend
+import org.apache.gluten.execution.OffloadKafkaScan
+import org.apache.gluten.extension.injector.Injector
+
+import org.apache.spark.util.SparkReflectionUtil
+
+class VeloxKafkaComponent extends Component {
+  override def name(): String = "velox-kafka"
+
+  override def dependencies(): Seq[Class[_ <: Component]] = 
classOf[VeloxBackend] :: Nil
+
+  override def isRuntimeCompatible: Boolean = {
+    
SparkReflectionUtil.isClassPresent("org.apache.spark.sql.kafka010.KafkaSourceProvider")
+  }
+
+  override def injectRules(injector: Injector): Unit = {
+    OffloadKafkaScan.inject(injector)

Review Comment:
   Enabling this rule can offload a working SASL/PLAIN or SCRAM stream whose 
credentials are supplied through `kafka.sasl.jaas.config`, then fail during 
native consumer creation or authentication instead of falling back to Spark. 
The executor properties are forwarded unchanged, and 
`KafkaDataSource::addSplit` ignores the Java-only JAAS setting without 
translating it into librdkafka credentials. Gate offloading on supported 
consumer settings, retaining Spark for unsupported authentication 
configurations, and add a fallback regression test.



-- 
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