cloud-fan commented on a change in pull request #29339:
URL: https://github.com/apache/spark/pull/29339#discussion_r520280043
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DataSourceV2Implicits.scala
##########
@@ -62,4 +86,50 @@ object DataSourceV2Implicits {
new CaseInsensitiveStringMap(options.asJava)
}
}
+
+ implicit class PartitionSpecsHelper(partSpecs: Seq[PartitionSpec]) {
+ def asUnresolvedPartitionSpecs: Seq[UnresolvedPartitionSpec] =
+ partSpecs.map(_.asInstanceOf[UnresolvedPartitionSpec])
+
+ def asResolvedPartitionSpecs: Seq[ResolvedPartitionSpec] =
+ partSpecs.map(_.asInstanceOf[ResolvedPartitionSpec])
+ }
+
+ implicit class TablePartitionSpecHelper(partSpec: TablePartitionSpec) {
+ def asPartitionIdentifier(partSchema: StructType): InternalRow = {
Review comment:
let's move it to `ResolvePartitionSpec` and turn it into a method not
implicit class.
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]