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

Function registerReaderFactory

bolt/dwio/common/ReaderFactory.cpp:46–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44} // namespace
45
46bool registerReaderFactory(std::shared_ptr<ReaderFactory> factory) {
47 bool ok = readerFactories().insert({factory->fileFormat(), factory}).second;
48 // NOTE: re-enable this check after Prestissimo has updated dwrf registration.
49#if 0
50 BOLT_CHECK(
51 ok,
52 "ReaderFactory is already registered for format {}",
53 toString(factory->fileFormat()));
54#endif
55 return true;
56}
57
58bool unregisterReaderFactory(FileFormat format) {
59 auto count = readerFactories().erase(format);

Callers 4

registerOrcReaderFactoryFunction · 0.85
registerTxtReaderFactoryFunction · 0.85

Calls 3

toStringFunction · 0.70
insertMethod · 0.45
fileFormatMethod · 0.45

Tested by

no test coverage detected