Fix test case where inferred list type is null

Change-Id: I330fc1108d9c4a980e47391650a3e23d600b91d2
This commit is contained in:
Wes McKinney committed 2017-08-09 10:31:12 -04:00
1 parent ae5c831254
commit f4f44c18e7
1 file changed
+2 -2
+2 -2
View File
@@ -960,7 +960,7 @@ inline Status PandasConverter::ConvertTypedLists(const std::shared_ptr<DataType>
std::shared_ptr<DataType> inferred_type;
RETURN_NOT_OK(builder->Append(true));
RETURN_NOT_OK(InferArrowTypeAndSize(object, &size, &inferred_type));
if (inferred_type->id() != type->id()) {
if (inferred_type->id() != Type::NA && inferred_type->id() != type->id()) {
std::stringstream ss;
ss << inferred_type->ToString() << " cannot be converted to " << type->ToString();
return Status::TypeError(ss.str());
@@ -1051,7 +1051,7 @@ inline Status PandasConverter::ConvertTypedLists<NPY_OBJECT, StringType>(
std::shared_ptr<DataType> inferred_type;
RETURN_NOT_OK(builder->Append(true));
RETURN_NOT_OK(InferArrowTypeAndSize(object, &size, &inferred_type));
if (inferred_type->id() != Type::STRING) {
if (inferred_type->id() != Type::NA && inferred_type->id() != Type::STRING) {
std::stringstream ss;
ss << inferred_type->ToString() << " cannot be converted to STRING.";
return Status::TypeError(ss.str());