SQL: More polish

Original commit: elastic/x-pack-elasticsearch@cedbad466b
This commit is contained in:
Costin Leau 2018-02-02 18:01:51 +02:00
parent b5dd4c649a
commit bda97c6e59
4 changed files with 16 additions and 18 deletions

View File

@ -40,7 +40,7 @@ import javax.sql.DataSource;
* and was changed again through {@link DataSource#getLogWriter()}. * and was changed again through {@link DataSource#getLogWriter()}.
* However by then the damage was done and most drivers don't use either and have their own logging implementation. * However by then the damage was done and most drivers don't use either and have their own logging implementation.
* *
* This class tries to cater to both audience - use the legacy, Writer way if needed though strive to use the * This class tries to cater to both audiences - use the legacy, Writer way if needed though strive to use the
* proper typical approach, that of specifying intention and output (file) in the URL. * proper typical approach, that of specifying intention and output (file) in the URL.
* *
* For this reason the {@link System#out} and {@link System#err} are being refered in this class though are used only * For this reason the {@link System#out} and {@link System#err} are being refered in this class though are used only

View File

@ -1,21 +1,20 @@
/* /*
* ELASTICSEARCH CONFIDENTIAL
* __________________
*
* [2017] Elasticsearch Incorporated. All Rights Reserved. * [2017] Elasticsearch Incorporated. All Rights Reserved.
* *
* NOTICE: All information contained herein is, and remains * Licensed under the Apache License, Version 2.0 (the "License");
* the property of Elasticsearch Incorporated and its suppliers, * you may not use this file except in compliance with the License.
* if any. The intellectual and technical concepts contained * You may obtain a copy of the License at
* herein are proprietary to Elasticsearch Incorporated *
* and its suppliers and may be covered by U.S. and Foreign Patents, * http://www.apache.org/licenses/LICENSE-2.0
* patents in process, and are protected by trade secret or copyright law. *
* Dissemination of this information or reproduction of this material * Unless required by applicable law or agreed to in writing, software
* is strictly forbidden unless prior written permission is obtained * distributed under the License is distributed on an "AS IS" BASIS,
* from Elasticsearch Incorporated. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/ */
/** Fork from Presto Parser - significantly trimmed down and adjusted for ES */ /** Fork of Facebook Presto Parser - significantly trimmed down and adjusted for ES */
/** presto-parser/src/main/antlr4/com/facebook/presto/sql/parser/SqlBase.g4 grammar */ /** presto-parser/src/main/antlr4/com/facebook/presto/sql/parser/SqlBase.g4 grammar */
grammar SqlBase; grammar SqlBase;

View File

@ -86,7 +86,6 @@ import org.elasticsearch.xpack.sql.querydsl.query.TermQuery;
import org.elasticsearch.xpack.sql.querydsl.query.WildcardQuery; import org.elasticsearch.xpack.sql.querydsl.query.WildcardQuery;
import org.elasticsearch.xpack.sql.tree.Location; import org.elasticsearch.xpack.sql.tree.Location;
import org.elasticsearch.xpack.sql.type.DataType; import org.elasticsearch.xpack.sql.type.DataType;
import org.elasticsearch.xpack.sql.type.DataTypes;
import org.elasticsearch.xpack.sql.util.Check; import org.elasticsearch.xpack.sql.util.Check;
import org.elasticsearch.xpack.sql.util.ReflectionUtils; import org.elasticsearch.xpack.sql.util.ReflectionUtils;
@ -830,7 +829,7 @@ abstract class QueryTranslator {
abstract static class AggTranslator<F extends Function> { abstract static class AggTranslator<F extends Function> {
private final Class<F> typeToken = ReflectionUtils.detectSuperTypeForRuleLike(getClass()); private final Class<?> typeToken = ReflectionUtils.detectSuperTypeForRuleLike(getClass());
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public final LeafAgg apply(String id, String parent, Function f) { public final LeafAgg apply(String id, String parent, Function f) {