This is an automated email from the ASF dual-hosted git repository.

kou pushed a commit to branch main
in repository 
https://gitbox.apache.org/repos/asf/arrow-flight-sql-postgresql.git


The following commit(s) were added to refs/heads/main by this push:
     new b17ade4  format: indent pre-processor block (#34)
b17ade4 is described below

commit b17ade40f711d9d1e941e81cc4a6cd5bba01579d
Author: Sutou Kouhei <[email protected]>
AuthorDate: Thu Apr 20 23:23:52 2023 +0900

    format: indent pre-processor block (#34)
    
    Closes GH-33
---
 .clang-format |  1 +
 src/afs.cc    | 24 ++++++++++++++++--------
 2 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/.clang-format b/.clang-format
index b7364a5..c13feef 100644
--- a/.clang-format
+++ b/.clang-format
@@ -37,3 +37,4 @@ UseTab: AlignWithSpaces
 # Project style
 BinPackArguments: false
 BinPackParameters: false
+IndentPPDirectives: AfterHash
diff --git a/src/afs.cc b/src/afs.cc
index bb8b5fc..12798c8 100644
--- a/src/afs.cc
+++ b/src/afs.cc
@@ -52,15 +52,15 @@ extern "C"
 #include <sstream>
 
 #ifdef __GNUC__
-#define AFS_FUNC __PRETTY_FUNCTION__
+#      define AFS_FUNC __PRETTY_FUNCTION__
 #else
-#define AFS_FUNC __func__
+#      define AFS_FUNC __func__
 #endif
 
 #ifdef AFS_DEBUG
-#define P(...) ereport(DEBUG5, errmsg_internal(__VA_ARGS__))
+#      define P(...) ereport(DEBUG5, errmsg_internal(__VA_ARGS__))
 #else
-#define P(...)
+#      define P(...)
 #endif
 
 extern "C"
@@ -747,16 +747,24 @@ class Executor : public WorkerProcessor {
                                }
                        }
 
-                       if (((iTuple + 1) % MaxNRowsPerRecordBatch) == 0) {
+                       if (((iTuple + 1) % MaxNRowsPerRecordBatch) == 0)
+                       {
                                ARROW_ASSIGN_OR_RAISE(recordBatch, 
builder->Flush());
-                               P("%s: %s: write: data: WriteRecordBatch: 
%d/%d", Tag, tag_, iTuple, SPI_processed);
+                               P("%s: %s: write: data: WriteRecordBatch: 
%d/%d",
+                                 Tag,
+                                 tag_,
+                                 iTuple,
+                                 SPI_processed);
                                
ARROW_RETURN_NOT_OK(writer->WriteRecordBatch(*recordBatch));
                                needLastFlush = false;
-                       } else {
+                       }
+                       else
+                       {
                                needLastFlush = true;
                        }
                }
-               if (needLastFlush) {
+               if (needLastFlush)
+               {
                        ARROW_ASSIGN_OR_RAISE(recordBatch, builder->Flush());
                        P("%s: %s: write: data: WriteRecordBatch", Tag, tag_);
                        
ARROW_RETURN_NOT_OK(writer->WriteRecordBatch(*recordBatch));

Reply via email to