MCPcopy Create free account
hub / github.com/bytedance/bolt / getOutput

Method getOutput

bolt/exec/GroupingSet.cpp:774–812  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

772 return *rows;
773}
774
775bool GroupingSet::getOutput(
776 int32_t maxOutputRows,
777 int32_t maxOutputBytes,
778 RowContainerIterator& iterator,
779 RowVectorPtr& result) {
780 BOLT_TEST_ADJUST("bytedance::bolt::exec::GroupingSet::getOutput", this);
781 NanosecondTimer timer(&stats_.aggOutputTimeNs);
782 if (isGlobal_) {
783 return getGlobalAggregationOutput(iterator, result);
784 }
785
786 if (hasDefaultGlobalGroupingSetOutput()) {
787 return getDefaultGlobalGroupingSetOutput(iterator, result);
788 }
789
790 if (hasSpilled()) {
791 return getOutputWithSpill(maxOutputRows, maxOutputBytes, result);
792 }
793 BOLT_CHECK(!isDistinct());
794
795 // Keep this performance-sensitive scratch buffer on the stack. GCC and
796 // Clang support VLAs as an extension; suppress only the portability warning
797 // for this declaration to preserve the existing runtime behavior.
798#if defined(__clang__)
799#pragma clang diagnostic push
800#pragma clang diagnostic ignored "-Wvla-cxx-extension"
801#elif defined(__GNUC__)
802#pragma GCC diagnostic push
803#pragma GCC diagnostic ignored "-Wvla"
804#endif
805 // @lint-ignore CLANGTIDY
806 char* groups[maxOutputRows];
807#if defined(__clang__)
808#pragma clang diagnostic pop
809#elif defined(__GNUC__)
810#pragma GCC diagnostic pop
811#endif
812 const int32_t numGroups = table_
813 ? table_->rows()->listRows(
814 &iterator, maxOutputRows, maxOutputBytes, groups)
815 : 0;

Callers

nothing calls this directly

Calls 3

listRowsMethod · 0.45
rowsMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected