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

Function getNonPartitionsColumns

bolt/exec/tests/TableWriteTest.cpp:135–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133}
134
135RowTypePtr getNonPartitionsColumns(
136 const std::vector<std::string>& partitionedKeys,
137 const RowTypePtr& rowType) {
138 std::vector<std::string> dataColumnNames;
139 std::vector<TypePtr> dataColumnTypes;
140 for (auto i = 0; i < rowType->size(); i++) {
141 auto name = rowType->names()[i];
142 if (std::find(partitionedKeys.cbegin(), partitionedKeys.cend(), name) ==
143 partitionedKeys.cend()) {
144 dataColumnNames.emplace_back(name);
145 dataColumnTypes.emplace_back(rowType->findChild(name));
146 }
147 }
148
149 return ROW(std::move(dataColumnNames), std::move(dataColumnTypes));
150}
151
152FOLLY_ALWAYS_INLINE std::ostream& operator<<(std::ostream& os, TestMode mode) {
153 os << testModeString(mode);

Callers 2

TEST_PFunction · 0.85
checkWriteResultsMethod · 0.85

Calls 5

ROWFunction · 0.85
cbeginMethod · 0.80
cendMethod · 0.80
sizeMethod · 0.45
namesMethod · 0.45

Tested by

no test coverage detected