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

Method getRowTypeForFile

bolt/connectors/hive/HiveDataSource.cpp:415–450  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

413 return;
414 }
415
416 addSplit(std::dynamic_pointer_cast<HiveConnectorSplit>(split));
417}
418
419bolt::RowTypePtr HiveDataSource::getRowTypeForFile(
420 std::shared_ptr<PaimonConnectorSplit> split) {
421 std::vector<int> columnCacheBlackList;
422 auto hiveSplit = split->hiveSplits[0];
423 auto fileHandle =
424 fileHandleFactory_->generate(hiveSplit->filePath, fsSessionConfig_)
425 .second;
426
427 dwio::common::ReaderOptions baseReaderOpts{connectorQueryCtx_->memoryPool()};
428
429 hive::configureReaderOptions(
430 baseReaderOpts,
431 hiveConfig_,
432 connectorQueryCtx_->sessionProperties(),
433 hiveTableHandle_->dataColumns(),
434 hiveSplit);
435
436 auto& hiveConnectorSplitCacheLimit = hiveSplit->hiveConnectorSplitCacheLimit;
437 auto baseFileInput = hive::createBufferedInput(
438 *fileHandle,
439 baseReaderOpts,
440 connectorQueryCtx_.get(),
441 ioStats_,
442 executor_,
443 false,
444 columnCacheBlackList,
445 nullptr);
446
447 auto baseReader =
448 dwio::common::getReaderFactory(baseReaderOpts.getFileFormat())
449 ->createReader(std::move(baseFileInput), baseReaderOpts);
450
451 auto& fileType = baseReader->rowType();
452
453 return fileType;

Callers

nothing calls this directly

Calls 10

configureReaderOptionsFunction · 0.85
createBufferedInputFunction · 0.85
getReaderFactoryFunction · 0.85
memoryPoolMethod · 0.80
sessionPropertiesMethod · 0.80
getFileFormatMethod · 0.80
generateMethod · 0.45
getMethod · 0.45
createReaderMethod · 0.45
rowTypeMethod · 0.45

Tested by

no test coverage detected