feat(catalog): add catalog API by QuakeWang · Pull Request #62 · apache/paimon-rust
In the java version,
Tableinterface represents various specialized table types. Is it possible to define a simpleTablestruct in rust ? What about returningBox<dyn Table>instead?Maybe we will not use
dyn, when returningBox<dyn Table>has some error likeerror[E0404]: expected trait, found struct Table. In Rust,dynis used for dynamic dispatch with trait objects.
Why Box<dyn Table> would give error[E0404] ? It should not when using properly.
I think in many cases, the return value of get_table needs to be downcast to a concrete type, so it makes sense to use dyn Table.
Alternatively, maybe using enum Table is feasible