github-actions[bot] commented on code in PR #35972:
URL: https://github.com/apache/doris/pull/35972#discussion_r1628942221


##########
be/src/pipeline/local_exchange/local_exchanger.h:
##########
@@ -68,6 +69,56 @@
     moodycamel::ConcurrentQueue<vectorized::Block> _free_blocks;
 };
 
+struct PartitionedRowIdxs {
+    std::shared_ptr<vectorized::PODArray<uint32_t>> row_idxs;
+    uint32_t offset_start;
+    uint32_t length;
+};
+
+using PartitionedBlock = std::pair<std::shared_ptr<ShuffleBlockWrapper>, 
PartitionedRowIdxs>;
+
+template <typename BlockType>
+struct BlockQueue {
+    std::atomic<bool> eos = false;
+    moodycamel::ConcurrentQueue<BlockType> data_queue;
+    BlockQueue() : eos(false), 
data_queue(moodycamel::ConcurrentQueue<BlockType>()) {}
+    BlockQueue(BlockQueue<BlockType>&& other)
+            : eos(other.eos.load()), data_queue(std::move(other.data_queue)) {}
+    inline bool enqueue(BlockType const& item) {
+        if (!eos) {
+            data_queue.enqueue(item);
+            return true;

Review Comment:
   warning: redundant boolean literal in conditional return statement 
[readability-simplify-boolean-expr]
   
   be/src/pipeline/local_exchange/local_exchanger.h:87:
   ```diff
   -         if (!eos) {
   -             data_queue.enqueue(item);
   -             return true;
   -         }
   -         return false;
   +         return !eos;
   ```
   



##########
be/src/pipeline/local_exchange/local_exchanger.h:
##########
@@ -68,6 +69,56 @@ class Exchanger {
     moodycamel::ConcurrentQueue<vectorized::Block> _free_blocks;
 };
 
+struct PartitionedRowIdxs {
+    std::shared_ptr<vectorized::PODArray<uint32_t>> row_idxs;
+    uint32_t offset_start;
+    uint32_t length;
+};
+
+using PartitionedBlock = std::pair<std::shared_ptr<ShuffleBlockWrapper>, 
PartitionedRowIdxs>;
+
+template <typename BlockType>
+struct BlockQueue {
+    std::atomic<bool> eos = false;
+    moodycamel::ConcurrentQueue<BlockType> data_queue;
+    BlockQueue() : eos(false), 
data_queue(moodycamel::ConcurrentQueue<BlockType>()) {}

Review Comment:
   warning: use '= default' to define a trivial default constructor 
[modernize-use-equals-default]
   
   ```suggestion
       BlockQueue() : eos(false), 
data_queue(moodycamel::ConcurrentQueue<BlockType>()) = default;
   ```
   



##########
be/src/pipeline/local_exchange/local_exchanger.h:
##########
@@ -68,6 +69,56 @@
     moodycamel::ConcurrentQueue<vectorized::Block> _free_blocks;
 };
 
+struct PartitionedRowIdxs {
+    std::shared_ptr<vectorized::PODArray<uint32_t>> row_idxs;
+    uint32_t offset_start;
+    uint32_t length;
+};
+
+using PartitionedBlock = std::pair<std::shared_ptr<ShuffleBlockWrapper>, 
PartitionedRowIdxs>;
+
+template <typename BlockType>
+struct BlockQueue {
+    std::atomic<bool> eos = false;
+    moodycamel::ConcurrentQueue<BlockType> data_queue;
+    BlockQueue() : eos(false), 
data_queue(moodycamel::ConcurrentQueue<BlockType>()) {}
+    BlockQueue(BlockQueue<BlockType>&& other)
+            : eos(other.eos.load()), data_queue(std::move(other.data_queue)) {}
+    inline bool enqueue(BlockType const& item) {
+        if (!eos) {
+            data_queue.enqueue(item);
+            return true;
+        }
+        return false;
+    }
+
+    inline bool enqueue(BlockType&& item) {
+        if (!eos) {
+            data_queue.enqueue(item);
+            return true;

Review Comment:
   warning: redundant boolean literal in conditional return statement 
[readability-simplify-boolean-expr]
   
   be/src/pipeline/local_exchange/local_exchanger.h:95:
   ```diff
   -         if (!eos) {
   -             data_queue.enqueue(item);
   -             return true;
   -         }
   -         return false;
   +         return !eos;
   ```
   



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

Reply via email to