jt2594838 commented on code in PR #388: URL: https://github.com/apache/tsfile/pull/388#discussion_r1976799761
########## python/tsfile/tsfile_reader.pyx: ########## @@ -100,69 +154,122 @@ cdef class ResultSetPy: """ Checks whether the field with the specified column name in the result set is null. """ + self.check_result_set_invalid() ind = self.metadata.get_column_name_index(name) return self.is_null_by_index(ind) + def check_result_set_invalid(self): + if self.not_invalid_result_set: + raise Exception("Invalid result set. TsFile Reader not exists") + + def get_result_set_invalid(self): + return self.not_invalid_result_set + def close(self): """ Close result set, free C resource. :return: """ - free_tsfile_result_set(&self.result) + if self.result != NULL: + free_tsfile_result_set(&self.result) + + + if self.tsfile_reader is not None: + reader = self.tsfile_reader() + if reader is not None: + reader.notify_result_set_discard(self) + + self.result = NULL + self.not_invalid_result_set = True + + def set_invalid_result_set(self, invalid : bool): + self.not_invalid_result_set = invalid + self.close() Review Comment: Well, the previous field name and parameter conflict. Think this: not_a_person = true me.not_not_a_person = not_a_person Now answer: Am I a person? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@tsfile.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org