Skip to content

Commit

Permalink
[FLINK-30191][python] Update net.sf.py4j:py4j dependency to 0.10.9.7
Browse files Browse the repository at this point in the history
This closes apache#21680.
  • Loading branch information
yunfengzhou-hub authored and HuangXingBo committed Jan 19, 2023
1 parent 74c7188 commit 0bbc7b1
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ This project bundles the following dependencies under the BSD license.
See bundled license files for details.

- cloudpickle:2.1.0
- net.sf.py4j:py4j:0.10.9.3
- net.sf.py4j:py4j:0.10.9.7

This project bundles the following dependencies under SIL OFL 1.1 license (https://opensource.org/licenses/OFL-1.1).
See bundled license files for details.
Expand Down
2 changes: 1 addition & 1 deletion flink-python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The auto-generated Python docs can be found at [https://nightlies.apache.org/fli

## Python Requirements

Apache Flink Python API depends on Py4J (currently version 0.10.9.3), CloudPickle (currently version 2.1.0), python-dateutil(currently version 2.8.0), Apache Beam (currently version 2.38.0).
Apache Flink Python API depends on Py4J (currently version 0.10.9.7), CloudPickle (currently version 2.1.0), python-dateutil(currently version 2.8.0), Apache Beam (currently version 2.38.0).

## Development Notices

Expand Down
2 changes: 1 addition & 1 deletion flink-python/dev/dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ setuptools>=18.0
wheel
apache-beam==2.38.0
cython==0.29.24
py4j==0.10.9.3
py4j==0.10.9.7
python-dateutil==2.8.0
cloudpickle==2.1.0
avro-python3>=1.8.1,!=1.9.2,<1.10.0
Expand Down
Binary file removed flink-python/lib/py4j-0.10.9.3-src.zip
Binary file not shown.
Binary file added flink-python/lib/py4j-0.10.9.7-src.zip
Binary file not shown.
8 changes: 6 additions & 2 deletions flink-python/pyflink/table/table_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def get_table_schema(self) -> TableSchema:
.. versionadded:: 1.11.0
"""
return TableSchema(j_table_schema=self._j_table_result.getTableSchema())
return TableSchema(j_table_schema=self._get_java_table_schema())

def get_result_kind(self) -> ResultKind:
"""
Expand Down Expand Up @@ -189,7 +189,7 @@ def collect(self) -> 'CloseableIterator':
.. versionadded:: 1.12.0
"""
field_data_types = self._j_table_result.getTableSchema().getFieldDataTypes()
field_data_types = self._get_java_table_schema().getFieldDataTypes()

j_iter = self._j_table_result.collect()

Expand Down Expand Up @@ -218,6 +218,10 @@ def print(self):
"""
self._j_table_result.print()

def _get_java_table_schema(self):
TableSchema = get_gateway().jvm.org.apache.flink.table.api.TableSchema
return TableSchema.fromResolvedSchema(self._j_table_result.getResolvedSchema())


class CloseableIterator(object):
"""
Expand Down
2 changes: 1 addition & 1 deletion flink-python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def extracted_output_files(base_dir, file_path, output_directory):
'pyflink.examples': ['*.py', '*/*.py'],
'pyflink.bin': ['*']}

install_requires = ['py4j==0.10.9.3', 'python-dateutil==2.8.0', 'apache-beam==2.38.0',
install_requires = ['py4j==0.10.9.7', 'python-dateutil==2.8.0', 'apache-beam==2.38.0',
'cloudpickle==2.1.0', 'avro-python3>=1.8.1,!=1.9.2,<1.10.0',
'pytz>=2018.3', 'fastavro>=1.1.0,<1.4.8', 'requests>=2.26.0',
'protobuf>=3.19.0,<=3.21',
Expand Down
2 changes: 1 addition & 1 deletion flink-python/src/main/resources/META-INF/NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ This project bundles the following dependencies under the Apache Software Licens
This project bundles the following dependencies under the BSD license.
See bundled license files for details

- net.sf.py4j:py4j:0.10.9.3
- net.sf.py4j:py4j:0.10.9.7
- com.google.protobuf:protobuf-java:3.21.7

This project bundles the following dependencies under the MIT license. (https://opensource.org/licenses/MIT)
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ under the License.
<powermock.version>2.0.9</powermock.version>
<hamcrest.version>1.3</hamcrest.version>
<assertj.version>3.23.1</assertj.version>
<py4j.version>0.10.9.3</py4j.version>
<py4j.version>0.10.9.7</py4j.version>
<beam.version>2.38.0</beam.version>
<protoc.version>3.21.7</protoc.version>
<okhttp.version>3.14.9</okhttp.version>
Expand Down

0 comments on commit 0bbc7b1

Please sign in to comment.