Skip to content

Commit

Permalink
fix rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
huangfeng1993 committed Jul 18, 2022
1 parent b039f67 commit d312f65
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public String toSql() {
sb.append("`").append(dbName).append("` ");
}
if (wild != null) {
sb.append("LIKE ").append("`").append(wild).append("`");
sb.append("LIKE ").append("'").append(wild).append("'");
}
return sb.toString();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ public void tearDown() throws Exception {
public void testNormal() throws Exception {
ctx = UtFrameUtils.createDefaultCtx();
ctx.setDatabase("testDb");
ctx.setCluster("default_cluster");
compareAfterParse("CREATE FUNCTION f(INT, INT) RETURNS INT");
compareAfterParse("CREATE FUNCTION f(INT, INT, CHAR(10), BIGINT, ...) RETURNS INT");
compareAfterParse("CREATE AGGREGATE FUNCTION f(INT, INT) RETURNS INT INTERMEDIATE INT");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ public class ShowFunctionsStmtTest extends DDLTestBase {
public ExpectedException expectedEx = ExpectedException.none();

@Test
public void testNormal() throws UserException {
ShowFunctionsStmt stmt = new ShowFunctionsStmt(null, true, true, "%year%", null);
stmt.analyze(analyzer);
Assert.assertEquals("SHOW FULL BUILTIN FUNCTIONS FROM `default_cluster:testDb1` LIKE `%year%`",
stmt.toString());
public void testNormal() throws Exception {
String originSql = "SHOW FULL BUILTIN FUNCTIONS FROM `testDb1` LIKE '%year%'";
StatementBase stmt = UtFrameUtils.parseStmtWithNewParserNotIncludeAnalyzer(originSql, ctx);
Assert.assertEquals(originSql, stmt.toSql());

}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,7 @@ public void testCreateView() throws Exception {
auth.grantPrivs(testUser, db1TablePattern, PrivBitSet.of(Privilege.CREATE_PRIV, Privilege.SELECT_PRIV), true);
PrivilegeChecker.check(statementBase, starRocksAssert.getCtx());

auth.revokePrivs(testUser, db1TablePattern, PrivBitSet.of(Privilege.SELECT_PRIV), true);
sql = "create view db1.v as select * from db1.tbl1";
StatementBase statementBase2 = UtFrameUtils.parseStmtWithNewParser(sql, starRocksAssert.getCtx());
Assert.assertThrows(SemanticException.class,
Expand Down

0 comments on commit d312f65

Please sign in to comment.