case 1: // Uses a pattern tableNames = unescapeSQLString(ast.getChild(0).getText()); showTblsDesc = new ShowTablesDesc(ctx.getResFile(), dbName, tableNames); break; case 2: // Specifies a DB dbName = unescapeIdentifier(ast.getChild(1).getText()); validateDatabase(dbName); showTblsDesc = new ShowTablesDesc(ctx.getResFile(), dbName); break; case 3: // Uses a pattern and specifies a DB tableNames = unescapeSQLString(ast.getChild(2).getText()); validateDatabase(dbName); showTblsDesc = new ShowTablesDesc(ctx.getResFile(), dbName, tableNames); break; default: // No pattern or DB showTblsDesc = new ShowTablesDesc(ctx.getResFile(), dbName); break;
case 1: // Uses a pattern viewNames = unescapeSQLString(ast.getChild(0).getText()); showViewsDesc = new ShowTablesDesc(ctx.getResFile(), dbName, viewNames, TableType.VIRTUAL_VIEW); break; case 2: // Specifies a DB dbName = unescapeIdentifier(ast.getChild(1).getText()); validateDatabase(dbName); showViewsDesc = new ShowTablesDesc(ctx.getResFile(), dbName); showViewsDesc.setType(TableType.VIRTUAL_VIEW); break; viewNames = unescapeSQLString(ast.getChild(2).getText()); validateDatabase(dbName); showViewsDesc = new ShowTablesDesc(ctx.getResFile(), dbName, viewNames, TableType.VIRTUAL_VIEW); break; default: // No pattern or DB showViewsDesc = new ShowTablesDesc(ctx.getResFile(), dbName); showViewsDesc.setType(TableType.VIRTUAL_VIEW); break;
case 1: // Uses a pattern tableNames = unescapeSQLString(ast.getChild(0).getText()); showTblsDesc = new ShowTablesDesc(ctx.getResFile(), dbName, tableNames); break; case 2: // Specifies a DB dbName = unescapeIdentifier(ast.getChild(1).getText()); validateDatabase(dbName); showTblsDesc = new ShowTablesDesc(ctx.getResFile(), dbName); break; case 3: // Uses a pattern and specifies a DB tableNames = unescapeSQLString(ast.getChild(2).getText()); validateDatabase(dbName); showTblsDesc = new ShowTablesDesc(ctx.getResFile(), dbName, tableNames); break; default: // No pattern or DB showTblsDesc = new ShowTablesDesc(ctx.getResFile(), dbName); break;
case 1: // Uses a pattern materializedViewNames = unescapeSQLString(ast.getChild(0).getText()); showMaterializedViewsDesc = new ShowTablesDesc( ctx.getResFile(), dbName, materializedViewNames, TableType.MATERIALIZED_VIEW); break; dbName = unescapeIdentifier(ast.getChild(1).getText()); validateDatabase(dbName); showMaterializedViewsDesc = new ShowTablesDesc(ctx.getResFile(), dbName); showMaterializedViewsDesc.setType(TableType.MATERIALIZED_VIEW); break; materializedViewNames = unescapeSQLString(ast.getChild(2).getText()); validateDatabase(dbName); showMaterializedViewsDesc = new ShowTablesDesc( ctx.getResFile(), dbName, materializedViewNames, TableType.MATERIALIZED_VIEW); break; default: // No pattern or DB showMaterializedViewsDesc = new ShowTablesDesc(ctx.getResFile(), dbName); showMaterializedViewsDesc.setType(TableType.MATERIALIZED_VIEW); break;
case 1: // Uses a pattern viewNames = unescapeSQLString(ast.getChild(0).getText()); showViewsDesc = new ShowTablesDesc(ctx.getResFile(), dbName, viewNames, TableType.VIRTUAL_VIEW); break; case 2: // Specifies a DB dbName = unescapeIdentifier(ast.getChild(1).getText()); validateDatabase(dbName); showViewsDesc = new ShowTablesDesc(ctx.getResFile(), dbName); showViewsDesc.setType(TableType.VIRTUAL_VIEW); break; viewNames = unescapeSQLString(ast.getChild(2).getText()); validateDatabase(dbName); showViewsDesc = new ShowTablesDesc(ctx.getResFile(), dbName, viewNames, TableType.VIRTUAL_VIEW); break; default: // No pattern or DB showViewsDesc = new ShowTablesDesc(ctx.getResFile(), dbName); showViewsDesc.setType(TableType.VIRTUAL_VIEW); break;
case 1: // Uses a pattern tableNames = unescapeSQLString(ast.getChild(0).getText()); showTblsDesc = new ShowTablesDesc(ctx.getResFile(), dbName, tableNames); break; case 2: // Specifies a DB assert(ast.getChild(0).getType() == HiveParser.TOK_FROM); dbName = unescapeIdentifier(ast.getChild(1).getText()); showTblsDesc = new ShowTablesDesc(ctx.getResFile(), dbName); break; case 3: // Uses a pattern and specifies a DB dbName = unescapeIdentifier(ast.getChild(1).getText()); tableNames = unescapeSQLString(ast.getChild(2).getText()); showTblsDesc = new ShowTablesDesc(ctx.getResFile(), dbName, tableNames); break; default: // No pattern or DB showTblsDesc = new ShowTablesDesc(ctx.getResFile(), dbName); break;
case 1: // Uses a pattern tableNames = unescapeSQLString(ast.getChild(0).getText()); showTblsDesc = new ShowTablesDesc(ctx.getResFile(), dbName, tableNames); break; case 2: // Specifies a DB dbName = unescapeIdentifier(ast.getChild(1).getText()); validateDatabase(dbName); showTblsDesc = new ShowTablesDesc(ctx.getResFile(), dbName); break; case 3: // Uses a pattern and specifies a DB tableNames = unescapeSQLString(ast.getChild(2).getText()); validateDatabase(dbName); showTblsDesc = new ShowTablesDesc(ctx.getResFile(), dbName, tableNames); break; default: // No pattern or DB showTblsDesc = new ShowTablesDesc(ctx.getResFile(), dbName); break;