travis-cook-sfdc opened a new issue, #10680:
URL: https://github.com/apache/pinot/issues/10680

   Submitting the following table config:
   
   ```
   {
     "tableName": "test_table",
     "tableType": "OFFLINE",
     "tenants": {
       "broker": "DefaultTenant",
       "server": "DefaultTenant"
     },
     "segmentsConfig": {
       "segmentPushType": "APPEND",
       "retentionTimeUnit": "DAYS",
       "retentionTimeValue": "10",
       "replication": "2",
       "schemaName": "test_schema",
       "minimizeDataMovement": true,
       "timeColumnName": "date_str",
       "timeType": "DAYS"
     },
     "tableIndexConfig": {
       "loadMode": "MMAP"
     },
     "metadata": {
       "test_value": "123"
     },
     "routing": {
       "segmentPrunerTypes": [
         "time",
         "partition"
       ],
       "instanceSelectorType": "replicaGroup"
     },
     "instanceAssignmentConfigMap": {
       "OFFLINE": {
         "tagPoolConfig": {
           "tag": "DefaultTenant_OFFLINE",
           "poolBased": false
         },
         "replicaGroupPartitionConfig": {
           "replicaGroupBased": true,
           "numReplicaGroups": 2,
           "numInstancesPerReplicaGroup": 10,
           "minimizeDataMovement": true
         }
       }
     }
   }
   ```
   
   Then make a request to the Pinot API: `GET /tables/test_table?type=OFFLINE`
   
   You'll see that the `metadata` key is missing:
   ```
     "tableName": "test_table",
     "tableType": "OFFLINE",
     "tenants": {
       "broker": "DefaultTenant",
       "server": "DefaultTenant"
     },
     "segmentsConfig": {
       "segmentPushType": "APPEND",
       "retentionTimeUnit": "DAYS",
       "retentionTimeValue": "10",
       "replication": "2",
       "schemaName": "test_schema",
       "minimizeDataMovement": true,
       "timeColumnName": "date_str",
       "timeType": "DAYS"
     },
     "tableIndexConfig": {
       "loadMode": "MMAP"
     },
     "metadata": {},
     "routing": {
       "segmentPrunerTypes": [
         "time",
         "partition"
       ],
       "instanceSelectorType": "replicaGroup"
     },
     "instanceAssignmentConfigMap": {
       "OFFLINE": {
         "tagPoolConfig": {
           "tag": "DefaultTenant_OFFLINE",
           "poolBased": false
         },
         "replicaGroupPartitionConfig": {
           "replicaGroupBased": true,
           "numReplicaGroups": 2,
           "numInstancesPerReplicaGroup": 10,
           "minimizeDataMovement": true
         }
       }
     }
   }
   ```
   
   However, if you make the same request to create a table it will be included:
   
   ```
   {
      ...
      "metadata": {
          "customConfigs": {
               "test_value": "123"
          }
      },
      ...
   ```
   
   Given the way the [documentation is currently 
written](https://docs.pinot.apache.org/configuration-reference/table#top-level-fields)
 this is a bug.  
   
   This is because the `TableCustomConfig.java` is expecting a JSON Property 
called `customConfigs`.  However, this level of nesting seems unnecessary.
   
   
https://github.com/apache/pinot/blob/a130cb2b1e465ad9ad3bdb4428a32fef5bf54cdd/pinot-spi/src/main/java/org/apache/pinot/spi/config/table/TableCustomConfig.java#L33
   


-- 
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]

Reply via email to