Skip to content

Commit

Permalink
Fixing style checker
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesstarr committed Sep 17, 2024
1 parent c66c9f9 commit d810dcc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
import org.apache.calcite.sql.SqlWith;
import org.apache.calcite.sql.SqlWithItem;

import org.checkerframework.checker.initialization.qual.Initialized;
import org.checkerframework.checker.initialization.qual.UnknownInitialization;
import org.checkerframework.checker.nullness.qual.Nullable;

import static java.util.Objects.requireNonNull;
Expand All @@ -46,10 +44,8 @@ public class NamespaceBuilder {

private final SqlValidatorImpl sqlValidatorImpl;

public NamespaceBuilder(@UnknownInitialization SqlValidatorImpl sqlValidatorImpl) {
@SuppressWarnings("argument.type.incompatible")
@Initialized SqlValidatorImpl sqlValidatorCast = sqlValidatorImpl;
this.sqlValidatorImpl = sqlValidatorCast;
public NamespaceBuilder(SqlValidatorImpl sqlValidatorImpl) {
this.sqlValidatorImpl = sqlValidatorImpl;
}

/**
Expand Down Expand Up @@ -176,7 +172,7 @@ public IdentifierNamespace createIdentifierNamespace(
* Interface for creating new {@link NamespaceBuilder}.
*/
public interface Factory {
NamespaceBuilder create(@UnknownInitialization SqlValidatorImpl sqlValidatorImpl);
NamespaceBuilder create(SqlValidatorImpl sqlValidatorImpl);
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,9 @@ protected SqlValidatorImpl(
TypeCoercion typeCoercion = config.typeCoercionFactory().create(typeFactory, this);
this.typeCoercion = typeCoercion;
this.scopeMap = config.scopeMapFactory().create(catalogReader);
this.namespaceBuilder = config.namespaceBuilderFactory().create(this);
@SuppressWarnings("argument.type.incompatible")
NamespaceBuilder namespaceBuilder = config.namespaceBuilderFactory().create(this);
this.namespaceBuilder = namespaceBuilder;
this.validatorAggStuff = new ValidatorAggStuff(sqlCluster, scopeMap);
this.scopePopulator =
new ScopePopulator(scopeMap, namespaceBuilder, sqlCluster, validatorAggStuff,
Expand Down

0 comments on commit d810dcc

Please sign in to comment.