Skip to content

Commit

Permalink
New validation on wildcard was added to AbstractJdbcSource.java,as a …
Browse files Browse the repository at this point in the history
…sample solution to polypheny#447
  • Loading branch information
dengjuan0721 committed Mar 17, 2024
1 parent 2dbce56 commit a3859a9
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,11 @@ public Map<String, List<ExportedColumn>> getExportedColumns() {
Connection connection = statement.getConnection();
DatabaseMetaData dbmd = connection.getMetaData();

String[] tables = settings.get( "tables" ).split( "," );
String tablesString = settings.get("tables");
if ("*".equals(tablesString)) {
throw new GenericRuntimeException("Wildcard '*' is not allowed for table names.");
}
String[] tables = tablesString.split(",");
for ( String str : tables ) {
String[] names = str.split( "\\." );
if ( names.length == 0 || names.length > 2 || (requiresSchema() && names.length == 1) ) {
Expand Down

0 comments on commit a3859a9

Please sign in to comment.