25 std::same_as<storage::ColumnChunkData, T> || std::same_as<common::ValueVector, T>;
30 using DataType = std::variant<uint64_t, uint32_t>;
32 static constexpr size_t BLOCK_IDX_IDX = 0;
33 static constexpr size_t OFFSET_IN_BLOCK_IDX = 1;
34 static constexpr size_t NUM_BLOCK_VALUES = 2;
39 template<std::integral... Types>
40 void dumpTo(uint64_t& blockIdx, uint32_t& offsetInBlock, Types&... vars)
const;
42 template<std::integral... Types>
49 template<DataSource T>
52 std::array<DataType, common::CopyConstants::MAX_NUM_WARNING_DATA_COLUMNS>
values;
71 bool mustThrow =
false);
89template<std::integral... Types>
94 [
this](
auto idx,
auto& value) {
95 value = std::get<std::decay_t<
decltype(value)>>(
values[idx]);
97 blockIdx, offsetInBlock, vars...);
100template<std::integral... Types>
102 Types... newValues) {
104 "For performance reasons the number of warning metadata columns has a "
105 "statically-defined limit, modify "
106 "'common::CopyConstants::WARNING_DATA_MAX_NUM_COLUMNS' if you wish to increase it.");
110 blockIdx, offsetInBlock, newValues...);
#define KUZU_API
Definition api.h:25
#define KU_ASSERT(condition)
Definition assert.h:19
static void paramPackForEach(const Func &func, Types &&... values)
Definition type_utils.h:35
Definition copy_from_error.h:24
uint32_t idx_t
Definition types.h:41
Definition array_utils.h:7
Definition copy_from_error.h:69
std::string message
Definition copy_from_error.h:73
bool mustThrow
Definition copy_from_error.h:77
bool operator<(const CopyFromFileError &o) const
WarningSourceData warningData
Definition copy_from_error.h:75
bool completedLine
Definition copy_from_error.h:74
CopyFromFileError(std::string message, WarningSourceData warningData, bool completedLine=true, bool mustThrow=false)
Definition copy_from_error.h:56
void setNewLine(uint64_t start)
void setEndOfLine(uint64_t end)
bool isCompleteLine
Definition copy_from_error.h:60
uint64_t startByteOffset
Definition copy_from_error.h:57
uint64_t endByteOffset
Definition copy_from_error.h:58
Definition copy_from_error.h:82
std::string skippedLineOrRecord
Definition copy_from_error.h:85
std::string message
Definition copy_from_error.h:83
uint64_t lineNumber
Definition copy_from_error.h:86
std::string filePath
Definition copy_from_error.h:84
Definition copy_from_error.h:27
uint32_t getOffsetInBlock() const
void dumpTo(uint64_t &blockIdx, uint32_t &offsetInBlock, Types &... vars) const
Definition copy_from_error.h:90
static constexpr size_t NUM_BLOCK_VALUES
Definition copy_from_error.h:34
static WarningSourceData constructFromData(const std::vector< T * > &chunks, common::idx_t pos)
WarningSourceData()
Definition copy_from_error.h:36
static WarningSourceData constructFrom(uint64_t blockIdx, uint32_t offsetInBlock, Types... newValues)
Definition copy_from_error.h:101
uint64_t getBlockIdx() const
uint64_t numValues
Definition copy_from_error.h:53
WarningSourceData(uint64_t numSourceSpecificValues)
std::variant< uint64_t, uint32_t > DataType
Definition copy_from_error.h:30
std::array< DataType, common::CopyConstants::MAX_NUM_WARNING_DATA_COLUMNS > values
Definition copy_from_error.h:52