Esempio n. 1
0
std::string TupleSchema::debug() const {
    std::ostringstream buffer;

    buffer << "Schema has "
           << columnCount() << " columns, "
           << hiddenColumnCount() << " hidden columns, "
           << "length = " << tupleLength() << ", "
           <<  "uninlinedObjectColumns "  << m_uninlinedObjectColumnCount << std::endl;

    for (uint16_t i = 0; i < columnCount(); i++) {
        const TupleSchema::ColumnInfo *columnInfo = getColumnInfo(i);
        buffer << " column " << i << ": " << columnInfo->debug() << std::endl;
    }

    for (uint16_t i = 0; i < hiddenColumnCount(); i++) {
        const TupleSchema::ColumnInfo *columnInfo = getHiddenColumnInfo(i);
        buffer << " hidden column " << i << ": " << columnInfo->debug() << std::endl;
    }

    buffer << " terminator column info: "
           << getColumnInfoPrivate(totalColumnCount())->debug() << std::endl;

    std::string ret(buffer.str());
    return ret;
}
Esempio n. 2
0
std::string TupleSchema::debug() const {
    std::ostringstream buffer;

    buffer << "Schema has " << columnCount() << " columns, allowInlinedObjects = " << allowInlinedObjects()
           << ", length = " << tupleLength() <<  ", uninlinedObjectColumns "  << m_uninlinedObjectColumnCount
           << std::endl;

    for (uint16_t i = 0; i < columnCount(); i++) {
        buffer << " column " << i << ": type = " << getTypeName(columnType(i));
        buffer << ", length = " << columnLength(i) << ", nullable = ";
        buffer << (columnAllowNull(i) ? "true" : "false") << ", isInlined = " << columnIsInlined(i) <<  std::endl;
    }

    std::string ret(buffer.str());
    return ret;
}
Esempio n. 3
0
std::string TupleSchema::debug() const {
    std::ostringstream buffer;

    buffer << "Schema has " << columnCount() << " columns, length = " << tupleLength()
           <<  ", uninlinedObjectColumns "  << m_uninlinedObjectColumnCount << std::endl;

    for (uint16_t i = 0; i < columnCount(); i++) {
        const TupleSchema::ColumnInfo *columnInfo = getColumnInfo(i);

        buffer << " column " << i << ": type = " << getTypeName(columnInfo->getVoltType());
        buffer << ", length = " << columnInfo->length << ", nullable = ";
        buffer << (columnInfo->allowNull ? "true" : "false") << ", isInlined = " << columnInfo->inlined <<  std::endl;
    }

    std::string ret(buffer.str());
    return ret;
}
Esempio n. 4
0
bool TupleSchema::isCompatibleForCopy(const TupleSchema *other) const
{
    if (this == other) {
        return true;
    }
    if (other->m_columnCount != m_columnCount ||
        other->m_uninlinedObjectColumnCount != m_uninlinedObjectColumnCount ||
        other->tupleLength() != tupleLength()) {
        return false;
    }

    for (int ii = 0; ii < m_columnCount; ii++) {
        const ColumnInfo *columnInfo = getColumnInfo(ii);
        const ColumnInfo *ocolumnInfo = other->getColumnInfo(ii);
        if (columnInfo->offset != ocolumnInfo->offset ||
                columnInfo->type != ocolumnInfo->type ||
                columnInfo->inlined != ocolumnInfo->inlined) {
            return false;
        }
    }

    return true;
}