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