imback82 commented on a change in pull request #31440:
URL: https://github.com/apache/spark/pull/31440#discussion_r571131075
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DataSourceV2Implicits.scala
##########
@@ -83,7 +85,8 @@ object DataSourceV2Implicits {
implicit class MetadataColumnsHelper(metadata: Array[MetadataColumn]) {
def asStruct: StructType = {
val fields = metadata.map { metaCol =>
- val field = StructField(metaCol.name, metaCol.dataType,
metaCol.isNullable)
+ val fieldMeta = new
MetadataBuilder().putBoolean(METADATA_COL_ATTR_KEY, true).build()
Review comment:
nit: can be created outside the loop (or even at `object` level - new
metadata related `object` to go with `METADATA_COL_ATTR_KEY`).
----------------------------------------------------------------
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]