luoyuxia commented on code in PR #249:
URL: https://github.com/apache/fluss-rust/pull/249#discussion_r2771469192
##########
bindings/cpp/include/fluss.hpp:
##########
@@ -490,23 +491,36 @@ class Table {
bool Available() const;
Result NewAppendWriter(AppendWriter& out);
- Result NewLogScanner(LogScanner& out);
- Result NewLogScannerWithProjection(const std::vector<size_t>&
column_indices, LogScanner& out);
- Result NewRecordBatchLogScanner(LogScanner& out);
- Result NewRecordBatchLogScannerWithProjection(const std::vector<size_t>&
column_indices, LogScanner& out);
+ TableScan NewScan();
TableInfo GetTableInfo() const;
TablePath GetTablePath() const;
bool HasPrimaryKey() const;
private:
friend class Connection;
+ friend class TableScan;
Table(ffi::Table* table) noexcept;
void Destroy() noexcept;
ffi::Table* table_{nullptr};
};
+class TableScan {
+public:
+ TableScan& Project(std::vector<size_t> column_indices);
+
+ Result CreateLogScanner(LogScanner& out);
+ Result CreateRecordBatchScanner(LogScanner& out);
+
+private:
+ friend class Table;
+ explicit TableScan(ffi::Table* table) noexcept;
+
+ ffi::Table* table_{nullptr};
+ std::vector<size_t> projection_;
+};
Review Comment:
+1
--
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]