Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ UseTab: AlignWithSpaces
# Project style
BinPackArguments: false
BinPackParameters: false
IndentPPDirectives: AfterHash
24 changes: 16 additions & 8 deletions src/afs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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));
Expand Down