def test_column_type_text_from_thrift(self): self.assertEqual( types.thrift_column_type_to_arrow( ttypes.ColumnType(text_type=ttypes.ColumnTypeText()) ), types.ColumnType.Text(), )
def test_column_type_datetime_from_thrift(self): self.assertEqual( types.thrift_column_type_to_arrow( ttypes.ColumnType(datetime_type=ttypes.ColumnTypeDatetime())), types.ColumnType.Datetime(), )
def test_column_type_number_from_thrift_invalid_format(self): thrift_value = ttypes.ColumnType( number_type=ttypes.ColumnTypeNumber("{:T}")) with self.assertRaisesRegex(ValueError, "Unknown format code 'T'"): types.thrift_column_type_to_arrow(thrift_value)