qzyu999 commented on code in PR #438:
URL: https://github.com/apache/fluss-rust/pull/438#discussion_r2944002353
##########
bindings/python/src/table.rs:
##########
@@ -2167,13 +2165,16 @@ impl LogScanner {
/// Returns:
/// PyArrow Table containing all data from subscribed buckets
fn to_arrow(&self, py: Python) -> PyResult<Py<PyAny>> {
- let scanner = self.scanner.as_batch()?;
- let subscribed = scanner.get_subscribed_buckets();
- if subscribed.is_empty() {
- return Err(FlussError::new_err(
- "No buckets subscribed. Call subscribe(), subscribe_buckets(),
subscribe_partition(), or subscribe_partition_buckets() first.",
- ));
- }
+ let subscribed = {
+ let scanner = self.kind.as_batch()?;
+ let subs = scanner.get_subscribed_buckets();
+ if subs.is_empty() {
+ return Err(FlussError::new_err(
+ "No buckets subscribed. Call subscribe(),
subscribe_buckets(), subscribe_partition(), or subscribe_partition_buckets()
first.",
+ ));
+ }
+ subs.clone()
Review Comment:
Hi @fresh-borzoni, made the changes in
6ad8cab9171da38e07df03bf0cd7197d387bb93b, tested locally and passing.
--
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]