xiangfu0 commented on code in PR #18502:
URL: https://github.com/apache/pinot/pull/18502#discussion_r3301557755


##########
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSchemaRestletResource.java:
##########
@@ -424,6 +448,9 @@ private void validateSchemaInternal(Schema schema) {
    */
   private SuccessResponse addSchema(Schema schema, boolean override, boolean 
force) {
     String schemaName = schema.getSchemaName();
+    if (!force) {

Review Comment:
   Moved the check into the three-arg `SchemaUtils.validate(schema, 
tableConfigs, isIgnoreCase)` in 
[f65ff9e](https://github.com/apache/pinot/pull/18502/commits/f65ff9eff9). That 
overload is only called from 
`PinotSchemaRestletResource.validateSchemaInternal` (REST-driven validation), 
so POST / PUT / `/schemas/validate` are now uniformly strict.
   
   To keep server-side schema loading working for clusters that already have 
legacy schemas in ZK, I intentionally did NOT put the reject in the single-arg 
`SchemaUtils.validate(schema)` used by `RealtimeTableDataManager`, 
`TableConfigsRestletResource`, etc. Migrated the shared integration-test schema 
fixtures (`On_Time_*`, `test_null_handling`, `upsert_upload_segment_test`, 
`dedupIngestionTestSchema`, kinesis variant) to `DateTimeFieldSpec` and 
reverted the `force=true` workarounds in the test helpers since they're no 
longer needed.



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