Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add code limit for zeppline interpreter #1

Open
wants to merge 2 commits into
base: branch-0.10
Choose a base branch
from

Conversation

hdrbell
Copy link

@hdrbell hdrbell commented Nov 23, 2021

What is this PR for?

A few sentences describing the overall goals of the pull request's commits.
First time? Check out the contributing guide - https://zeppelin.apache.org/contribution/contributions.html

What type of PR is it?

[Bug Fix | Improvement | Feature | Documentation | Hot Fix | Refactoring]

Todos

  • - Task

What is the Jira issue?

How should this be tested?

  • Strongly recommended: add automated unit tests for any new or changed behavior
  • Outline any manual steps to test the PR here.

Screenshots (if appropriate)

Questions:

  • Does the licenses files need update?
  • Is there breaking changes for older versions?
  • Does this needs documentation?

@@ -880,6 +892,19 @@ private InterpreterResult executeSql(String dbPrefix, String sql,
return new InterpreterResult(Code.SUCCESS);
}

private boolean isNotMatcherWithGioRequest(String lowQuery){

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

使用 readonly 用户访问clickhouse

@@ -770,6 +770,18 @@ private InterpreterResult executeSql(String dbPrefix, String sql,
List<String> sqlArray = sqlSplitter.splitSql(sql);
for (String sqlToExecute : sqlArray) {
String sqlTrimmedLowerCase = sqlToExecute.trim().toLowerCase();

if (isNotMatcherWithGioRequest(sqlTrimmedLowerCase)) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jdbc也只能使用read only账号

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants