Fokko commented on issue #159: URL: https://github.com/apache/iceberg-rust/issues/159#issuecomment-1889992180
> 2. The parse string method implemented in pyiceberg is not a typical approach in rust. Rust has elegant support for macros, which is efficient and type safe. This was more of an example that you don't know the types upfront. > So my proposal is that we still make BoundLiteral public, but we should be careful not exposing its internals in public api. For the first version, we'll only expose builder methods so that users can create it easily, and no internals will be exposed. I don't think the BoundExpression is something that a user would ever use as it is internal. ```rust let literal = BoundLiteral::builder.with_literal(...).build(); TableScan scan = scan.filter(Expressions.equal("id", literal)); ``` I think we shouldn't it call `BoundLiteral` then because it hasn't been bound, right? The binding will happen when you do an action. If you in the `scan` select a different snapshot or branch, the field that it points to could be different (hopefully not, because that would be confusing). For the public API, I would expect: ```rust let literal = Literal::uuid_from_str("a1a2a3a4-b1b2-c1c2-d1d2-d3d4d5d6d7d8").unwrap(); TableScan scan = scan.filter(Expressions.equal("id", literal)); ``` Once we know the schema, and we perform an action, we'll bind to it: ```rust TableScan scan = scan.filter(Expressions.equal("id", literal)).snapshot(id=123).to_df(); ``` -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org