Skip to content

Commit

Permalink
[enhancement](plsql) improve exception message (apache#34452)
Browse files Browse the repository at this point in the history
improve exception message
  • Loading branch information
Vallishp authored May 21, 2024
1 parent 2ec122c commit 1120f96
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ private void validateAndExtractFilters(StringBuilder dbFilter, StringBuilder pro
Set<Expression> equalTo = whereExpr.stream().filter(EqualTo.class::isInstance).collect(Collectors.toSet());

if (whereExpr.size() != likeSet.size() + equalTo.size()) {
throw new AnalysisException("Only support equalTo and Like filters.");
throw new AnalysisException("only support AND conjunction, does not support OR.");
}

equalTo.addAll(likeSet);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ suite("test_plsql_show_procedure_fail") {
log.info("{}", t.toString())
if (t instanceof java.sql.SQLException) {
String result = t.toString()
String expected = "java.sql.SQLException: errCode = 2, detailMessage = Only support equalTo and Like filters.";
String expected = "java.sql.SQLException: errCode = 2, detailMessage = only support AND conjunction, does not support OR.";
boolean check = result.equals(expected);
assertTrue(check)
} else {
Expand Down

0 comments on commit 1120f96

Please sign in to comment.