38 if (target.name != source.name)
39 throw std::runtime_error (
"mismatched column names in mergeColumnInfo: " + target.name +
" and " + source.name);
41 if (target.index != source.index)
42 throw std::runtime_error (
"mismatched column index in mergeColumnInfo: " + std::to_string(target.index) +
" and " + std::to_string(source.index));
44 if (target.type ==
nullptr || source.type ==
nullptr)
45 throw std::runtime_error (
"missing type information in mergeColumnInfo for column: " + target.name);
46 if (*target.type != *source.type)
47 throw std::runtime_error (
"mismatched column types in mergeColumnInfo for column: " + target.name +
": " + boost::core::demangle(target.type->name()) +
" and " + boost::core::demangle(source.type->name()));
51 if (target.offsetName != source.offsetName)
52 throw std::runtime_error (
"mismatched offset names in mergeColumnInfo for column: " + target.name +
": " + target.offsetName +
" and " + source.offsetName);
54 if (target.fixedDimensions != source.fixedDimensions)
55 throw std::runtime_error (
"mismatched fixed dimensions in mergeColumnInfo for column: " + target.name);
57 if (target.isOffset != source.isOffset)
58 throw std::runtime_error (
"mismatched isOffset in mergeColumnInfo for column: " + target.name);
60 if (target.replacesColumn.empty())
61 target.replacesColumn = source.replacesColumn;
62 else if (!source.replacesColumn.empty() && target.replacesColumn != source.replacesColumn)
63 throw std::runtime_error (
"mismatched replacesColumn in mergeColumnInfo for column: " + target.name +
": " + target.replacesColumn +
" and " + source.replacesColumn);
65 if (!source.isOptional)
66 target.isOptional =
false;
68 if (target.soleLinkTargetName != source.soleLinkTargetName)
69 throw std::runtime_error (
"mismatched soleLinkTargetName in mergeColumnInfo for column: " + target.name);
71 if (target.soleLinkTargetClid != source.soleLinkTargetClid)
72 throw std::runtime_error (
"mismatched soleLinkTargetClid in mergeColumnInfo for column: " + target.name);
74 if (target.isVariantLink != source.isVariantLink)
75 throw std::runtime_error (
"mismatched isVariantLink in mergeColumnInfo for column: " + target.name);
77 if (target.variantLinkTargetNames != source.variantLinkTargetNames)
78 throw std::runtime_error (
"mismatched variantLinkTargetNames in mergeColumnInfo for column: " + target.name);
80 if (target.keyColumnForVariantLink != source.keyColumnForVariantLink)
81 throw std::runtime_error (
"mismatched keyColumnForVariantLink in mergeColumnInfo for column: " + target.name +
": " + target.keyColumnForVariantLink +
" and " + source.keyColumnForVariantLink);
uint64_t crc64(const CRCTable &table, const char *data, size_t data_len)
Find the CRC-64 of a string,.