beliefer commented on code in PR #49961:
URL: https://github.com/apache/spark/pull/49961#discussion_r1985905297
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/python/PythonScan.scala:
##########
@@ -16,26 +16,43 @@
*/
package org.apache.spark.sql.execution.datasources.v2.python
+import org.apache.commons.lang3.StringUtils
+
import org.apache.spark.JobArtifactSet
+import org.apache.spark.sql.SparkSession
import org.apache.spark.sql.connector.metric.CustomMetric
import org.apache.spark.sql.connector.read._
import org.apache.spark.sql.connector.read.streaming.MicroBatchStream
+import org.apache.spark.sql.internal.connector.SupportsMetadata
import org.apache.spark.sql.types.StructType
import org.apache.spark.sql.util.CaseInsensitiveStringMap
-
+import org.apache.spark.util.Utils
class PythonScan(
- ds: PythonDataSourceV2,
- shortName: String,
- outputSchema: StructType,
- options: CaseInsensitiveStringMap) extends Scan {
+ ds: PythonDataSourceV2,
+ shortName: String,
+ outputSchema: StructType,
+ options: CaseInsensitiveStringMap,
+ metadata: => Map[String, String]
+) extends Scan
+ with SupportsMetadata {
+ private lazy val sparkSession = SparkSession.active
+ private def maxMetadataValueLength =
sparkSession.sessionState.conf.maxMetadataStringLength
Review Comment:
`maxMetadataValueLength` used only once.
--
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]