You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/11/23 20:13:14 UTC

[GitHub] [arrow-datafusion] alamb commented on issue #4346: Optimizer check errors if resulting schema has different metadata

alamb commented on issue #4346:
URL: https://github.com/apache/arrow-datafusion/issues/4346#issuecomment-1325607236

   If you are curious, here is an example of the before/after schema:
   ```
   2022-11-23T19:28:01.303927Z TRACE datafusion_optimizer::optimizer: original schema: DFSchema {
       fields: [
           DFField {
               qualifier: Some(
                   "restaurant",
               ),
               field: Field {
                   name: "count",
                   data_type: UInt64,
                   nullable: true,
                   dict_id: 0,
                   dict_is_ordered: false,
                   metadata: None,
               },
           },
           DFField {
               qualifier: Some(
                   "restaurant",
               ),
               field: Field {
                   name: "system",
                   data_type: Float64,
                   nullable: true,
                   dict_id: 0,
                   dict_is_ordered: false,
                   metadata: None,
               },
           },
           DFField {
               qualifier: Some(
                   "restaurant",
               ),
               field: Field {
                   name: "time",
                   data_type: Timestamp(
                       Nanosecond,
                       None,
                   ),
                   nullable: false,
                   dict_id: 0,
                   dict_is_ordered: false,
                   metadata: None,
               },
           },
           DFField {
               qualifier: Some(
                   "restaurant",
               ),
               field: Field {
                   name: "town",
                   data_type: Dictionary(
                       Int32,
                       Utf8,
                   ),
                   nullable: true,
                   dict_id: 0,
                   dict_is_ordered: false,
                   metadata: None,
               },
           },
       ],
       metadata: {},
   }
   2022-11-23T19:28:01.303963Z TRACE datafusion_optimizer::optimizer: new plan schema: DFSchema {
       fields: [
           DFField {
               qualifier: Some(
                   "restaurant",
               ),
               field: Field {
                   name: "count",
                   data_type: UInt64,
                   nullable: true,
                   dict_id: 0,
                   dict_is_ordered: false,
                   metadata: Some(
                       {
                           "iox::column::type": "iox::column_type::field::uinteger",
                       },
                   ),
               },
           },
           DFField {
               qualifier: Some(
                   "restaurant",
               ),
               field: Field {
                   name: "system",
                   data_type: Float64,
                   nullable: true,
                   dict_id: 0,
                   dict_is_ordered: false,
                   metadata: Some(
                       {
                           "iox::column::type": "iox::column_type::field::float",
                       },
                   ),
               },
           },
           DFField {
               qualifier: Some(
                   "restaurant",
               ),
               field: Field {
                   name: "time",
                   data_type: Timestamp(
                       Nanosecond,
                       None,
                   ),
                   nullable: false,
                   dict_id: 0,
                   dict_is_ordered: false,
                   metadata: Some(
                       {
                           "iox::column::type": "iox::column_type::timestamp",
                       },
                   ),
               },
           },
           DFField {
               qualifier: Some(
                   "restaurant",
               ),
               field: Field {
                   name: "town",
                   data_type: Dictionary(
                       Int32,
                       Utf8,
                   ),
                   nullable: true,
                   dict_id: 0,
                   dict_is_ordered: false,
                   metadata: Some(
                       {
                           "iox::column::type": "iox::column_type::tag",
                       },
                   ),
               },
           },
       ],
       metadata: {},
   }
   ```


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org