liurenjie1024 opened a new issue, #1952:
URL: https://github.com/apache/iceberg-rust/issues/1952

   ### Is your feature request related to a problem or challenge?
   
   Currently in integration tests, we parse schedule definition using manually 
written code, see 
https://github.com/apache/iceberg-rust/blob/4239a20b6d3e68f3b2094f673ad63a9d70d39b9e/crates/sqllogictest/src/schedule.rs#L109
   
https://github.com/apache/iceberg-rust/blob/4239a20b6d3e68f3b2094f673ad63a9d70d39b9e/crates/sqllogictest/src/engine/datafusion.rs#L112
   
   There are  many problems with this approach:
   1. Difficult to read and maintain.
   2. It mixes parsing and generation of catalog, engine runner.
   
   We should separate the process of parsing and engine/catalog creation so 
that it would easier to test the parsing code.
   
   ### Describe the solution you'd like
   
   We should add some struct like following:
   
   ```rust
   #[derive(Serialize, Deserialize)]
   pub struct ScheduleDef {
      engines: HashMap<String, EngineDef>,
      steps: Vec<StepDef>
   }
   
   #[derive(Serialize, Deserialize)]
   pub struct StepDef {
     engine_name: String,
     slt_file: String
   }
   
   #[derive(Serialize, Deserialize)]
   pub enum EngineDef {
      Dafafusion { 
        ....
      }
   }
   
   #[derive(Serialize, Deserialize)]
   pub struct DatafusionCatalogDef {
      ....  
   }
   ```
   
   And then we could parse them using generated code.
   
   ### Willingness to contribute
   
   None


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