alisha-1000 commented on issue #586: URL: https://github.com/apache/wayang/issues/586#issuecomment-3929024432
Thanks for raising this , Currently, ModelParser manually reads and parses the Calcite model JSON using Jackson. This approach duplicates functionality that Apache Calcite already provides via its SchemaPlus and ModelHandler infrastructure. Migrating to Calcite’s native model loading mechanism would have several advantages: Better alignment with Calcite internals (reduced maintenance burden) Improved validation of model structure Support for advanced Calcite features (custom schemas, factories, etc.) Reduced risk of inconsistencies between Wayang’s parsing and Calcite expectations Instead of manually handling JSON, we could: Use org.apache.calcite.model.ModelHandler to load the model Obtain a SchemaPlus root schema from Calcite directly Attach it to the planner configuration This would eliminate the need for manual JSON traversal and simplify ModelParser. If this direction is agreed upon, I can: Prototype loading the model via ModelHandler Replace the custom parsing logic Ensure backward compatibility with wayang.calcite.model configuration property Let me know if you'd like me to draft a PR for this refactor. -- 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]
