fresh-borzoni commented on code in PR #313:
URL: https://github.com/apache/fluss-rust/pull/313#discussion_r2806010404


##########
bindings/cpp/include/fluss.hpp:
##########
@@ -306,19 +306,19 @@ enum class DatumType {
 constexpr int64_t EARLIEST_OFFSET = -2;
 constexpr int64_t LATEST_OFFSET = -1;
 
-enum class OffsetSpec {
+enum class OffsetType {
     Earliest = 0,
     Latest = 1,
     Timestamp = 2,
 };
 
-struct OffsetQuery {
-    OffsetSpec spec;
+struct OffsetSpec {
+    OffsetType type;
     int64_t timestamp{0};
 
-    static OffsetQuery Earliest() { return {OffsetSpec::Earliest, 0}; }
-    static OffsetQuery Latest() { return {OffsetSpec::Latest, 0}; }
-    static OffsetQuery FromTimestamp(int64_t ts) { return 
{OffsetSpec::Timestamp, ts}; }
+    static OffsetSpec Earliest() { return {OffsetType::Earliest, 0}; }
+    static OffsetSpec Latest() { return {OffsetType::Latest, 0}; }
+    static OffsetSpec Timestamp(int64_t ts) { return {OffsetType::Timestamp, 
ts}; }

Review Comment:
   I thought about it, and I decided that it sounds mouthful - 
`OffsetSpec.earliestSpec()`, so I stripped Spec part.
   
   I don't have super strong opinion here though, so if you insist - I'll 
change.



-- 
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]

Reply via email to