36 if (target.name != source.name)
37 throw std::runtime_error (
"mismatched column names in mergeColumnInfo: " + target.name +
" and " + source.name);
39 if (target.index != source.index)
40 throw std::runtime_error (
"mismatched column index in mergeColumnInfo: " + std::to_string(target.index) +
" and " + std::to_string(source.index));
42 if (target.type ==
nullptr || source.type ==
nullptr)
43 throw std::runtime_error (
"missing type information in mergeColumnInfo for column: " + target.name);
44 if (*target.type != *source.type)
45 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()));
49 if (target.offsetName != source.offsetName)
50 throw std::runtime_error (
"mismatched offset names in mergeColumnInfo for column: " + target.name +
": " + target.offsetName +
" and " + source.offsetName);
52 if (target.fixedDimensions != source.fixedDimensions)
53 throw std::runtime_error (
"mismatched fixed dimensions in mergeColumnInfo for column: " + target.name);
55 if (target.isOffset != source.isOffset)
56 throw std::runtime_error (
"mismatched isOffset in mergeColumnInfo for column: " + target.name);
58 if (target.replacesColumn.empty())
59 target.replacesColumn = source.replacesColumn;
60 else if (!source.replacesColumn.empty() && target.replacesColumn != source.replacesColumn)
61 throw std::runtime_error (
"mismatched replacesColumn in mergeColumnInfo for column: " + target.name +
": " + target.replacesColumn +
" and " + source.replacesColumn);
63 if (!source.isOptional)
64 target.isOptional =
false;
66 if (target.linkTargetNames != source.linkTargetNames)
67 throw std::runtime_error (
"mismatched linkTargetNames in mergeColumnInfo for column: " + target.name);
69 if (target.variantLinkKeyColumn != source.variantLinkKeyColumn)
70 throw std::runtime_error (
"mismatched variantLinkKeyColumn in mergeColumnInfo for column: " + target.name +
": " + target.variantLinkKeyColumn +
" and " + source.variantLinkKeyColumn);