shounakmk219 opened a new pull request, #10655:
URL: https://github.com/apache/pinot/pull/10655

   This PR tries to address the items mention in [issue 
#10647](https://github.com/apache/pinot/issues/10647)
   
   Changes : 
   
   1. Moved the switch case logic from `Schema.validate()` to 
`Schema.validate(FieldType fieldType, DataType dataType)` so that the code can 
be reused to just validate if a DataType is allowed by a FieldType.
   2. Created `FieldSpec.FIELD_SPEC_METADATA` to hold the spec metadata.
   3. Created a wrapper to hold the spec metadata. Currently is just has the 
valid (fieldType, dataType) pairs along with the respective default null values.
   ```
   {
     "fieldTypes": {
       "METRIC": {
         "allowedDataTypes": [
           {
             "name": "INT",
             "nullDefault": 0
           },
           {
             "name": "STRING",
             "nullDefault": "null"
           },
           .
           .
           .
         ]
       },
       "DIMENSION": {
         "allowedDataTypes": [
           {
             "name": "INT",
             "nullDefault": -2147483648
           },
           {
             "name": "STRING",
             "nullDefault": "null"
           },
           .
           .
           .
         ]
       },
       .
       .
       .
     }
   }
   ```
   4. Expose the metadata from a new API endpoint at 
`/tableConfigs/specMetadata`


-- 
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: commits-unsubscr...@pinot.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to