zeppelin
zeppelin copied to clipboard
[ZEPPELIN-5798] Add multiline sql statement support for Livy Spark SQL interpreter
What is this PR for?
What type of PR is it?
Feature & Bug Fix
What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-5798
How should this be tested?
execute multiline sql statement with ";", for example:
show databases;
use xxxx;
show tables;
Questions:
- Does the licenses files need to update? No
- Is there breaking changes for older versions? No
- Does this needs documentation? No
I have found a new bug in this file.
message data like this will fail with exception com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected a string but was BEGIN_OBJECT at line 1 column 9 path $.
df: org.apache.spark.sql.DataFrame = [_id: struct<oid: string>, pv: bigint ... 2 more fields]
_id pv stats_date uv
{"_id":{"oid":"6295fdbd458288396d008163"},"pv":0,"stats_date":"20220530","uv":0}
which is caused by code in this place
I will fix this later.
ping @zkytech
ping @zkytech
What should I do next?
@zkytech Have you resolved the issue in the above comment ?https://github.com/apache/zeppelin/pull/4443#issuecomment-1214710538
@zkytech Have you resolved the issue in the above comment ?#4443 (comment)
Yes, It has been fixed in this commit https://github.com/apache/zeppelin/pull/4443/commits/c31945d85dd2add9021ed072904dd254efbe1a51
The url in commit message is wrong, it should be https://github.com/apache/zeppelin/pull/4443#issuecomment-1214710538,
Sorry for late response @zkytech Could you retrigger the CI?
Sorry for late response @zkytech Could you retrigger the CI?
ok
@zkytech livy interpreter in CI is failed, could help fix it? LivySparkSQLInterpreter
@zjffdu fixed
Please rebase your PR to current master.
@Reamer Done
@Reamer Done
Let's wait for CI tests
Unit test is required to update. Because JSON number is no longer treat as string in this place
@zjffdu To fix this bug, I have made a change in this place, JSON number is no longer treat as string . Since JSON doesn't distinguish between integer and floating point fields, I have made a change to unit test, all number in json will be convert to float value.