#
# Autogenerated by Thrift Compiler (0.10.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
#  options string: py
#

from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
from thrift.protocol.TProtocol import TProtocolException
import sys

from thrift.transport import TTransport


class TDatumType(object):
    SMALLINT = 0
    INT = 1
    BIGINT = 2
    FLOAT = 3
    DECIMAL = 4
    DOUBLE = 5
    STR = 6
    TIME = 7
    TIMESTAMP = 8
    DATE = 9
    BOOL = 10
    INTERVAL_DAY_TIME = 11
    INTERVAL_YEAR_MONTH = 12

    _VALUES_TO_NAMES = {
        0: "SMALLINT",
        1: "INT",
        2: "BIGINT",
        3: "FLOAT",
        4: "DECIMAL",
        5: "DOUBLE",
        6: "STR",
        7: "TIME",
        8: "TIMESTAMP",
        9: "DATE",
        10: "BOOL",
        11: "INTERVAL_DAY_TIME",
        12: "INTERVAL_YEAR_MONTH",
    }

    _NAMES_TO_VALUES = {
        "SMALLINT": 0,
        "INT": 1,
        "BIGINT": 2,
        "FLOAT": 3,
        "DECIMAL": 4,
        "DOUBLE": 5,
        "STR": 6,
        "TIME": 7,
        "TIMESTAMP": 8,
        "DATE": 9,
        "BOOL": 10,
        "INTERVAL_DAY_TIME": 11,
        "INTERVAL_YEAR_MONTH": 12,
    }


class TEncodingType(object):
    NONE = 0
    FIXED = 1
    RL = 2
    DIFF = 3
    DICT = 4
    SPARSE = 5

    _VALUES_TO_NAMES = {
        0: "NONE",
        1: "FIXED",
        2: "RL",
        3: "DIFF",
        4: "DICT",
        5: "SPARSE",
    }

    _NAMES_TO_VALUES = {
        "NONE": 0,
        "FIXED": 1,
        "RL": 2,
        "DIFF": 3,
        "DICT": 4,
        "SPARSE": 5,
    }


class TExecuteMode(object):
    HYBRID = 0
    GPU = 1
    CPU = 2

    _VALUES_TO_NAMES = {
        0: "HYBRID",
        1: "GPU",
        2: "CPU",
    }

    _NAMES_TO_VALUES = {
        "HYBRID": 0,
        "GPU": 1,
        "CPU": 2,
    }


class TTableType(object):
    DELIMITED = 0
    POLYGON = 1

    _VALUES_TO_NAMES = {
        0: "DELIMITED",
        1: "POLYGON",
    }

    _NAMES_TO_VALUES = {
        "DELIMITED": 0,
        "POLYGON": 1,
    }


class TMergeType(object):
    UNION = 0
    REDUCE = 1

    _VALUES_TO_NAMES = {
        0: "UNION",
        1: "REDUCE",
    }

    _NAMES_TO_VALUES = {
        "UNION": 0,
        "REDUCE": 1,
    }


class TExpressionRangeType(object):
    INVALID = 0
    INTEGER = 1
    FLOAT = 2
    DOUBLE = 3

    _VALUES_TO_NAMES = {
        0: "INVALID",
        1: "INTEGER",
        2: "FLOAT",
        3: "DOUBLE",
    }

    _NAMES_TO_VALUES = {
        "INVALID": 0,
        "INTEGER": 1,
        "FLOAT": 2,
        "DOUBLE": 3,
    }


class TDatumVal(object):
    """
    Attributes:
     - int_val
     - real_val
     - str_val
     - arr_val
    """

    thrift_spec = None

    def __init__(self, int_val=None, real_val=None, str_val=None, arr_val=None,):
        self.int_val = int_val
        self.real_val = real_val
        self.str_val = str_val
        self.arr_val = arr_val

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I64:
                    self.int_val = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.DOUBLE:
                    self.real_val = iprot.readDouble()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.str_val = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.LIST:
                    self.arr_val = []
                    (_etype3, _size0) = iprot.readListBegin()
                    for _i4 in range(_size0):
                        _elem5 = TDatum()
                        _elem5.read(iprot)
                        self.arr_val.append(_elem5)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('TDatumVal')
        if self.int_val is not None:
            oprot.writeFieldBegin('int_val', TType.I64, 1)
            oprot.writeI64(self.int_val)
            oprot.writeFieldEnd()
        if self.real_val is not None:
            oprot.writeFieldBegin('real_val', TType.DOUBLE, 2)
            oprot.writeDouble(self.real_val)
            oprot.writeFieldEnd()
        if self.str_val is not None:
            oprot.writeFieldBegin('str_val', TType.STRING, 3)
            oprot.writeString(self.str_val.encode('utf-8') if sys.version_info[0] == 2 else self.str_val)
            oprot.writeFieldEnd()
        if self.arr_val is not None:
            oprot.writeFieldBegin('arr_val', TType.LIST, 4)
            oprot.writeListBegin(TType.STRUCT, len(self.arr_val))
            for iter6 in self.arr_val:
                iter6.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TDatum(object):
    """
    Attributes:
     - val
     - is_null
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRUCT, 'val', (TDatumVal, TDatumVal.thrift_spec), None, ),  # 1
        (2, TType.BOOL, 'is_null', None, None, ),  # 2
    )

    def __init__(self, val=None, is_null=None,):
        self.val = val
        self.is_null = is_null

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.val = TDatumVal()
                    self.val.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.BOOL:
                    self.is_null = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('TDatum')
        if self.val is not None:
            oprot.writeFieldBegin('val', TType.STRUCT, 1)
            self.val.write(oprot)
            oprot.writeFieldEnd()
        if self.is_null is not None:
            oprot.writeFieldBegin('is_null', TType.BOOL, 2)
            oprot.writeBool(self.is_null)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TStringValue(object):
    """
    Attributes:
     - str_val
     - is_null
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'str_val', 'UTF8', None, ),  # 1
        (2, TType.BOOL, 'is_null', None, None, ),  # 2
    )

    def __init__(self, str_val=None, is_null=None,):
        self.str_val = str_val
        self.is_null = is_null

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.str_val = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.BOOL:
                    self.is_null = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('TStringValue')
        if self.str_val is not None:
            oprot.writeFieldBegin('str_val', TType.STRING, 1)
            oprot.writeString(self.str_val.encode('utf-8') if sys.version_info[0] == 2 else self.str_val)
            oprot.writeFieldEnd()
        if self.is_null is not None:
            oprot.writeFieldBegin('is_null', TType.BOOL, 2)
            oprot.writeBool(self.is_null)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TTypeInfo(object):
    """
    Attributes:
     - type
     - encoding
     - nullable
     - is_array
     - precision
     - scale
     - comp_param
    """

    thrift_spec = (
        None,  # 0
        (1, TType.I32, 'type', None, None, ),  # 1
        (2, TType.BOOL, 'nullable', None, None, ),  # 2
        (3, TType.BOOL, 'is_array', None, None, ),  # 3
        (4, TType.I32, 'encoding', None, None, ),  # 4
        (5, TType.I32, 'precision', None, None, ),  # 5
        (6, TType.I32, 'scale', None, None, ),  # 6
        (7, TType.I32, 'comp_param', None, None, ),  # 7
    )

    def __init__(self, type=None, encoding=None, nullable=None, is_array=None, precision=None, scale=None, comp_param=None,):
        self.type = type
        self.encoding = encoding
        self.nullable = nullable
        self.is_array = is_array
        self.precision = precision
        self.scale = scale
        self.comp_param = comp_param

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.type = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.encoding = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.BOOL:
                    self.nullable = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.BOOL:
                    self.is_array = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I32:
                    self.precision = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.I32:
                    self.scale = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.I32:
                    self.comp_param = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('TTypeInfo')
        if self.type is not None:
            oprot.writeFieldBegin('type', TType.I32, 1)
            oprot.writeI32(self.type)
            oprot.writeFieldEnd()
        if self.nullable is not None:
            oprot.writeFieldBegin('nullable', TType.BOOL, 2)
            oprot.writeBool(self.nullable)
            oprot.writeFieldEnd()
        if self.is_array is not None:
            oprot.writeFieldBegin('is_array', TType.BOOL, 3)
            oprot.writeBool(self.is_array)
            oprot.writeFieldEnd()
        if self.encoding is not None:
            oprot.writeFieldBegin('encoding', TType.I32, 4)
            oprot.writeI32(self.encoding)
            oprot.writeFieldEnd()
        if self.precision is not None:
            oprot.writeFieldBegin('precision', TType.I32, 5)
            oprot.writeI32(self.precision)
            oprot.writeFieldEnd()
        if self.scale is not None:
            oprot.writeFieldBegin('scale', TType.I32, 6)
            oprot.writeI32(self.scale)
            oprot.writeFieldEnd()
        if self.comp_param is not None:
            oprot.writeFieldBegin('comp_param', TType.I32, 7)
            oprot.writeI32(self.comp_param)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TColumnType(object):
    """
    Attributes:
     - col_name
     - col_type
     - is_reserved_keyword
     - src_name
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'col_name', 'UTF8', None, ),  # 1
        (2, TType.STRUCT, 'col_type', (TTypeInfo, TTypeInfo.thrift_spec), None, ),  # 2
        (3, TType.BOOL, 'is_reserved_keyword', None, None, ),  # 3
        (4, TType.STRING, 'src_name', 'UTF8', None, ),  # 4
    )

    def __init__(self, col_name=None, col_type=None, is_reserved_keyword=None, src_name=None,):
        self.col_name = col_name
        self.col_type = col_type
        self.is_reserved_keyword = is_reserved_keyword
        self.src_name = src_name

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.col_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.col_type = TTypeInfo()
                    self.col_type.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.BOOL:
                    self.is_reserved_keyword = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.src_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('TColumnType')
        if self.col_name is not None:
            oprot.writeFieldBegin('col_name', TType.STRING, 1)
            oprot.writeString(self.col_name.encode('utf-8') if sys.version_info[0] == 2 else self.col_name)
            oprot.writeFieldEnd()
        if self.col_type is not None:
            oprot.writeFieldBegin('col_type', TType.STRUCT, 2)
            self.col_type.write(oprot)
            oprot.writeFieldEnd()
        if self.is_reserved_keyword is not None:
            oprot.writeFieldBegin('is_reserved_keyword', TType.BOOL, 3)
            oprot.writeBool(self.is_reserved_keyword)
            oprot.writeFieldEnd()
        if self.src_name is not None:
            oprot.writeFieldBegin('src_name', TType.STRING, 4)
            oprot.writeString(self.src_name.encode('utf-8') if sys.version_info[0] == 2 else self.src_name)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TRow(object):
    """
    Attributes:
     - cols
    """

    thrift_spec = (
        None,  # 0
        (1, TType.LIST, 'cols', (TType.STRUCT, (TDatum, TDatum.thrift_spec), False), None, ),  # 1
    )

    def __init__(self, cols=None,):
        self.cols = cols

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.LIST:
                    self.cols = []
                    (_etype10, _size7) = iprot.readListBegin()
                    for _i11 in range(_size7):
                        _elem12 = TDatum()
                        _elem12.read(iprot)
                        self.cols.append(_elem12)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('TRow')
        if self.cols is not None:
            oprot.writeFieldBegin('cols', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.cols))
            for iter13 in self.cols:
                iter13.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TColumnData(object):
    """
    Attributes:
     - int_col
     - real_col
     - str_col
     - arr_col
    """

    thrift_spec = None

    def __init__(self, int_col=None, real_col=None, str_col=None, arr_col=None,):
        self.int_col = int_col
        self.real_col = real_col
        self.str_col = str_col
        self.arr_col = arr_col

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.LIST:
                    self.int_col = []
                    (_etype17, _size14) = iprot.readListBegin()
                    for _i18 in range(_size14):
                        _elem19 = iprot.readI64()
                        self.int_col.append(_elem19)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.real_col = []
                    (_etype23, _size20) = iprot.readListBegin()
                    for _i24 in range(_size20):
                        _elem25 = iprot.readDouble()
                        self.real_col.append(_elem25)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.LIST:
                    self.str_col = []
                    (_etype29, _size26) = iprot.readListBegin()
                    for _i30 in range(_size26):
                        _elem31 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        self.str_col.append(_elem31)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.LIST:
                    self.arr_col = []
                    (_etype35, _size32) = iprot.readListBegin()
                    for _i36 in range(_size32):
                        _elem37 = TColumn()
                        _elem37.read(iprot)
                        self.arr_col.append(_elem37)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('TColumnData')
        if self.int_col is not None:
            oprot.writeFieldBegin('int_col', TType.LIST, 1)
            oprot.writeListBegin(TType.I64, len(self.int_col))
            for iter38 in self.int_col:
                oprot.writeI64(iter38)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.real_col is not None:
            oprot.writeFieldBegin('real_col', TType.LIST, 2)
            oprot.writeListBegin(TType.DOUBLE, len(self.real_col))
            for iter39 in self.real_col:
                oprot.writeDouble(iter39)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.str_col is not None:
            oprot.writeFieldBegin('str_col', TType.LIST, 3)
            oprot.writeListBegin(TType.STRING, len(self.str_col))
            for iter40 in self.str_col:
                oprot.writeString(iter40.encode('utf-8') if sys.version_info[0] == 2 else iter40)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.arr_col is not None:
            oprot.writeFieldBegin('arr_col', TType.LIST, 4)
            oprot.writeListBegin(TType.STRUCT, len(self.arr_col))
            for iter41 in self.arr_col:
                iter41.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TColumn(object):
    """
    Attributes:
     - data
     - nulls
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRUCT, 'data', (TColumnData, TColumnData.thrift_spec), None, ),  # 1
        (2, TType.LIST, 'nulls', (TType.BOOL, None, False), None, ),  # 2
    )

    def __init__(self, data=None, nulls=None,):
        self.data = data
        self.nulls = nulls

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.data = TColumnData()
                    self.data.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.nulls = []
                    (_etype45, _size42) = iprot.readListBegin()
                    for _i46 in range(_size42):
                        _elem47 = iprot.readBool()
                        self.nulls.append(_elem47)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('TColumn')
        if self.data is not None:
            oprot.writeFieldBegin('data', TType.STRUCT, 1)
            self.data.write(oprot)
            oprot.writeFieldEnd()
        if self.nulls is not None:
            oprot.writeFieldBegin('nulls', TType.LIST, 2)
            oprot.writeListBegin(TType.BOOL, len(self.nulls))
            for iter48 in self.nulls:
                oprot.writeBool(iter48)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TStringRow(object):
    """
    Attributes:
     - cols
    """

    thrift_spec = (
        None,  # 0
        (1, TType.LIST, 'cols', (TType.STRUCT, (TStringValue, TStringValue.thrift_spec), False), None, ),  # 1
    )

    def __init__(self, cols=None,):
        self.cols = cols

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.LIST:
                    self.cols = []
                    (_etype52, _size49) = iprot.readListBegin()
                    for _i53 in range(_size49):
                        _elem54 = TStringValue()
                        _elem54.read(iprot)
                        self.cols.append(_elem54)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('TStringRow')
        if self.cols is not None:
            oprot.writeFieldBegin('cols', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.cols))
            for iter55 in self.cols:
                iter55.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TStepResult(object):
    """
    Attributes:
     - serialized_rows
     - execution_finished
     - merge_type
     - sharded
     - row_desc
     - node_id
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'serialized_rows', 'UTF8', None, ),  # 1
        (2, TType.BOOL, 'execution_finished', None, None, ),  # 2
        (3, TType.I32, 'merge_type', None, None, ),  # 3
        (4, TType.BOOL, 'sharded', None, None, ),  # 4
        (5, TType.LIST, 'row_desc', (TType.STRUCT, (TColumnType, TColumnType.thrift_spec), False), None, ),  # 5
        (6, TType.I32, 'node_id', None, None, ),  # 6
    )

    def __init__(self, serialized_rows=None, execution_finished=None, merge_type=None, sharded=None, row_desc=None, node_id=None,):
        self.serialized_rows = serialized_rows
        self.execution_finished = execution_finished
        self.merge_type = merge_type
        self.sharded = sharded
        self.row_desc = row_desc
        self.node_id = node_id

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.serialized_rows = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.BOOL:
                    self.execution_finished = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.merge_type = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.BOOL:
                    self.sharded = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.LIST:
                    self.row_desc = []
                    (_etype59, _size56) = iprot.readListBegin()
                    for _i60 in range(_size56):
                        _elem61 = TColumnType()
                        _elem61.read(iprot)
                        self.row_desc.append(_elem61)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.I32:
                    self.node_id = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('TStepResult')
        if self.serialized_rows is not None:
            oprot.writeFieldBegin('serialized_rows', TType.STRING, 1)
            oprot.writeString(self.serialized_rows.encode('utf-8') if sys.version_info[0] == 2 else self.serialized_rows)
            oprot.writeFieldEnd()
        if self.execution_finished is not None:
            oprot.writeFieldBegin('execution_finished', TType.BOOL, 2)
            oprot.writeBool(self.execution_finished)
            oprot.writeFieldEnd()
        if self.merge_type is not None:
            oprot.writeFieldBegin('merge_type', TType.I32, 3)
            oprot.writeI32(self.merge_type)
            oprot.writeFieldEnd()
        if self.sharded is not None:
            oprot.writeFieldBegin('sharded', TType.BOOL, 4)
            oprot.writeBool(self.sharded)
            oprot.writeFieldEnd()
        if self.row_desc is not None:
            oprot.writeFieldBegin('row_desc', TType.LIST, 5)
            oprot.writeListBegin(TType.STRUCT, len(self.row_desc))
            for iter62 in self.row_desc:
                iter62.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.node_id is not None:
            oprot.writeFieldBegin('node_id', TType.I32, 6)
            oprot.writeI32(self.node_id)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TRowSet(object):
    """
    Attributes:
     - row_desc
     - rows
     - columns
     - is_columnar
    """

    thrift_spec = (
        None,  # 0
        (1, TType.LIST, 'row_desc', (TType.STRUCT, (TColumnType, TColumnType.thrift_spec), False), None, ),  # 1
        (2, TType.LIST, 'rows', (TType.STRUCT, (TRow, TRow.thrift_spec), False), None, ),  # 2
        (3, TType.LIST, 'columns', (TType.STRUCT, (TColumn, TColumn.thrift_spec), False), None, ),  # 3
        (4, TType.BOOL, 'is_columnar', None, None, ),  # 4
    )

    def __init__(self, row_desc=None, rows=None, columns=None, is_columnar=None,):
        self.row_desc = row_desc
        self.rows = rows
        self.columns = columns
        self.is_columnar = is_columnar

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.LIST:
                    self.row_desc = []
                    (_etype66, _size63) = iprot.readListBegin()
                    for _i67 in range(_size63):
                        _elem68 = TColumnType()
                        _elem68.read(iprot)
                        self.row_desc.append(_elem68)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.rows = []
                    (_etype72, _size69) = iprot.readListBegin()
                    for _i73 in range(_size69):
                        _elem74 = TRow()
                        _elem74.read(iprot)
                        self.rows.append(_elem74)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.LIST:
                    self.columns = []
                    (_etype78, _size75) = iprot.readListBegin()
                    for _i79 in range(_size75):
                        _elem80 = TColumn()
                        _elem80.read(iprot)
                        self.columns.append(_elem80)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.BOOL:
                    self.is_columnar = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('TRowSet')
        if self.row_desc is not None:
            oprot.writeFieldBegin('row_desc', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.row_desc))
            for iter81 in self.row_desc:
                iter81.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.rows is not None:
            oprot.writeFieldBegin('rows', TType.LIST, 2)
            oprot.writeListBegin(TType.STRUCT, len(self.rows))
            for iter82 in self.rows:
                iter82.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.columns is not None:
            oprot.writeFieldBegin('columns', TType.LIST, 3)
            oprot.writeListBegin(TType.STRUCT, len(self.columns))
            for iter83 in self.columns:
                iter83.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.is_columnar is not None:
            oprot.writeFieldBegin('is_columnar', TType.BOOL, 4)
            oprot.writeBool(self.is_columnar)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TQueryResult(object):
    """
    Attributes:
     - row_set
     - execution_time_ms
     - total_time_ms
     - nonce
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRUCT, 'row_set', (TRowSet, TRowSet.thrift_spec), None, ),  # 1
        (2, TType.I64, 'execution_time_ms', None, None, ),  # 2
        (3, TType.I64, 'total_time_ms', None, None, ),  # 3
        (4, TType.STRING, 'nonce', 'UTF8', None, ),  # 4
    )

    def __init__(self, row_set=None, execution_time_ms=None, total_time_ms=None, nonce=None,):
        self.row_set = row_set
        self.execution_time_ms = execution_time_ms
        self.total_time_ms = total_time_ms
        self.nonce = nonce

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.row_set = TRowSet()
                    self.row_set.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.execution_time_ms = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.total_time_ms = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.nonce = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('TQueryResult')
        if self.row_set is not None:
            oprot.writeFieldBegin('row_set', TType.STRUCT, 1)
            self.row_set.write(oprot)
            oprot.writeFieldEnd()
        if self.execution_time_ms is not None:
            oprot.writeFieldBegin('execution_time_ms', TType.I64, 2)
            oprot.writeI64(self.execution_time_ms)
            oprot.writeFieldEnd()
        if self.total_time_ms is not None:
            oprot.writeFieldBegin('total_time_ms', TType.I64, 3)
            oprot.writeI64(self.total_time_ms)
            oprot.writeFieldEnd()
        if self.nonce is not None:
            oprot.writeFieldBegin('nonce', TType.STRING, 4)
            oprot.writeString(self.nonce.encode('utf-8') if sys.version_info[0] == 2 else self.nonce)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TGpuDataFrame(object):
    """
    Attributes:
     - schema
     - df_handle
     - df_size
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'schema', 'BINARY', None, ),  # 1
        (2, TType.STRING, 'df_handle', 'BINARY', None, ),  # 2
        (3, TType.I64, 'df_size', None, None, ),  # 3
    )

    def __init__(self, schema=None, df_handle=None, df_size=None,):
        self.schema = schema
        self.df_handle = df_handle
        self.df_size = df_size

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.schema = iprot.readBinary()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.df_handle = iprot.readBinary()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.df_size = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('TGpuDataFrame')
        if self.schema is not None:
            oprot.writeFieldBegin('schema', TType.STRING, 1)
            oprot.writeBinary(self.schema)
            oprot.writeFieldEnd()
        if self.df_handle is not None:
            oprot.writeFieldBegin('df_handle', TType.STRING, 2)
            oprot.writeBinary(self.df_handle)
            oprot.writeFieldEnd()
        if self.df_size is not None:
            oprot.writeFieldBegin('df_size', TType.I64, 3)
            oprot.writeI64(self.df_size)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TDBInfo(object):
    """
    Attributes:
     - db_name
     - db_owner
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'db_name', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'db_owner', 'UTF8', None, ),  # 2
    )

    def __init__(self, db_name=None, db_owner=None,):
        self.db_name = db_name
        self.db_owner = db_owner

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.db_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.db_owner = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('TDBInfo')
        if self.db_name is not None:
            oprot.writeFieldBegin('db_name', TType.STRING, 1)
            oprot.writeString(self.db_name.encode('utf-8') if sys.version_info[0] == 2 else self.db_name)
            oprot.writeFieldEnd()
        if self.db_owner is not None:
            oprot.writeFieldBegin('db_owner', TType.STRING, 2)
            oprot.writeString(self.db_owner.encode('utf-8') if sys.version_info[0] == 2 else self.db_owner)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TMapDException(TException):
    """
    Attributes:
     - error_msg
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'error_msg', 'UTF8', None, ),  # 1
    )

    def __init__(self, error_msg=None,):
        self.error_msg = error_msg

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.error_msg = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('TMapDException')
        if self.error_msg is not None:
            oprot.writeFieldBegin('error_msg', TType.STRING, 1)
            oprot.writeString(self.error_msg.encode('utf-8') if sys.version_info[0] == 2 else self.error_msg)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __str__(self):
        return repr(self)

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TRenderProperty(object):
    """
    Attributes:
     - property_type
     - property_value
    """

    thrift_spec = (
        None,  # 0
        (1, TType.I32, 'property_type', None, None, ),  # 1
        (2, TType.STRUCT, 'property_value', (TDatumVal, TDatumVal.thrift_spec), None, ),  # 2
    )

    def __init__(self, property_type=None, property_value=None,):
        self.property_type = property_type
        self.property_value = property_value

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.property_type = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.property_value = TDatumVal()
                    self.property_value.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('TRenderProperty')
        if self.property_type is not None:
            oprot.writeFieldBegin('property_type', TType.I32, 1)
            oprot.writeI32(self.property_type)
            oprot.writeFieldEnd()
        if self.property_value is not None:
            oprot.writeFieldBegin('property_value', TType.STRUCT, 2)
            self.property_value.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TCopyParams(object):
    """
    Attributes:
     - delimiter
     - null_str
     - has_header
     - quoted
     - quote
     - escape
     - line_delim
     - array_delim
     - array_begin
     - array_end
     - threads
     - table_type
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'delimiter', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'null_str', 'UTF8', None, ),  # 2
        (3, TType.BOOL, 'has_header', None, None, ),  # 3
        (4, TType.BOOL, 'quoted', None, None, ),  # 4
        (5, TType.STRING, 'quote', 'UTF8', None, ),  # 5
        (6, TType.STRING, 'escape', 'UTF8', None, ),  # 6
        (7, TType.STRING, 'line_delim', 'UTF8', None, ),  # 7
        (8, TType.STRING, 'array_delim', 'UTF8', None, ),  # 8
        (9, TType.STRING, 'array_begin', 'UTF8', None, ),  # 9
        (10, TType.STRING, 'array_end', 'UTF8', None, ),  # 10
        (11, TType.I32, 'threads', None, None, ),  # 11
        (12, TType.I32, 'table_type', None, 0, ),  # 12
    )

    def __init__(self, delimiter=None, null_str=None, has_header=None, quoted=None, quote=None, escape=None, line_delim=None, array_delim=None, array_begin=None, array_end=None, threads=None, table_type=thrift_spec[12][4],):
        self.delimiter = delimiter
        self.null_str = null_str
        self.has_header = has_header
        self.quoted = quoted
        self.quote = quote
        self.escape = escape
        self.line_delim = line_delim
        self.array_delim = array_delim
        self.array_begin = array_begin
        self.array_end = array_end
        self.threads = threads
        self.table_type = table_type

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.delimiter = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.null_str = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.BOOL:
                    self.has_header = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.BOOL:
                    self.quoted = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.quote = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.escape = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.STRING:
                    self.line_delim = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.STRING:
                    self.array_delim = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.STRING:
                    self.array_begin = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.STRING:
                    self.array_end = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.I32:
                    self.threads = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 12:
                if ftype == TType.I32:
                    self.table_type = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('TCopyParams')
        if self.delimiter is not None:
            oprot.writeFieldBegin('delimiter', TType.STRING, 1)
            oprot.writeString(self.delimiter.encode('utf-8') if sys.version_info[0] == 2 else self.delimiter)
            oprot.writeFieldEnd()
        if self.null_str is not None:
            oprot.writeFieldBegin('null_str', TType.STRING, 2)
            oprot.writeString(self.null_str.encode('utf-8') if sys.version_info[0] == 2 else self.null_str)
            oprot.writeFieldEnd()
        if self.has_header is not None:
            oprot.writeFieldBegin('has_header', TType.BOOL, 3)
            oprot.writeBool(self.has_header)
            oprot.writeFieldEnd()
        if self.quoted is not None:
            oprot.writeFieldBegin('quoted', TType.BOOL, 4)
            oprot.writeBool(self.quoted)
            oprot.writeFieldEnd()
        if self.quote is not None:
            oprot.writeFieldBegin('quote', TType.STRING, 5)
            oprot.writeString(self.quote.encode('utf-8') if sys.version_info[0] == 2 else self.quote)
            oprot.writeFieldEnd()
        if self.escape is not None:
            oprot.writeFieldBegin('escape', TType.STRING, 6)
            oprot.writeString(self.escape.encode('utf-8') if sys.version_info[0] == 2 else self.escape)
            oprot.writeFieldEnd()
        if self.line_delim is not None:
            oprot.writeFieldBegin('line_delim', TType.STRING, 7)
            oprot.writeString(self.line_delim.encode('utf-8') if sys.version_info[0] == 2 else self.line_delim)
            oprot.writeFieldEnd()
        if self.array_delim is not None:
            oprot.writeFieldBegin('array_delim', TType.STRING, 8)
            oprot.writeString(self.array_delim.encode('utf-8') if sys.version_info[0] == 2 else self.array_delim)
            oprot.writeFieldEnd()
        if self.array_begin is not None:
            oprot.writeFieldBegin('array_begin', TType.STRING, 9)
            oprot.writeString(self.array_begin.encode('utf-8') if sys.version_info[0] == 2 else self.array_begin)
            oprot.writeFieldEnd()
        if self.array_end is not None:
            oprot.writeFieldBegin('array_end', TType.STRING, 10)
            oprot.writeString(self.array_end.encode('utf-8') if sys.version_info[0] == 2 else self.array_end)
            oprot.writeFieldEnd()
        if self.threads is not None:
            oprot.writeFieldBegin('threads', TType.I32, 11)
            oprot.writeI32(self.threads)
            oprot.writeFieldEnd()
        if self.table_type is not None:
            oprot.writeFieldBegin('table_type', TType.I32, 12)
            oprot.writeI32(self.table_type)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TDetectResult(object):
    """
    Attributes:
     - row_set
     - copy_params
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRUCT, 'row_set', (TRowSet, TRowSet.thrift_spec), None, ),  # 1
        (2, TType.STRUCT, 'copy_params', (TCopyParams, TCopyParams.thrift_spec), None, ),  # 2
    )

    def __init__(self, row_set=None, copy_params=None,):
        self.row_set = row_set
        self.copy_params = copy_params

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.row_set = TRowSet()
                    self.row_set.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.copy_params = TCopyParams()
                    self.copy_params.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('TDetectResult')
        if self.row_set is not None:
            oprot.writeFieldBegin('row_set', TType.STRUCT, 1)
            self.row_set.write(oprot)
            oprot.writeFieldEnd()
        if self.copy_params is not None:
            oprot.writeFieldBegin('copy_params', TType.STRUCT, 2)
            self.copy_params.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TImportStatus(object):
    """
    Attributes:
     - elapsed
     - rows_completed
     - rows_estimated
     - rows_rejected
    """

    thrift_spec = (
        None,  # 0
        (1, TType.I64, 'elapsed', None, None, ),  # 1
        (2, TType.I64, 'rows_completed', None, None, ),  # 2
        (3, TType.I64, 'rows_estimated', None, None, ),  # 3
        (4, TType.I64, 'rows_rejected', None, None, ),  # 4
    )

    def __init__(self, elapsed=None, rows_completed=None, rows_estimated=None, rows_rejected=None,):
        self.elapsed = elapsed
        self.rows_completed = rows_completed
        self.rows_estimated = rows_estimated
        self.rows_rejected = rows_rejected

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I64:
                    self.elapsed = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.rows_completed = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.rows_estimated = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I64:
                    self.rows_rejected = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('TImportStatus')
        if self.elapsed is not None:
            oprot.writeFieldBegin('elapsed', TType.I64, 1)
            oprot.writeI64(self.elapsed)
            oprot.writeFieldEnd()
        if self.rows_completed is not None:
            oprot.writeFieldBegin('rows_completed', TType.I64, 2)
            oprot.writeI64(self.rows_completed)
            oprot.writeFieldEnd()
        if self.rows_estimated is not None:
            oprot.writeFieldBegin('rows_estimated', TType.I64, 3)
            oprot.writeI64(self.rows_estimated)
            oprot.writeFieldEnd()
        if self.rows_rejected is not None:
            oprot.writeFieldBegin('rows_rejected', TType.I64, 4)
            oprot.writeI64(self.rows_rejected)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TFrontendView(object):
    """
    Attributes:
     - view_name
     - view_state
     - image_hash
     - update_time
     - view_metadata
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'view_name', 'UTF8', None, ),  # 1
        (2, TType.STRING, 'view_state', 'UTF8', None, ),  # 2
        (3, TType.STRING, 'image_hash', 'UTF8', None, ),  # 3
        (4, TType.STRING, 'update_time', 'UTF8', None, ),  # 4
        (5, TType.STRING, 'view_metadata', 'UTF8', None, ),  # 5
    )

    def __init__(self, view_name=None, view_state=None, image_hash=None, update_time=None, view_metadata=None,):
        self.view_name = view_name
        self.view_state = view_state
        self.image_hash = image_hash
        self.update_time = update_time
        self.view_metadata = view_metadata

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.view_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.view_state = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.image_hash = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.update_time = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.view_metadata = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('TFrontendView')
        if self.view_name is not None:
            oprot.writeFieldBegin('view_name', TType.STRING, 1)
            oprot.writeString(self.view_name.encode('utf-8') if sys.version_info[0] == 2 else self.view_name)
            oprot.writeFieldEnd()
        if self.view_state is not None:
            oprot.writeFieldBegin('view_state', TType.STRING, 2)
            oprot.writeString(self.view_state.encode('utf-8') if sys.version_info[0] == 2 else self.view_state)
            oprot.writeFieldEnd()
        if self.image_hash is not None:
            oprot.writeFieldBegin('image_hash', TType.STRING, 3)
            oprot.writeString(self.image_hash.encode('utf-8') if sys.version_info[0] == 2 else self.image_hash)
            oprot.writeFieldEnd()
        if self.update_time is not None:
            oprot.writeFieldBegin('update_time', TType.STRING, 4)
            oprot.writeString(self.update_time.encode('utf-8') if sys.version_info[0] == 2 else self.update_time)
            oprot.writeFieldEnd()
        if self.view_metadata is not None:
            oprot.writeFieldBegin('view_metadata', TType.STRING, 5)
            oprot.writeString(self.view_metadata.encode('utf-8') if sys.version_info[0] == 2 else self.view_metadata)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TServerStatus(object):
    """
    Attributes:
     - read_only
     - version
     - rendering_enabled
     - start_time
     - edition
    """

    thrift_spec = (
        None,  # 0
        (1, TType.BOOL, 'read_only', None, None, ),  # 1
        (2, TType.STRING, 'version', 'UTF8', None, ),  # 2
        (3, TType.BOOL, 'rendering_enabled', None, None, ),  # 3
        (4, TType.I64, 'start_time', None, None, ),  # 4
        (5, TType.STRING, 'edition', 'UTF8', None, ),  # 5
    )

    def __init__(self, read_only=None, version=None, rendering_enabled=None, start_time=None, edition=None,):
        self.read_only = read_only
        self.version = version
        self.rendering_enabled = rendering_enabled
        self.start_time = start_time
        self.edition = edition

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.BOOL:
                    self.read_only = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.version = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.BOOL:
                    self.rendering_enabled = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I64:
                    self.start_time = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.edition = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('TServerStatus')
        if self.read_only is not None:
            oprot.writeFieldBegin('read_only', TType.BOOL, 1)
            oprot.writeBool(self.read_only)
            oprot.writeFieldEnd()
        if self.version is not None:
            oprot.writeFieldBegin('version', TType.STRING, 2)
            oprot.writeString(self.version.encode('utf-8') if sys.version_info[0] == 2 else self.version)
            oprot.writeFieldEnd()
        if self.rendering_enabled is not None:
            oprot.writeFieldBegin('rendering_enabled', TType.BOOL, 3)
            oprot.writeBool(self.rendering_enabled)
            oprot.writeFieldEnd()
        if self.start_time is not None:
            oprot.writeFieldBegin('start_time', TType.I64, 4)
            oprot.writeI64(self.start_time)
            oprot.writeFieldEnd()
        if self.edition is not None:
            oprot.writeFieldBegin('edition', TType.STRING, 5)
            oprot.writeString(self.edition.encode('utf-8') if sys.version_info[0] == 2 else self.edition)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TPixel(object):
    """
    Attributes:
     - x
     - y
    """

    thrift_spec = (
        None,  # 0
        (1, TType.I64, 'x', None, None, ),  # 1
        (2, TType.I64, 'y', None, None, ),  # 2
    )

    def __init__(self, x=None, y=None,):
        self.x = x
        self.y = y

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I64:
                    self.x = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.y = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('TPixel')
        if self.x is not None:
            oprot.writeFieldBegin('x', TType.I64, 1)
            oprot.writeI64(self.x)
            oprot.writeFieldEnd()
        if self.y is not None:
            oprot.writeFieldBegin('y', TType.I64, 2)
            oprot.writeI64(self.y)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TPixelRowResult(object):
    """
    Attributes:
     - pixel
     - row_id
     - row_set
     - nonce
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRUCT, 'pixel', (TPixel, TPixel.thrift_spec), None, ),  # 1
        (2, TType.I64, 'row_id', None, None, ),  # 2
        (3, TType.STRUCT, 'row_set', (TRowSet, TRowSet.thrift_spec), None, ),  # 3
        (4, TType.STRING, 'nonce', 'UTF8', None, ),  # 4
    )

    def __init__(self, pixel=None, row_id=None, row_set=None, nonce=None,):
        self.pixel = pixel
        self.row_id = row_id
        self.row_set = row_set
        self.nonce = nonce

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.pixel = TPixel()
                    self.pixel.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.row_id = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.row_set = TRowSet()
                    self.row_set.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.nonce = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('TPixelRowResult')
        if self.pixel is not None:
            oprot.writeFieldBegin('pixel', TType.STRUCT, 1)
            self.pixel.write(oprot)
            oprot.writeFieldEnd()
        if self.row_id is not None:
            oprot.writeFieldBegin('row_id', TType.I64, 2)
            oprot.writeI64(self.row_id)
            oprot.writeFieldEnd()
        if self.row_set is not None:
            oprot.writeFieldBegin('row_set', TType.STRUCT, 3)
            self.row_set.write(oprot)
            oprot.writeFieldEnd()
        if self.nonce is not None:
            oprot.writeFieldBegin('nonce', TType.STRING, 4)
            oprot.writeString(self.nonce.encode('utf-8') if sys.version_info[0] == 2 else self.nonce)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TPixelTableRowResult(object):
    """
    Attributes:
     - pixel
     - vega_table_name
     - table_id
     - row_id
     - row_set
     - nonce
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRUCT, 'pixel', (TPixel, TPixel.thrift_spec), None, ),  # 1
        (2, TType.STRING, 'vega_table_name', 'UTF8', None, ),  # 2
        (3, TType.I64, 'table_id', None, None, ),  # 3
        (4, TType.I64, 'row_id', None, None, ),  # 4
        (5, TType.STRUCT, 'row_set', (TRowSet, TRowSet.thrift_spec), None, ),  # 5
        (6, TType.STRING, 'nonce', 'UTF8', None, ),  # 6
    )

    def __init__(self, pixel=None, vega_table_name=None, table_id=None, row_id=None, row_set=None, nonce=None,):
        self.pixel = pixel
        self.vega_table_name = vega_table_name
        self.table_id = table_id
        self.row_id = row_id
        self.row_set = row_set
        self.nonce = nonce

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.pixel = TPixel()
                    self.pixel.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.vega_table_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.table_id = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I64:
                    self.row_id = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRUCT:
                    self.row_set = TRowSet()
                    self.row_set.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.nonce = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('TPixelTableRowResult')
        if self.pixel is not None:
            oprot.writeFieldBegin('pixel', TType.STRUCT, 1)
            self.pixel.write(oprot)
            oprot.writeFieldEnd()
        if self.vega_table_name is not None:
            oprot.writeFieldBegin('vega_table_name', TType.STRING, 2)
            oprot.writeString(self.vega_table_name.encode('utf-8') if sys.version_info[0] == 2 else self.vega_table_name)
            oprot.writeFieldEnd()
        if self.table_id is not None:
            oprot.writeFieldBegin('table_id', TType.I64, 3)
            oprot.writeI64(self.table_id)
            oprot.writeFieldEnd()
        if self.row_id is not None:
            oprot.writeFieldBegin('row_id', TType.I64, 4)
            oprot.writeI64(self.row_id)
            oprot.writeFieldEnd()
        if self.row_set is not None:
            oprot.writeFieldBegin('row_set', TType.STRUCT, 5)
            self.row_set.write(oprot)
            oprot.writeFieldEnd()
        if self.nonce is not None:
            oprot.writeFieldBegin('nonce', TType.STRING, 6)
            oprot.writeString(self.nonce.encode('utf-8') if sys.version_info[0] == 2 else self.nonce)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TPixelRows(object):
    """
    Attributes:
     - pixel
     - row_set
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRUCT, 'pixel', (TPixel, TPixel.thrift_spec), None, ),  # 1
        (2, TType.STRUCT, 'row_set', (TRowSet, TRowSet.thrift_spec), None, ),  # 2
    )

    def __init__(self, pixel=None, row_set=None,):
        self.pixel = pixel
        self.row_set = row_set

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.pixel = TPixel()
                    self.pixel.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.row_set = TRowSet()
                    self.row_set.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('TPixelRows')
        if self.pixel is not None:
            oprot.writeFieldBegin('pixel', TType.STRUCT, 1)
            self.pixel.write(oprot)
            oprot.writeFieldEnd()
        if self.row_set is not None:
            oprot.writeFieldBegin('row_set', TType.STRUCT, 2)
            self.row_set.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TPixelResult(object):
    """
    Attributes:
     - pixel_rows
     - nonce
    """

    thrift_spec = (
        None,  # 0
        (1, TType.LIST, 'pixel_rows', (TType.STRUCT, (TPixelRows, TPixelRows.thrift_spec), False), None, ),  # 1
        (2, TType.STRING, 'nonce', 'UTF8', None, ),  # 2
    )

    def __init__(self, pixel_rows=None, nonce=None,):
        self.pixel_rows = pixel_rows
        self.nonce = nonce

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.LIST:
                    self.pixel_rows = []
                    (_etype87, _size84) = iprot.readListBegin()
                    for _i88 in range(_size84):
                        _elem89 = TPixelRows()
                        _elem89.read(iprot)
                        self.pixel_rows.append(_elem89)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.nonce = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('TPixelResult')
        if self.pixel_rows is not None:
            oprot.writeFieldBegin('pixel_rows', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.pixel_rows))
            for iter90 in self.pixel_rows:
                iter90.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.nonce is not None:
            oprot.writeFieldBegin('nonce', TType.STRING, 2)
            oprot.writeString(self.nonce.encode('utf-8') if sys.version_info[0] == 2 else self.nonce)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TRenderResult(object):
    """
    Attributes:
     - image
     - nonce
     - execution_time_ms
     - render_time_ms
     - total_time_ms
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'image', 'BINARY', None, ),  # 1
        (2, TType.STRING, 'nonce', 'UTF8', None, ),  # 2
        (3, TType.I64, 'execution_time_ms', None, None, ),  # 3
        (4, TType.I64, 'render_time_ms', None, None, ),  # 4
        (5, TType.I64, 'total_time_ms', None, None, ),  # 5
    )

    def __init__(self, image=None, nonce=None, execution_time_ms=None, render_time_ms=None, total_time_ms=None,):
        self.image = image
        self.nonce = nonce
        self.execution_time_ms = execution_time_ms
        self.render_time_ms = render_time_ms
        self.total_time_ms = total_time_ms

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.image = iprot.readBinary()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.nonce = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.execution_time_ms = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I64:
                    self.render_time_ms = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I64:
                    self.total_time_ms = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('TRenderResult')
        if self.image is not None:
            oprot.writeFieldBegin('image', TType.STRING, 1)
            oprot.writeBinary(self.image)
            oprot.writeFieldEnd()
        if self.nonce is not None:
            oprot.writeFieldBegin('nonce', TType.STRING, 2)
            oprot.writeString(self.nonce.encode('utf-8') if sys.version_info[0] == 2 else self.nonce)
            oprot.writeFieldEnd()
        if self.execution_time_ms is not None:
            oprot.writeFieldBegin('execution_time_ms', TType.I64, 3)
            oprot.writeI64(self.execution_time_ms)
            oprot.writeFieldEnd()
        if self.render_time_ms is not None:
            oprot.writeFieldBegin('render_time_ms', TType.I64, 4)
            oprot.writeI64(self.render_time_ms)
            oprot.writeFieldEnd()
        if self.total_time_ms is not None:
            oprot.writeFieldBegin('total_time_ms', TType.I64, 5)
            oprot.writeI64(self.total_time_ms)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TGpuMemorySummary(object):
    """
    Attributes:
     - max
     - in_use
     - allocated
     - is_allocation_capped
    """

    thrift_spec = (
        None,  # 0
        (1, TType.I64, 'max', None, None, ),  # 1
        (2, TType.I64, 'in_use', None, None, ),  # 2
        (3, TType.I64, 'allocated', None, None, ),  # 3
        (4, TType.BOOL, 'is_allocation_capped', None, None, ),  # 4
    )

    def __init__(self, max=None, in_use=None, allocated=None, is_allocation_capped=None,):
        self.max = max
        self.in_use = in_use
        self.allocated = allocated
        self.is_allocation_capped = is_allocation_capped

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I64:
                    self.max = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.in_use = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.allocated = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.BOOL:
                    self.is_allocation_capped = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('TGpuMemorySummary')
        if self.max is not None:
            oprot.writeFieldBegin('max', TType.I64, 1)
            oprot.writeI64(self.max)
            oprot.writeFieldEnd()
        if self.in_use is not None:
            oprot.writeFieldBegin('in_use', TType.I64, 2)
            oprot.writeI64(self.in_use)
            oprot.writeFieldEnd()
        if self.allocated is not None:
            oprot.writeFieldBegin('allocated', TType.I64, 3)
            oprot.writeI64(self.allocated)
            oprot.writeFieldEnd()
        if self.is_allocation_capped is not None:
            oprot.writeFieldBegin('is_allocation_capped', TType.BOOL, 4)
            oprot.writeBool(self.is_allocation_capped)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TMemorySummary(object):
    """
    Attributes:
     - cpu_memory_in_use
     - gpu_summary
    """

    thrift_spec = (
        None,  # 0
        (1, TType.I64, 'cpu_memory_in_use', None, None, ),  # 1
        (2, TType.LIST, 'gpu_summary', (TType.STRUCT, (TGpuMemorySummary, TGpuMemorySummary.thrift_spec), False), None, ),  # 2
    )

    def __init__(self, cpu_memory_in_use=None, gpu_summary=None,):
        self.cpu_memory_in_use = cpu_memory_in_use
        self.gpu_summary = gpu_summary

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I64:
                    self.cpu_memory_in_use = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.gpu_summary = []
                    (_etype94, _size91) = iprot.readListBegin()
                    for _i95 in range(_size91):
                        _elem96 = TGpuMemorySummary()
                        _elem96.read(iprot)
                        self.gpu_summary.append(_elem96)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('TMemorySummary')
        if self.cpu_memory_in_use is not None:
            oprot.writeFieldBegin('cpu_memory_in_use', TType.I64, 1)
            oprot.writeI64(self.cpu_memory_in_use)
            oprot.writeFieldEnd()
        if self.gpu_summary is not None:
            oprot.writeFieldBegin('gpu_summary', TType.LIST, 2)
            oprot.writeListBegin(TType.STRUCT, len(self.gpu_summary))
            for iter97 in self.gpu_summary:
                iter97.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TTableDetails(object):
    """
    Attributes:
     - row_desc
     - fragment_size
     - page_size
     - max_rows
     - view_sql
    """

    thrift_spec = (
        None,  # 0
        (1, TType.LIST, 'row_desc', (TType.STRUCT, (TColumnType, TColumnType.thrift_spec), False), None, ),  # 1
        (2, TType.I64, 'fragment_size', None, None, ),  # 2
        (3, TType.I64, 'page_size', None, None, ),  # 3
        (4, TType.I64, 'max_rows', None, None, ),  # 4
        (5, TType.STRING, 'view_sql', 'UTF8', None, ),  # 5
    )

    def __init__(self, row_desc=None, fragment_size=None, page_size=None, max_rows=None, view_sql=None,):
        self.row_desc = row_desc
        self.fragment_size = fragment_size
        self.page_size = page_size
        self.max_rows = max_rows
        self.view_sql = view_sql

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.LIST:
                    self.row_desc = []
                    (_etype101, _size98) = iprot.readListBegin()
                    for _i102 in range(_size98):
                        _elem103 = TColumnType()
                        _elem103.read(iprot)
                        self.row_desc.append(_elem103)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.fragment_size = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.page_size = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I64:
                    self.max_rows = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.view_sql = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('TTableDetails')
        if self.row_desc is not None:
            oprot.writeFieldBegin('row_desc', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.row_desc))
            for iter104 in self.row_desc:
                iter104.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.fragment_size is not None:
            oprot.writeFieldBegin('fragment_size', TType.I64, 2)
            oprot.writeI64(self.fragment_size)
            oprot.writeFieldEnd()
        if self.page_size is not None:
            oprot.writeFieldBegin('page_size', TType.I64, 3)
            oprot.writeI64(self.page_size)
            oprot.writeFieldEnd()
        if self.max_rows is not None:
            oprot.writeFieldBegin('max_rows', TType.I64, 4)
            oprot.writeI64(self.max_rows)
            oprot.writeFieldEnd()
        if self.view_sql is not None:
            oprot.writeFieldBegin('view_sql', TType.STRING, 5)
            oprot.writeString(self.view_sql.encode('utf-8') if sys.version_info[0] == 2 else self.view_sql)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TColumnRange(object):
    """
    Attributes:
     - type
     - col_id
     - table_id
     - has_nulls
     - int_min
     - int_max
     - bucket
     - fp_min
     - fp_max
    """

    thrift_spec = (
        None,  # 0
        (1, TType.I32, 'type', None, None, ),  # 1
        (2, TType.I32, 'col_id', None, None, ),  # 2
        (3, TType.I32, 'table_id', None, None, ),  # 3
        (4, TType.BOOL, 'has_nulls', None, None, ),  # 4
        (5, TType.I64, 'int_min', None, None, ),  # 5
        (6, TType.I64, 'int_max', None, None, ),  # 6
        (7, TType.I64, 'bucket', None, None, ),  # 7
        (8, TType.DOUBLE, 'fp_min', None, None, ),  # 8
        (9, TType.DOUBLE, 'fp_max', None, None, ),  # 9
    )

    def __init__(self, type=None, col_id=None, table_id=None, has_nulls=None, int_min=None, int_max=None, bucket=None, fp_min=None, fp_max=None,):
        self.type = type
        self.col_id = col_id
        self.table_id = table_id
        self.has_nulls = has_nulls
        self.int_min = int_min
        self.int_max = int_max
        self.bucket = bucket
        self.fp_min = fp_min
        self.fp_max = fp_max

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.type = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.col_id = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.table_id = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.BOOL:
                    self.has_nulls = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I64:
                    self.int_min = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.I64:
                    self.int_max = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.I64:
                    self.bucket = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.DOUBLE:
                    self.fp_min = iprot.readDouble()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.DOUBLE:
                    self.fp_max = iprot.readDouble()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('TColumnRange')
        if self.type is not None:
            oprot.writeFieldBegin('type', TType.I32, 1)
            oprot.writeI32(self.type)
            oprot.writeFieldEnd()
        if self.col_id is not None:
            oprot.writeFieldBegin('col_id', TType.I32, 2)
            oprot.writeI32(self.col_id)
            oprot.writeFieldEnd()
        if self.table_id is not None:
            oprot.writeFieldBegin('table_id', TType.I32, 3)
            oprot.writeI32(self.table_id)
            oprot.writeFieldEnd()
        if self.has_nulls is not None:
            oprot.writeFieldBegin('has_nulls', TType.BOOL, 4)
            oprot.writeBool(self.has_nulls)
            oprot.writeFieldEnd()
        if self.int_min is not None:
            oprot.writeFieldBegin('int_min', TType.I64, 5)
            oprot.writeI64(self.int_min)
            oprot.writeFieldEnd()
        if self.int_max is not None:
            oprot.writeFieldBegin('int_max', TType.I64, 6)
            oprot.writeI64(self.int_max)
            oprot.writeFieldEnd()
        if self.bucket is not None:
            oprot.writeFieldBegin('bucket', TType.I64, 7)
            oprot.writeI64(self.bucket)
            oprot.writeFieldEnd()
        if self.fp_min is not None:
            oprot.writeFieldBegin('fp_min', TType.DOUBLE, 8)
            oprot.writeDouble(self.fp_min)
            oprot.writeFieldEnd()
        if self.fp_max is not None:
            oprot.writeFieldBegin('fp_max', TType.DOUBLE, 9)
            oprot.writeDouble(self.fp_max)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TDictionaryGeneration(object):
    """
    Attributes:
     - dict_id
     - entry_count
    """

    thrift_spec = (
        None,  # 0
        (1, TType.I32, 'dict_id', None, None, ),  # 1
        (2, TType.I64, 'entry_count', None, None, ),  # 2
    )

    def __init__(self, dict_id=None, entry_count=None,):
        self.dict_id = dict_id
        self.entry_count = entry_count

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.dict_id = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.entry_count = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('TDictionaryGeneration')
        if self.dict_id is not None:
            oprot.writeFieldBegin('dict_id', TType.I32, 1)
            oprot.writeI32(self.dict_id)
            oprot.writeFieldEnd()
        if self.entry_count is not None:
            oprot.writeFieldBegin('entry_count', TType.I64, 2)
            oprot.writeI64(self.entry_count)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TTableGeneration(object):
    """
    Attributes:
     - table_id
     - tuple_count
     - start_rowid
    """

    thrift_spec = (
        None,  # 0
        (1, TType.I32, 'table_id', None, None, ),  # 1
        (2, TType.I64, 'tuple_count', None, None, ),  # 2
        (3, TType.I64, 'start_rowid', None, None, ),  # 3
    )

    def __init__(self, table_id=None, tuple_count=None, start_rowid=None,):
        self.table_id = table_id
        self.tuple_count = tuple_count
        self.start_rowid = start_rowid

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.table_id = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.tuple_count = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.start_rowid = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('TTableGeneration')
        if self.table_id is not None:
            oprot.writeFieldBegin('table_id', TType.I32, 1)
            oprot.writeI32(self.table_id)
            oprot.writeFieldEnd()
        if self.tuple_count is not None:
            oprot.writeFieldBegin('tuple_count', TType.I64, 2)
            oprot.writeI64(self.tuple_count)
            oprot.writeFieldEnd()
        if self.start_rowid is not None:
            oprot.writeFieldBegin('start_rowid', TType.I64, 3)
            oprot.writeI64(self.start_rowid)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TPendingQuery(object):
    """
    Attributes:
     - id
     - column_ranges
     - dictionary_generations
     - table_generations
    """

    thrift_spec = (
        None,  # 0
        (1, TType.I64, 'id', None, None, ),  # 1
        (2, TType.LIST, 'column_ranges', (TType.STRUCT, (TColumnRange, TColumnRange.thrift_spec), False), None, ),  # 2
        (3, TType.LIST, 'dictionary_generations', (TType.STRUCT, (TDictionaryGeneration, TDictionaryGeneration.thrift_spec), False), None, ),  # 3
        (4, TType.LIST, 'table_generations', (TType.STRUCT, (TTableGeneration, TTableGeneration.thrift_spec), False), None, ),  # 4
    )

    def __init__(self, id=None, column_ranges=None, dictionary_generations=None, table_generations=None,):
        self.id = id
        self.column_ranges = column_ranges
        self.dictionary_generations = dictionary_generations
        self.table_generations = table_generations

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I64:
                    self.id = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.column_ranges = []
                    (_etype108, _size105) = iprot.readListBegin()
                    for _i109 in range(_size105):
                        _elem110 = TColumnRange()
                        _elem110.read(iprot)
                        self.column_ranges.append(_elem110)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.LIST:
                    self.dictionary_generations = []
                    (_etype114, _size111) = iprot.readListBegin()
                    for _i115 in range(_size111):
                        _elem116 = TDictionaryGeneration()
                        _elem116.read(iprot)
                        self.dictionary_generations.append(_elem116)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.LIST:
                    self.table_generations = []
                    (_etype120, _size117) = iprot.readListBegin()
                    for _i121 in range(_size117):
                        _elem122 = TTableGeneration()
                        _elem122.read(iprot)
                        self.table_generations.append(_elem122)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('TPendingQuery')
        if self.id is not None:
            oprot.writeFieldBegin('id', TType.I64, 1)
            oprot.writeI64(self.id)
            oprot.writeFieldEnd()
        if self.column_ranges is not None:
            oprot.writeFieldBegin('column_ranges', TType.LIST, 2)
            oprot.writeListBegin(TType.STRUCT, len(self.column_ranges))
            for iter123 in self.column_ranges:
                iter123.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.dictionary_generations is not None:
            oprot.writeFieldBegin('dictionary_generations', TType.LIST, 3)
            oprot.writeListBegin(TType.STRUCT, len(self.dictionary_generations))
            for iter124 in self.dictionary_generations:
                iter124.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.table_generations is not None:
            oprot.writeFieldBegin('table_generations', TType.LIST, 4)
            oprot.writeListBegin(TType.STRUCT, len(self.table_generations))
            for iter125 in self.table_generations:
                iter125.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TVarLen(object):
    """
    Attributes:
     - payload
     - is_null
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'payload', 'BINARY', None, ),  # 1
        (2, TType.BOOL, 'is_null', None, None, ),  # 2
    )

    def __init__(self, payload=None, is_null=None,):
        self.payload = payload
        self.is_null = is_null

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.payload = iprot.readBinary()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.BOOL:
                    self.is_null = iprot.readBool()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('TVarLen')
        if self.payload is not None:
            oprot.writeFieldBegin('payload', TType.STRING, 1)
            oprot.writeBinary(self.payload)
            oprot.writeFieldEnd()
        if self.is_null is not None:
            oprot.writeFieldBegin('is_null', TType.BOOL, 2)
            oprot.writeBool(self.is_null)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TDataBlockPtr(object):
    """
    Attributes:
     - fixed_len_data
     - var_len_data
    """

    thrift_spec = (
        None,  # 0
        (1, TType.STRING, 'fixed_len_data', 'BINARY', None, ),  # 1
        (2, TType.LIST, 'var_len_data', (TType.STRUCT, (TVarLen, TVarLen.thrift_spec), False), None, ),  # 2
    )

    def __init__(self, fixed_len_data=None, var_len_data=None,):
        self.fixed_len_data = fixed_len_data
        self.var_len_data = var_len_data

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.fixed_len_data = iprot.readBinary()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.var_len_data = []
                    (_etype129, _size126) = iprot.readListBegin()
                    for _i130 in range(_size126):
                        _elem131 = TVarLen()
                        _elem131.read(iprot)
                        self.var_len_data.append(_elem131)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('TDataBlockPtr')
        if self.fixed_len_data is not None:
            oprot.writeFieldBegin('fixed_len_data', TType.STRING, 1)
            oprot.writeBinary(self.fixed_len_data)
            oprot.writeFieldEnd()
        if self.var_len_data is not None:
            oprot.writeFieldBegin('var_len_data', TType.LIST, 2)
            oprot.writeListBegin(TType.STRUCT, len(self.var_len_data))
            for iter132 in self.var_len_data:
                iter132.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TInsertData(object):
    """
    Attributes:
     - db_id
     - table_id
     - column_ids
     - data
     - num_rows
    """

    thrift_spec = (
        None,  # 0
        (1, TType.I32, 'db_id', None, None, ),  # 1
        (2, TType.I32, 'table_id', None, None, ),  # 2
        (3, TType.LIST, 'column_ids', (TType.I32, None, False), None, ),  # 3
        (4, TType.LIST, 'data', (TType.STRUCT, (TDataBlockPtr, TDataBlockPtr.thrift_spec), False), None, ),  # 4
        (5, TType.I64, 'num_rows', None, None, ),  # 5
    )

    def __init__(self, db_id=None, table_id=None, column_ids=None, data=None, num_rows=None,):
        self.db_id = db_id
        self.table_id = table_id
        self.column_ids = column_ids
        self.data = data
        self.num_rows = num_rows

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.db_id = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.table_id = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.LIST:
                    self.column_ids = []
                    (_etype136, _size133) = iprot.readListBegin()
                    for _i137 in range(_size133):
                        _elem138 = iprot.readI32()
                        self.column_ids.append(_elem138)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.LIST:
                    self.data = []
                    (_etype142, _size139) = iprot.readListBegin()
                    for _i143 in range(_size139):
                        _elem144 = TDataBlockPtr()
                        _elem144.read(iprot)
                        self.data.append(_elem144)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I64:
                    self.num_rows = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('TInsertData')
        if self.db_id is not None:
            oprot.writeFieldBegin('db_id', TType.I32, 1)
            oprot.writeI32(self.db_id)
            oprot.writeFieldEnd()
        if self.table_id is not None:
            oprot.writeFieldBegin('table_id', TType.I32, 2)
            oprot.writeI32(self.table_id)
            oprot.writeFieldEnd()
        if self.column_ids is not None:
            oprot.writeFieldBegin('column_ids', TType.LIST, 3)
            oprot.writeListBegin(TType.I32, len(self.column_ids))
            for iter145 in self.column_ids:
                oprot.writeI32(iter145)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.data is not None:
            oprot.writeFieldBegin('data', TType.LIST, 4)
            oprot.writeListBegin(TType.STRUCT, len(self.data))
            for iter146 in self.data:
                iter146.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.num_rows is not None:
            oprot.writeFieldBegin('num_rows', TType.I64, 5)
            oprot.writeI64(self.num_rows)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TRawRenderPassDataResult(object):
    """
    Attributes:
     - num_channels
     - pixels
     - row_ids_A
     - row_ids_B
     - table_ids
    """

    thrift_spec = (
        None,  # 0
        (1, TType.I32, 'num_channels', None, None, ),  # 1
        (2, TType.STRING, 'pixels', 'BINARY', None, ),  # 2
        (3, TType.STRING, 'row_ids_A', 'BINARY', None, ),  # 3
        (4, TType.STRING, 'row_ids_B', 'BINARY', None, ),  # 4
        (5, TType.STRING, 'table_ids', 'BINARY', None, ),  # 5
    )

    def __init__(self, num_channels=None, pixels=None, row_ids_A=None, row_ids_B=None, table_ids=None,):
        self.num_channels = num_channels
        self.pixels = pixels
        self.row_ids_A = row_ids_A
        self.row_ids_B = row_ids_B
        self.table_ids = table_ids

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.num_channels = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.pixels = iprot.readBinary()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.row_ids_A = iprot.readBinary()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.row_ids_B = iprot.readBinary()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.table_ids = iprot.readBinary()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('TRawRenderPassDataResult')
        if self.num_channels is not None:
            oprot.writeFieldBegin('num_channels', TType.I32, 1)
            oprot.writeI32(self.num_channels)
            oprot.writeFieldEnd()
        if self.pixels is not None:
            oprot.writeFieldBegin('pixels', TType.STRING, 2)
            oprot.writeBinary(self.pixels)
            oprot.writeFieldEnd()
        if self.row_ids_A is not None:
            oprot.writeFieldBegin('row_ids_A', TType.STRING, 3)
            oprot.writeBinary(self.row_ids_A)
            oprot.writeFieldEnd()
        if self.row_ids_B is not None:
            oprot.writeFieldBegin('row_ids_B', TType.STRING, 4)
            oprot.writeBinary(self.row_ids_B)
            oprot.writeFieldEnd()
        if self.table_ids is not None:
            oprot.writeFieldBegin('table_ids', TType.STRING, 5)
            oprot.writeBinary(self.table_ids)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TRawPixelDataResult(object):
    """
    Attributes:
     - width
     - height
     - render_pass_map
     - execution_time_ms
     - render_time_ms
     - total_time_ms
    """

    thrift_spec = (
        None,  # 0
        (1, TType.I32, 'width', None, None, ),  # 1
        (2, TType.I32, 'height', None, None, ),  # 2
        (3, TType.MAP, 'render_pass_map', (TType.I32, None, TType.STRUCT, (TRawRenderPassDataResult, TRawRenderPassDataResult.thrift_spec), False), None, ),  # 3
        None,  # 4
        None,  # 5
        None,  # 6
        None,  # 7
        (8, TType.I64, 'execution_time_ms', None, None, ),  # 8
        (9, TType.I64, 'render_time_ms', None, None, ),  # 9
        (10, TType.I64, 'total_time_ms', None, None, ),  # 10
    )

    def __init__(self, width=None, height=None, render_pass_map=None, execution_time_ms=None, render_time_ms=None, total_time_ms=None,):
        self.width = width
        self.height = height
        self.render_pass_map = render_pass_map
        self.execution_time_ms = execution_time_ms
        self.render_time_ms = render_time_ms
        self.total_time_ms = total_time_ms

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.width = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.height = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    self.render_pass_map = {}
                    (_ktype148, _vtype149, _size147) = iprot.readMapBegin()
                    for _i151 in range(_size147):
                        _key152 = iprot.readI32()
                        _val153 = TRawRenderPassDataResult()
                        _val153.read(iprot)
                        self.render_pass_map[_key152] = _val153
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.I64:
                    self.execution_time_ms = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.I64:
                    self.render_time_ms = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.I64:
                    self.total_time_ms = iprot.readI64()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('TRawPixelDataResult')
        if self.width is not None:
            oprot.writeFieldBegin('width', TType.I32, 1)
            oprot.writeI32(self.width)
            oprot.writeFieldEnd()
        if self.height is not None:
            oprot.writeFieldBegin('height', TType.I32, 2)
            oprot.writeI32(self.height)
            oprot.writeFieldEnd()
        if self.render_pass_map is not None:
            oprot.writeFieldBegin('render_pass_map', TType.MAP, 3)
            oprot.writeMapBegin(TType.I32, TType.STRUCT, len(self.render_pass_map))
            for kiter154, viter155 in self.render_pass_map.items():
                oprot.writeI32(kiter154)
                viter155.write(oprot)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.execution_time_ms is not None:
            oprot.writeFieldBegin('execution_time_ms', TType.I64, 8)
            oprot.writeI64(self.execution_time_ms)
            oprot.writeFieldEnd()
        if self.render_time_ms is not None:
            oprot.writeFieldBegin('render_time_ms', TType.I64, 9)
            oprot.writeI64(self.render_time_ms)
            oprot.writeFieldEnd()
        if self.total_time_ms is not None:
            oprot.writeFieldBegin('total_time_ms', TType.I64, 10)
            oprot.writeI64(self.total_time_ms)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)
TDatumVal.thrift_spec = (
        None,  # 0
        (1, TType.I64, 'int_val', None, None, ),  # 1
        (2, TType.DOUBLE, 'real_val', None, None, ),  # 2
        (3, TType.STRING, 'str_val', 'UTF8', None, ),  # 3
        (4, TType.LIST, 'arr_val', (TType.STRUCT, (TDatum, TDatum.thrift_spec), False), None, ),  # 4
    )
TColumnData.thrift_spec = (
        None,  # 0
        (1, TType.LIST, 'int_col', (TType.I64, None, False), None, ),  # 1
        (2, TType.LIST, 'real_col', (TType.DOUBLE, None, False), None, ),  # 2
        (3, TType.LIST, 'str_col', (TType.STRING, 'UTF8', False), None, ),  # 3
        (4, TType.LIST, 'arr_col', (TType.STRUCT, (TColumn, TColumn.thrift_spec), False), None, ),  # 4
    )
