Xuanwo commented on issue #55:
URL: https://github.com/apache/iceberg-rust/issues/55#issuecomment-1702411611
From @JanKaul
> Converting from Table to TableLike is straightforward:
>
> ```rust
> impl From<Table> for TableLike {
> fn from(value: Table) -> Self {
> TableLike::Table(value)
> }
> }
> ```
>
> So you would only need to call `table.into()`.
>
> For the table scan operation you would need to check whether your input is
a table or a view and then execute the corresponding scan operator. As long as
we don't have view support it could look like:
>
> ```rust
> let table = if let TableLike::Table(table) = tablelike {
> Ok(table)
> } else {
> Err(Error::new(... , "Views are not supported yet"))
> }?:
> ```
--
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]