xr-chen commented on PR #766:
URL: https://github.com/apache/incubator-xtable/pull/766#issuecomment-3641625135
The problem is actually more complicated than fixing the fieldId generation;
the data file written by column mapping enabled doesn't follow the table schema
at all. We need to somehow map the columns in the data files to the columns in
the schema.
```
root
|-- col-4ee2e8c9-35f1-4868-8ff5-46d285fac4b2: integer (nullable = true)
|-- col-89424a5c-1fbc-4f97-b9dc-c3bf90f9849e: string (nullable = true)
|-- col-0c385cbd-8f94-4043-bb55-89f07a39a2bb: string (nullable = true)
```
mapping info in the delta table
```
[
{
"name": "id",
"type": "integer",
"nullable": false,
"metadata": {
"delta.columnMapping.id": 1,
"delta.columnMapping.physicalName":
"col-4ee2e8c9-35f1-4868-8ff5-46d285fac4b2"
}
},
{
"name": "firstName",
"type": "string",
"nullable": true,
"metadata": {
"delta.columnMapping.id": 2,
"delta.columnMapping.physicalName":
"col-89424a5c-1fbc-4f97-b9dc-c3bf90f9849e"
}
},
{
"name": "lastName",
"type": "string",
"nullable": true,
"metadata": {
"delta.columnMapping.id": 3,
"delta.columnMapping.physicalName":
"col-0c385cbd-8f94-4043-bb55-89f07a39a2bb"
}
}
]
```
--
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]