Fix the rest client

Original commit: elastic/x-pack-elasticsearch@e9aaf05398
This commit is contained in:
Costin Leau 2018-01-08 16:39:51 +02:00
parent dab50f7b77
commit af33fb847e
1 changed files with 6 additions and 6 deletions

View File

@ -46,12 +46,12 @@ public class TransportSqlListColumnsAction extends HandledTransportAction<SqlLis
// TODO: This is wrong // TODO: This is wrong
// See https://github.com/elastic/x-pack-elasticsearch/pull/3438/commits/61b7c26fe08db2721f0431579f215fe493744af3 // See https://github.com/elastic/x-pack-elasticsearch/pull/3438/commits/61b7c26fe08db2721f0431579f215fe493744af3
// and https://github.com/elastic/x-pack-elasticsearch/issues/3460 // and https://github.com/elastic/x-pack-elasticsearch/issues/3460
String indexPattern = hasText(request.getTablePattern()) ?
StringUtils.likeToIndexWildcard(request.getTablePattern(), (char) 0) : "*"; String indexPattern = hasText(request.getTablePattern()) ? request.getTablePattern() : "*";
String regexPattern = hasText(request.getTablePattern()) ? String regexPattern = null;
StringUtils.likeToJavaPattern(request.getTablePattern(), (char) 0) : null;
Pattern columnMatcher = hasText(request.getColumnPattern()) ? Pattern columnMatcher = hasText(request.getColumnPattern()) ? Pattern.compile(
Pattern.compile(StringUtils.likeToJavaPattern(request.getColumnPattern(), (char) 0)) : null; StringUtils.likeToJavaPattern(request.getColumnPattern(), (char) 0)) : null;
indexResolver.resolveAsSeparateMappings(indexPattern, regexPattern, ActionListener.wrap(esIndices -> { indexResolver.resolveAsSeparateMappings(indexPattern, regexPattern, ActionListener.wrap(esIndices -> {
List<ColumnInfo> columns = new ArrayList<>(); List<ColumnInfo> columns = new ArrayList<>();