Skip to content

Commit

Permalink
Avoid Oracle PLSQL declare variables for schema statistics
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhengguanLi committed Nov 26, 2024
1 parent ff52956 commit cb86407
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,8 @@ protected Column getColumn(SQLExpr expr) {
SQLObject resolvedOwnerObject = propertyExpr.getResolvedOwnerObject();
if (resolvedOwnerObject instanceof SQLSubqueryTableSource
|| resolvedOwnerObject instanceof SQLCreateProcedureStatement
|| resolvedOwnerObject instanceof SQLCreateFunctionStatement) {
|| resolvedOwnerObject instanceof SQLCreateFunctionStatement
|| resolvedOwnerObject instanceof SQLParameter) {
table = null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,9 @@ public void test_0() throws Exception {

assertTrue(visitor.getTables().containsKey(new TableStat.Name("fact_brand_provider")));

assertEquals(23, visitor.getColumns().size());
assertEquals(6, visitor.getConditions().size());
assertEquals(4, visitor.getRelationships().size());
assertEquals(22, visitor.getColumns().size());
assertEquals(5, visitor.getConditions().size());
assertEquals(1, visitor.getRelationships().size());

assertTrue(visitor.containsColumn("fact_brand_provider", "gyscode"));
assertTrue(visitor.containsColumn("fact_brand_provider", "gysname"));
Expand Down

0 comments on commit cb86407

Please sign in to comment.