Re: [PR] [FLINK-35112][python] Fix membership for Row class PyFlink [flink]
flinkbot commented on PR #24756: URL: https://github.com/apache/flink/pull/24756#issuecomment-2094773254 ## CI report: * ebca67d26c29e755aef515140ad2aacc6a6e6835 UNKNOWN Bot commands The @flinkbot bot supports the following commands: - `@flinkbot run azure` re-run the last Azure build -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [FLINK-35112][python] Fix membership for Row class PyFlink [flink]
jectpro7 commented on code in PR #24756: URL: https://github.com/apache/flink/pull/24756#discussion_r1590740738 ## flink-python/pyflink/common/types.py: ## @@ -177,7 +177,10 @@ def of_kind(row_kind: RowKind, *args, **kwargs): return row def __contains__(self, item): -return item in self._values +if hasattr(self, "_fields"): +return item in self._fields Review Comment: The enhancement is great. I have one comment, the `_fields` could be a None by invoking `set_field_names`. So it should return `False` in this case. -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [FLINK-35112][python] Fix membership for Row class PyFlink [flink]
wzorgdrager commented on code in PR #24756: URL: https://github.com/apache/flink/pull/24756#discussion_r1592097458 ## flink-python/pyflink/common/types.py: ## @@ -177,7 +177,10 @@ def of_kind(row_kind: RowKind, *args, **kwargs): return row def __contains__(self, item): -return item in self._values +if hasattr(self, "_fields"): +return item in self._fields Review Comment: so then the question is, if `_fields` is None do we want to fallback and do a membership check for the values or always just return False? -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [FLINK-35112][python] Fix membership for Row class PyFlink [flink]
dianfu commented on code in PR #24756: URL: https://github.com/apache/flink/pull/24756#discussion_r1593302200 ## flink-python/pyflink/common/types.py: ## @@ -177,7 +177,10 @@ def of_kind(row_kind: RowKind, *args, **kwargs): return row def __contains__(self, item): -return item in self._values +if hasattr(self, "_fields"): +return item in self._fields Review Comment: @wzorgdrager Thanks a lot for the PR. Personally I prefer to fallback to check for the values if `_fields` is None. -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [FLINK-35112][python] Fix membership for Row class PyFlink [flink]
wzorgdrager commented on code in PR #24756: URL: https://github.com/apache/flink/pull/24756#discussion_r1593928221 ## flink-python/pyflink/common/types.py: ## @@ -177,7 +177,10 @@ def of_kind(row_kind: RowKind, *args, **kwargs): return row def __contains__(self, item): -return item in self._values +if hasattr(self, "_fields"): +return item in self._fields Review Comment: @dianfu I agree. I added the change now. -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [FLINK-35112][python] Fix membership for Row class PyFlink [flink]
dianfu merged PR #24756: URL: https://github.com/apache/flink/pull/24756 -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org