Skip to content

Commit 926f0b7

Browse files
committed
add logic except matching condition
1 parent b9d80ae commit 926f0b7

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/gstype_python.i

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1368,6 +1368,8 @@ static bool convertToFieldWithType(GSRow *row, int column, PyObject* value, GSTy
13681368
if (newmem & SWIG_CAST_NEW_MEMORY) {
13691369
delete %reinterpret_cast(vpredicate, std::shared_ptr<griddb::RowKeyPredicate>*);
13701370
}
1371+
} else {
1372+
predicateEntry->predicate = NULL;
13711373
}
13721374
i++;
13731375
}
@@ -2396,12 +2398,17 @@ static bool getRowFields(GSRow* row, int columnCount, GSType* typeList, bool tim
23962398
}
23972399
break;
23982400
}
2399-
default: {
2401+
case (GS_ROW_SET_QUERY_ANALYSIS): {
24002402
std::shared_ptr< griddb::QueryAnalysisEntry >* queryAnalyResult = NULL;
24012403
queryAnalyResult = *$3 ? new std::shared_ptr< griddb::QueryAnalysisEntry >(*$3 SWIG_NO_NULL_DELETER_SWIG_POINTER_OWN) : 0;
24022404
$result = SWIG_NewPointerObj(SWIG_as_voidptr(queryAnalyResult), SWIGTYPE_p_std__shared_ptrT_griddb__QueryAnalysisEntry_t, SWIG_POINTER_OWN | SWIG_POINTER_OWN);
24032405
break;
24042406
}
2407+
default: {
2408+
PyErr_SetString(PyExc_ValueError, "Invalid type");
2409+
SWIG_fail;
2410+
break;
2411+
}
24052412
}
24062413
return $result;
24072414
}

0 commit comments

Comments
 (0)