Commit Graph

3 Commits

Author SHA1 Message Date
liangbowen
3fae1845e7
[KYUUBI #3820] [Subtask] [PySpark] Skip missing MagicNode and code improvements
### _Why are the changes needed?_

to close #3820 .

To improve pyspark script support,
1. skip missing MagicNode implementation, since Jupyter and sparkmagic are not yet supported
2. add missing execute_reply_internal_error method
3. fix by calling clearOutputs before loop
4. ident lines and optimze unsed imports to conform python code style
5. Check Python major version , and exit on Python 2.x
6. fix name typo of `PythonResponse`

### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [ ] Add screenshots for manual tests if appropriate

- [x] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #3819 from bowenliang123/imrove-pyspark.

Closes #3820

473b9952 [liangbowen] add return type to `connect_to_existed_gateway`
66927821 [liangbowen] remove unnecessary comments for magic code
21e1d7a2 [liangbowen] move pyspark path preparing to the top of exeuction_python
9751e094 [liangbowen] revert to use SparkSessionBuilder for session creation
c4f3ef55 [liangbowen] use `SparkSession._create_shell_session()` to create spark session
c2f65630 [liangbowen] delay importing kyuubi_util
5ed893cc [liangbowen] adding Exception to except, to prevent PEP 8: E203
029361a9 [liangbowen] ast module adaptation for >=3.8
00c75fda [liangbowen] remove legacy code for importing unicode
9f56a4f4 [liangbowen] add todo
1da708ed [liangbowen] fix typo for PythonResponse, and minor declaration improvement
910c62fb [liangbowen] remove MagicNode implementation since Jupyter and sparkmagic are not yet supported
5f15c257 [liangbowen] exit on python 2.x
86ff7d06 [liangbowen] ident lines to conform python code style
5634c5e0 [liangbowen] rename get_spark to get_spark_session, and optimize unused imports in kyuubi_util.py
9d3e1d0c [liangbowen] add missing MagicNode implementation
0ade1dbe [liangbowen] add missing execute_reply_internal_error method
aee205a5 [liangbowen] import cStringIO for fix package resolving problem
acdd4b16 [liangbowen] fix by calling clearOutputs before loop

Authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-22 10:16:52 +08:00
Fu Chen
7295049c9f
[KYUUBI #3795][PYSPARK] Python 3.8+ support
### _Why are the changes needed?_

to close #3795

Python ast api is changed after python 3.8, see https://github.com/ipython/ipython/pull/11593

### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [ ] Add screenshots for manual tests if appropriate

- [ ] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #3797 from cfmcgrady/kyuubi-3795.

Closes #3795

44edcea1 [Fu Chen] Revert "debug python version"
f8171b00 [Fu Chen] Revert "print ga debug info"
16fde4ee [Fu Chen] debug python version
331602a8 [Fu Chen] print ga debug info
66eeb3fb [Fu Chen] python 3.8+ support

Authored-by: Fu Chen <cfmcgrady@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-11 11:27:23 +08:00
Fu Chen
70590f71ef
[KYUUBI #3782][PYSPARK] Initial support PySpark
### _Why are the changes needed?_

Close #3758 #3782

Limitations:
- only support kyuubi beeline

Examples:

![截屏2022-11-04 下午5 16 11](https://user-images.githubusercontent.com/8537877/199936938-f0fc9b7e-3886-461b-8197-bd39970f5a6f.png)

![截屏2022-11-04 下午5 16 32](https://user-images.githubusercontent.com/8537877/199936970-b3c14844-6864-4c67-8428-716d632a14db.png)

### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [ ] Add screenshots for manual tests if appropriate

- [ ] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #3762 from cfmcgrady/python-support.

Closes #3782

83839a80 [Fu Chen] double check
3e4d6e3f [Fu Chen] multi-line
ec56b3c2 [Fu Chen] address comment
4d204b68 [Fu Chen] fix style
aa6aedfb [Fu Chen] address comment
db786fe3 [Fu Chen] resolve conflict
af0d1d9f [Fu Chen] revert kyuubi-hive-beeline/src/main/java/org/apache/hive/beeline/KyuubiCommands.java
8687a825 [Fu Chen] address comment
8954fed8 [Fu Chen] get conn_info_file from env
2952eb9f [Fu Chen] pythonExec
a919f1ad [Fu Chen] fix ga
47543bf0 [Fu Chen] remove findspark dependency
003bf343 [Fu Chen] [GA] setup python
594e3cdc [Fu Chen] add ut
427e1e96 [Fu Chen] pass SPARK_HOME environment variable.
69dd7dfb [Fu Chen] license
b8e44fd1 [Fu Chen] fix style
df33efcd [Fu Chen] PySpark support

Authored-by: Fu Chen <cfmcgrady@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-08 20:08:42 +08:00