You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by jh...@apache.org on 2020/07/29 00:59:16 UTC

[calcite] 03/09: [CALCITE-4137] Checkstyle should ensure that every class has a Javadoc comment

This is an automated email from the ASF dual-hosted git repository.

jhyde pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git

commit a1bdba6d79ac05ef227cdb15b7c044c6e0e54dfa
Author: Julian Hyde <jh...@apache.org>
AuthorDate: Fri Jul 24 18:21:02 2020 -0700

    [CALCITE-4137] Checkstyle should ensure that every class has a Javadoc comment
    
    Checkstyle should ensure that every class, interface, enum, package has
    a Javadoc comment. And that javadoc types (e.g @param and @return) are
    not empty.
    
    Following [CALCITE-2905], remove @PackageMarker from Redis adapter.
---
 .../adapter/cassandra/CassandraEnumerator.java     |   2 +-
 .../calcite/adapter/cassandra/CassandraRules.java  |   3 -
 .../calcite/adapter/cassandra/CassandraSchema.java |   7 +-
 .../adapter/cassandra/CassandraSchemaFactory.java  |   2 +-
 .../calcite/adapter/cassandra/CassandraTable.java  |   2 +-
 .../apache/calcite/test/CassandraExtension.java    |   9 +-
 .../calcite/adapter/enumerable/EnumUtils.java      |   7 +-
 .../calcite/adapter/enumerable/JavaRowFormat.java  |   2 +-
 .../adapter/enumerable/NestedBlockBuilder.java     |   3 +-
 .../adapter/enumerable/NestedBlockBuilderImpl.java |   3 +-
 .../ReflectiveCallNotNullImplementor.java          |   5 +-
 .../adapter/enumerable/RexToLixTranslator.java     |   2 +-
 .../enumerable/impl/AggResetContextImpl.java       |   2 +-
 .../enumerable/impl/AggResultContextImpl.java      |   2 +-
 .../calcite/adapter/java/ReflectiveSchema.java     |   2 +-
 .../calcite/adapter/jdbc/JdbcImplementor.java      |   1 +
 .../org/apache/calcite/adapter/jdbc/JdbcRules.java |   8 +-
 .../apache/calcite/adapter/jdbc/JdbcSchema.java    |   2 +-
 .../calcite/config/CalciteConnectionConfig.java    |  67 +--
 .../calcite/config/CalciteSystemProperty.java      |   5 +-
 .../org/apache/calcite/interpreter/Bindables.java  |   1 +
 .../java/org/apache/calcite/interpreter/Row.java   |   5 +-
 .../org/apache/calcite/model/ModelHandler.java     |   1 +
 .../apache/calcite/plan/AbstractRelOptPlanner.java |   9 +-
 .../java/org/apache/calcite/plan/Convention.java   |   5 +-
 .../org/apache/calcite/plan/RelOptCluster.java     |   1 +
 .../java/org/apache/calcite/plan/RelOptCost.java   |  22 +-
 .../org/apache/calcite/plan/RelOptPlanner.java     |   8 +-
 .../java/org/apache/calcite/plan/RelOptRule.java   |   4 +-
 .../org/apache/calcite/plan/RelOptRuleCall.java    |   2 +-
 .../org/apache/calcite/plan/RelOptRuleOperand.java |   4 +-
 .../java/org/apache/calcite/plan/RelOptRules.java  |   5 +-
 .../java/org/apache/calcite/plan/RelOptTable.java  |   2 +-
 .../java/org/apache/calcite/plan/RelOptUtil.java   |  21 +-
 .../java/org/apache/calcite/plan/RelTraitDef.java  |  10 +-
 .../java/org/apache/calcite/plan/RelTraitSet.java  |   2 +-
 .../org/apache/calcite/plan/TableAccessMap.java    |   4 +-
 .../apache/calcite/plan/VisitorDataContext.java    |   2 +-
 .../org/apache/calcite/plan/hep/HepRelVertex.java  |   2 +-
 .../calcite/plan/volcano/IterativeRuleQueue.java   |   2 +-
 .../org/apache/calcite/plan/volcano/RelSet.java    |   6 +-
 .../org/apache/calcite/plan/volcano/RelSubset.java |  34 +-
 .../calcite/plan/volcano/TopDownRuleDriver.java    |   6 +-
 .../calcite/plan/volcano/VolcanoPlanner.java       |   2 +-
 .../org/apache/calcite/prepare/PlannerImpl.java    |   5 +-
 .../org/apache/calcite/rel/AbstractRelNode.java    |  16 +-
 .../main/java/org/apache/calcite/rel/RelNode.java  |  16 +-
 .../java/org/apache/calcite/rel/RelWriter.java     |   4 +-
 .../org/apache/calcite/rel/convert/Converter.java  |   2 +-
 .../org/apache/calcite/rel/core/Aggregate.java     |   4 +-
 .../org/apache/calcite/rel/core/CorrelationId.java |   2 +-
 .../java/org/apache/calcite/rel/core/Join.java     |   1 +
 .../org/apache/calcite/rel/core/RepeatUnion.java   |   2 +-
 .../calcite/rel/metadata/RelColumnOrigin.java      |  12 +-
 .../calcite/rel/metadata/RelMdPredicates.java      |   1 +
 .../org/apache/calcite/rel/metadata/RelMdUtil.java |  23 +-
 .../apache/calcite/rel/mutable/MutableCalc.java    |   2 +-
 .../calcite/rel/mutable/MutableMultiRel.java       |   2 +-
 .../calcite/rel/rel2sql/RelToSqlConverter.java     |  32 +-
 .../apache/calcite/rel/rel2sql/SqlImplementor.java |   8 +-
 .../rel/rules/AggregateReduceFunctionsRule.java    |   2 +-
 .../rel/rules/JoinProjectTransposeRule.java        |  15 +-
 .../calcite/rel/rules/JoinToMultiJoinRule.java     |  16 +-
 .../org/apache/calcite/rel/rules/LoptJoinTree.java |   4 +-
 .../apache/calcite/rel/rules/LoptMultiJoin.java    | 224 +++++-----
 .../calcite/rel/rules/LoptOptimizeJoinRule.java    |  12 +-
 .../calcite/rel/rules/LoptSemiJoinOptimizer.java   |  10 +-
 .../org/apache/calcite/rel/rules/MultiJoin.java    |  22 +-
 .../apache/calcite/rel/rules/PushProjector.java    |  10 +-
 .../calcite/rel/rules/ReduceDecimalsRule.java      |  36 +-
 .../rules/materialize/MaterializedViewRule.java    |  15 +-
 .../org/apache/calcite/rel/type/RelDataType.java   |  23 +-
 .../calcite/rel/type/RelDataTypeFactory.java       |   4 +-
 .../java/org/apache/calcite/rex/RexBuilder.java    |  15 +-
 .../java/org/apache/calcite/rex/RexLiteral.java    |   6 +-
 .../org/apache/calcite/rex/RexMultisetUtil.java    |   4 +-
 .../org/apache/calcite/rex/RexPatternFieldRef.java |   2 +-
 .../java/org/apache/calcite/rex/RexProgram.java    |   2 +-
 .../org/apache/calcite/rex/RexProgramBuilder.java  |   6 +-
 .../java/org/apache/calcite/rex/RexSimplify.java   |   4 +-
 .../rex/RexSqlReflectiveConvertletTable.java       |   2 +-
 .../org/apache/calcite/rex/RexTableInputRef.java   |   3 +-
 .../main/java/org/apache/calcite/rex/RexUtil.java  |   6 +-
 .../calcite/runtime/CalciteContextException.java   |  15 +-
 .../org/apache/calcite/runtime/Enumerables.java    |   2 +-
 .../apache/calcite/runtime/EnumeratorCursor.java   |   3 +-
 .../main/java/org/apache/calcite/runtime/Hook.java |   3 +
 .../java/org/apache/calcite/runtime/Matcher.java   |   2 +-
 .../java/org/apache/calcite/runtime/Pattern.java   |   6 +-
 .../apache/calcite/runtime/SocketFactoryImpl.java  |  24 +-
 .../org/apache/calcite/runtime/SqlFunctions.java   |   6 +-
 .../calcite/runtime/TrustAllSslSocketFactory.java  |   2 +
 .../java/org/apache/calcite/runtime/Utilities.java |   1 +
 .../schema/impl/ReflectiveFunctionBase.java        |   5 +-
 .../org/apache/calcite/sql/JoinConditionType.java  |  10 +-
 .../java/org/apache/calcite/sql/SqlAccessEnum.java |   2 +-
 .../java/org/apache/calcite/sql/SqlAccessType.java |   4 +-
 .../apache/calcite/sql/SqlBasicTypeNameSpec.java   |   2 +-
 .../apache/calcite/sql/SqlBinaryStringLiteral.java |  12 +-
 .../main/java/org/apache/calcite/sql/SqlCall.java  |   4 +-
 .../apache/calcite/sql/SqlCharStringLiteral.java   |  11 +-
 .../java/org/apache/calcite/sql/SqlCollation.java  |   6 +-
 .../java/org/apache/calcite/sql/SqlDelete.java     |   4 +-
 .../java/org/apache/calcite/sql/SqlExplain.java    |  10 +-
 .../java/org/apache/calcite/sql/SqlFunction.java   |  15 +-
 .../java/org/apache/calcite/sql/SqlInsert.java     |   8 +-
 .../apache/calcite/sql/SqlIntervalQualifier.java   |   2 +-
 .../apache/calcite/sql/SqlJdbcFunctionCall.java    |  10 +-
 .../calcite/sql/SqlJsonConstructorNullClause.java  |   2 +-
 .../main/java/org/apache/calcite/sql/SqlKind.java  | 453 ++++++---------------
 .../java/org/apache/calcite/sql/SqlLiteral.java    |  12 +-
 .../main/java/org/apache/calcite/sql/SqlMerge.java |  25 +-
 .../main/java/org/apache/calcite/sql/SqlNode.java  |   1 +
 .../java/org/apache/calcite/sql/SqlOperator.java   |  27 +-
 .../org/apache/calcite/sql/SqlOperatorBinding.java |  12 +-
 .../java/org/apache/calcite/sql/SqlUpdate.java     |  16 +-
 .../main/java/org/apache/calcite/sql/SqlUtil.java  |  10 +-
 .../java/org/apache/calcite/sql/SqlWindow.java     |   1 +
 .../apache/calcite/sql/SqlWindowTableFunction.java |   6 +-
 .../org/apache/calcite/sql/advise/SqlAdvisor.java  |  45 +-
 .../apache/calcite/sql/advise/SqlAdvisorHint2.java |   2 +-
 .../apache/calcite/sql/advise/SqlSimpleParser.java |  27 +-
 .../calcite/sql/dialect/BigQuerySqlDialect.java    |   6 +-
 .../java/org/apache/calcite/sql/fun/SqlCase.java   |   2 +-
 .../calcite/sql/fun/SqlLiteralChainOperator.java   |   2 +-
 .../calcite/sql/fun/SqlStdOperatorTable.java       |  11 +-
 .../apache/calcite/sql/parser/SqlParserPos.java    |  22 +-
 .../apache/calcite/sql/parser/SqlParserUtil.java   |  23 +-
 .../sql/type/MultisetOperandTypeChecker.java       |   4 +-
 .../org/apache/calcite/sql/type/OperandTypes.java  |  23 +-
 .../org/apache/calcite/sql/type/ReturnTypes.java   |  21 +-
 .../calcite/sql/type/SqlOperandTypeChecker.java    |   4 +-
 .../org/apache/calcite/sql/type/SqlTypeFamily.java |   8 +-
 .../org/apache/calcite/sql/type/SqlTypeName.java   |  16 +-
 .../calcite/sql/type/SqlTypeTransformCascade.java  |   2 +-
 .../apache/calcite/sql/type/SqlTypeTransforms.java |   2 +-
 .../org/apache/calcite/sql/type/SqlTypeUtil.java   | 164 ++------
 .../org/apache/calcite/sql/util/SqlVisitor.java    |   2 +-
 .../sql/validate/AggregatingSelectScope.java       |   2 +-
 .../apache/calcite/sql/validate/SelectScope.java   |   4 +-
 .../apache/calcite/sql/validate/SqlMoniker.java    |   2 +-
 .../apache/calcite/sql/validate/SqlValidator.java  |  16 +-
 .../sql/validate/SqlValidatorCatalogReader.java    |   5 +-
 .../calcite/sql/validate/SqlValidatorImpl.java     |  15 +-
 .../calcite/sql/validate/SqlValidatorScope.java    |   2 +
 .../calcite/sql/validate/SqlValidatorTable.java    |   2 +-
 .../sql/validate/SqlValidatorWithHints.java        |   4 +-
 .../calcite/sql/validate/TableNamespace.java       |   4 +-
 .../sql/validate/implicit/TypeCoercionImpl.java    |   7 +-
 .../calcite/sql2rel/ReflectiveConvertletTable.java |   2 +-
 .../apache/calcite/sql2rel/RelDecorrelator.java    |   2 +-
 .../apache/calcite/sql2rel/SqlToRelConverter.java  |  12 +-
 .../apache/calcite/sql2rel/SubQueryConverter.java  |   4 +-
 .../org/apache/calcite/tools/FrameworkConfig.java  |   2 +-
 .../org/apache/calcite/tools/PigRelBuilder.java    |   4 +-
 .../java/org/apache/calcite/tools/Planner.java     |   1 +
 .../java/org/apache/calcite/tools/RelBuilder.java  |   5 +-
 .../java/org/apache/calcite/util/BlackholeMap.java |   2 +-
 .../src/main/java/org/apache/calcite/util/Bug.java |   3 +-
 .../java/org/apache/calcite/util/CancelFlag.java   |   4 +-
 .../org/apache/calcite/util/ConversionUtil.java    |   4 +-
 .../apache/calcite/util/DateTimeStringUtils.java   |   3 +-
 .../org/apache/calcite/util/ImmutableBeans.java    |   2 +-
 .../java/org/apache/calcite/util/NumberUtil.java   |   6 +-
 .../main/java/org/apache/calcite/util/Sources.java |   7 +-
 .../java/org/apache/calcite/util/StackWriter.java  |  16 +-
 .../main/java/org/apache/calcite/util/Util.java    |  11 +-
 .../java/org/apache/calcite/util/XmlOutput.java    |  29 +-
 .../util/graph/AttributedDirectedGraph.java        |   1 +
 .../util/mapping/AbstractSourceMapping.java        |   4 +-
 .../util/mapping/AbstractTargetMapping.java        |   4 +-
 .../apache/calcite/util/trace/CalciteLogger.java   |  24 +-
 .../calcite/adapter/enumerable/TypeFinderTest.java |   3 +-
 .../calcite/jdbc/CalciteRemoteDriverTest.java      |   4 +-
 .../apache/calcite/jdbc/JavaTypeFactoryTest.java   |   4 +-
 .../materialize/NormalizationTrimFieldTest.java    |  23 +-
 .../org/apache/calcite/plan/RelOptUtilTest.java    |  31 +-
 .../org/apache/calcite/plan/RelWriterTest.java     |  13 +-
 .../apache/calcite/plan/volcano/ComboRuleTest.java |   2 +-
 .../calcite/plan/volcano/TraitConversionTest.java  |   5 +-
 .../calcite/plan/volcano/TraitPropagationTest.java |  14 +-
 .../calcite/plan/volcano/VolcanoPlannerTest.java   |  10 +-
 .../rel/rel2sql/RelToSqlConverterStructsTest.java  |  22 +-
 .../calcite/rel/rel2sql/RelToSqlConverterTest.java |   9 +-
 .../org/apache/calcite/rex/RexBuilderTest.java     |  10 +-
 .../org/apache/calcite/rex/RexProgramTest.java     |   7 +-
 .../org/apache/calcite/rex/RexProgramTestBase.java |   5 +-
 .../runtime/DeterministicAutomatonTest.java        |   2 +-
 .../apache/calcite/sql/parser/SqlParserTest.java   |   9 +-
 .../java/org/apache/calcite/sql/test/SqlTests.java |   4 +-
 .../calcite/sql/type/RelDataTypeSystemTest.java    |   2 +-
 .../calcite/sql2rel/RelFieldTrimmerTest.java       |   1 +
 .../org/apache/calcite/test/BookstoreSchema.java   |  15 +-
 .../org/apache/calcite/test/CalciteAssert.java     |  27 +-
 .../java/org/apache/calcite/test/DiffTestCase.java |   9 +-
 .../org/apache/calcite/test/HierarchySchema.java   |   4 +-
 .../org/apache/calcite/test/JdbcAdapterTest.java   |   5 +-
 .../apache/calcite/test/JdbcFrontLinqBackTest.java |  12 +-
 .../java/org/apache/calcite/test/JdbcTest.java     |  43 +-
 .../calcite/test/LogicalProjectDigestTest.java     |   4 +-
 .../java/org/apache/calcite/test/Matchers.java     |   4 +-
 .../org/apache/calcite/test/MutableRelTest.java    |   2 +-
 .../apache/calcite/test/ReflectiveSchemaTest.java  |  18 +-
 .../org/apache/calcite/test/RelBuilderTest.java    |   6 +-
 .../test/RelMdPercentageOriginalRowsTest.java      |  43 --
 .../org/apache/calcite/test/RelOptRulesTest.java   | 103 +++--
 .../org/apache/calcite/test/RelOptTestBase.java    |   1 +
 .../org/apache/calcite/test/RexShuttleTest.java    |   2 +-
 .../apache/calcite/test/SqlToRelConverterTest.java | 140 +++----
 .../org/apache/calcite/test/SqlValidatorTest.java  |   1 +
 .../org/apache/calcite/test/TypeCoercionTest.java  |   2 +-
 .../org/apache/calcite/test/catalog/Fixture.java   |   2 +-
 .../calcite/test/catalog/MockCatalogReader.java    |   2 +-
 .../test/concurrent/ConcurrentTestCommand.java     |   2 +-
 .../concurrent/ConcurrentTestCommandExecutor.java  |   2 +-
 .../concurrent/ConcurrentTestCommandGenerator.java |  10 +-
 .../concurrent/ConcurrentTestCommandScript.java    |   6 +-
 .../test/concurrent/ConcurrentTestPlugin.java      |   2 +-
 .../EnumerableBatchNestedLoopJoinTest.java         |   2 +-
 .../test/enumerable/EnumerableCalcTest.java        |   2 +-
 .../test/enumerable/EnumerableCorrelateTest.java   |  11 +-
 .../enumerable/EnumerableSortedAggregateTest.java  |   5 +-
 .../test/enumerable/EnumerableUncollectTest.java   |   1 +
 .../calcite/test/fuzzer/RexProgramFuzzyTest.java   |   2 +-
 .../java/org/apache/calcite/tools/PlannerTest.java |   8 +-
 .../java/org/apache/calcite/util/BitSetsTest.java  |   4 +-
 .../test/java/org/apache/calcite/util/Smalls.java  |  12 +-
 .../java/org/apache/calcite/util/SourceTest.java   |   2 +-
 .../java/org/apache/calcite/util/TestUtilTest.java |   2 +-
 .../adapter/druid/BinaryOperatorConversion.java    |   3 +-
 .../adapter/druid/CeilOperatorConversion.java      |   3 +-
 .../calcite/adapter/druid/ComplexMetric.java       |  12 +-
 .../calcite/adapter/druid/DruidDateTimeUtils.java  |   8 +-
 .../calcite/adapter/druid/DruidExpressions.java    |  16 +-
 .../calcite/adapter/druid/DruidJsonFilter.java     |  70 ++--
 .../apache/calcite/adapter/druid/DruidQuery.java   |  75 ++--
 .../apache/calcite/adapter/druid/DruidRules.java   |  10 +-
 .../adapter/druid/DruidSqlCastConverter.java       |   3 +-
 .../adapter/druid/DruidSqlOperatorConverter.java   |   3 +-
 .../apache/calcite/adapter/druid/DruidTable.java   |  13 +-
 .../apache/calcite/adapter/druid/DruidType.java    |  13 +-
 .../adapter/druid/ExtractOperatorConversion.java   |  12 +-
 .../adapter/druid/ExtractionDimensionSpec.java     |   6 +-
 .../adapter/druid/FloorOperatorConversion.java     |   3 +-
 .../adapter/druid/NaryOperatorConverter.java       |   3 +-
 .../adapter/druid/SubstringOperatorConversion.java |   2 +-
 .../adapter/druid/TimeExtractionFunction.java      |   8 +-
 .../druid/UnaryPrefixOperatorConversion.java       |   3 +-
 .../druid/UnarySuffixOperatorConversion.java       |   3 +-
 .../calcite/adapter/druid/VirtualColumn.java       |   2 +-
 .../org/apache/calcite/test/DruidAdapter2IT.java   | 127 +++---
 .../org/apache/calcite/test/DruidAdapterIT.java    | 195 ++++-----
 .../elasticsearch/ElasticsearchConstants.java      |   3 +-
 .../adapter/elasticsearch/ElasticsearchJson.java   |  31 +-
 .../adapter/elasticsearch/ElasticsearchRules.java  |   4 +-
 .../adapter/elasticsearch/ElasticsearchSchema.java |   2 +-
 .../elasticsearch/ElasticsearchSchemaFactory.java  |   3 +-
 .../elasticsearch/ElasticsearchSearchResult.java   |   6 +-
 .../elasticsearch/ElasticsearchTransport.java      |   3 +-
 .../adapter/elasticsearch/PredicateAnalyzer.java   |  26 +-
 .../adapter/elasticsearch/QueryBuilders.java       |   7 +-
 .../calcite/adapter/elasticsearch/Scrolling.java   |   5 +-
 .../adapter/elasticsearch/AggregationTest.java     |  10 +-
 .../adapter/elasticsearch/BooleanLogicTest.java    |   3 +-
 .../elasticsearch/ElasticSearchAdapterTest.java    |  14 +-
 .../elasticsearch/ElasticsearchVersionTest.java    |   2 +-
 .../elasticsearch/EmbeddedElasticsearchNode.java   |  13 +-
 .../elasticsearch/EmbeddedElasticsearchPolicy.java |   1 +
 .../calcite/adapter/elasticsearch/MatchTest.java   |   5 +-
 .../adapter/elasticsearch/Projection2Test.java     |   6 +-
 .../adapter/elasticsearch/ProjectionTest.java      |   2 +-
 .../adapter/elasticsearch/QueryBuildersTest.java   |   3 +-
 .../apache/calcite/test/ElasticsearchChecker.java  |   2 +-
 .../calcite/adapter/file/FileReaderTest.java       |   2 +-
 .../calcite/adapter/geode/rel/GeodeFilter.java     |  14 +-
 .../calcite/adapter/geode/rel/GeodeTable.java      |   2 +-
 .../calcite/adapter/geode/rel/package-info.java    |   2 +-
 .../geode/simple/GeodeSimpleScannableTable.java    |   2 +-
 .../calcite/adapter/geode/simple/package-info.java |   2 +-
 .../calcite/adapter/geode/util/GeodeUtils.java     |   2 +-
 .../calcite/adapter/geode/util/package-info.java   |   2 +-
 .../adapter/geode/rel/GeodeAllDataTypesTest.java   |   4 +-
 .../adapter/geode/simple/BookMasterRegionTest.java |   2 +-
 .../adapter/kafka/KafkaMessageEnumerator.java      |   5 +-
 .../calcite/adapter/kafka/KafkaRowConverter.java   |   8 +-
 .../adapter/kafka/KafkaRowConverterImpl.java       |  11 +-
 .../adapter/kafka/KafkaRowConverterTest.java       |  12 +-
 .../apache/calcite/linq4j/EnumerableDefaults.java  |  39 +-
 .../linq4j/tree/ArrayLengthRecordField.java        |   2 +-
 .../apache/calcite/linq4j/tree/BlockBuilder.java   |   6 +-
 .../apache/calcite/linq4j/tree/BlockStatement.java |   4 +-
 .../linq4j/tree/ConstructorDeclaration.java        |   4 +-
 .../linq4j/tree/DeterministicCodeOptimizer.java    |   2 +-
 .../calcite/linq4j/tree/ForEachStatement.java      |   4 +-
 .../apache/calcite/linq4j/tree/ForStatement.java   |   4 +-
 .../calcite/linq4j/tree/FunctionExpression.java    |   4 +-
 .../calcite/linq4j/tree/MethodCallExpression.java  |   4 +-
 .../calcite/linq4j/tree/NewArrayExpression.java    |   4 +-
 .../apache/calcite/linq4j/tree/NewExpression.java  |   4 +-
 .../calcite/linq4j/tree/OptimizeShuttle.java       |   5 +-
 .../org/apache/calcite/linq4j/tree/Primitive.java  |   4 +-
 .../calcite/linq4j/tree/ReflectedPseudoField.java  |   3 +-
 .../calcite/linq4j/MemoryEnumerableTest.java       |   2 +-
 .../calcite/linq4j/test/BlockBuilderBase.java      |   2 +-
 .../calcite/linq4j/test/BlockBuilderTest.java      |  13 +-
 .../calcite/linq4j/test/CorrelateJoinTest.java     |   2 +-
 .../calcite/linq4j/test/DeterministicTest.java     |   8 +-
 .../calcite/linq4j/test/JoinPreserveOrderTest.java |   4 +-
 .../calcite/adapter/mongodb/MongoEnumerator.java   |   4 +-
 .../calcite/adapter/mongodb/MongoAdapterTest.java  |   2 +-
 .../apache/calcite/adapter/pig/PigAggregate.java   |  11 +-
 .../org/apache/calcite/adapter/pig/PigFilter.java  |   6 +-
 .../org/apache/calcite/piglet/PigRelBuilder.java   |   6 +-
 .../org/apache/calcite/piglet/PigRelExVisitor.java |   8 +-
 .../calcite/piglet/PigRelOpInnerVisitor.java       |   1 +
 .../org/apache/calcite/piglet/PigRelOpVisitor.java |   6 +-
 .../org/apache/calcite/piglet/PigRelSqlUdfs.java   |   8 +-
 .../calcite/piglet/PigRelToSqlConverter.java       |   1 +
 .../calcite/piglet/PigUserDefinedFunction.java     |   4 +-
 .../calcite/chinook/ChosenCustomerEmail.java       |   2 +-
 .../org/apache/calcite/chinook/CodesFunction.java  |   2 +-
 .../apache/calcite/chinook/ConnectionFactory.java  |   4 +-
 .../apache/calcite/chinook/EnvironmentFairy.java   |   2 +-
 .../calcite/chinook/StringConcatFunction.java      |   2 +-
 .../RemotePreparedStatementParametersTest.java     |   3 +-
 .../apache/calcite/adapter/redis/package-info.java |   6 +-
 .../calcite/adapter/spark/SparkHandlerImpl.java    |   2 +-
 src/main/config/checkstyle/checker.xml             |  15 +
 .../enumerable/CodeGenerationBenchmark.java        |   2 +-
 .../calcite/adapter/enumerable/package-info.java   |   2 +-
 .../benchmarks/DefaultDirectedGraphBenchmark.java  |   3 +-
 .../apache/calcite/benchmarks/ParserBenchmark.java |   2 +-
 .../calcite/benchmarks/PreconditionTest.java       |   2 +-
 .../apache/calcite/benchmarks/package-info.java    |   2 +-
 334 files changed, 1747 insertions(+), 2203 deletions(-)

diff --git a/cassandra/src/main/java/org/apache/calcite/adapter/cassandra/CassandraEnumerator.java b/cassandra/src/main/java/org/apache/calcite/adapter/cassandra/CassandraEnumerator.java
index 0413819..a693db6 100644
--- a/cassandra/src/main/java/org/apache/calcite/adapter/cassandra/CassandraEnumerator.java
+++ b/cassandra/src/main/java/org/apache/calcite/adapter/cassandra/CassandraEnumerator.java
@@ -57,7 +57,7 @@ class CassandraEnumerator implements Enumerator<Object> {
     this.fieldTypes = protoRowType.apply(typeFactory).getFieldList();
   }
 
-  /** Produce the next row from the results
+  /** Produces the next row from the results.
    *
    * @return A new row from the results
    */
diff --git a/cassandra/src/main/java/org/apache/calcite/adapter/cassandra/CassandraRules.java b/cassandra/src/main/java/org/apache/calcite/adapter/cassandra/CassandraRules.java
index 6aad2a5..dd76da7 100644
--- a/cassandra/src/main/java/org/apache/calcite/adapter/cassandra/CassandraRules.java
+++ b/cassandra/src/main/java/org/apache/calcite/adapter/cassandra/CassandraRules.java
@@ -205,7 +205,6 @@ public class CassandraRules {
       }
     }
 
-    /** @see org.apache.calcite.rel.convert.ConverterRule */
     @Override public void onMatch(RelOptRuleCall call) {
       LogicalFilter filter = call.rel(0);
       CassandraTableScan scan = call.rel(1);
@@ -370,7 +369,6 @@ public class CassandraRules {
       }
     }
 
-    /** @see org.apache.calcite.rel.convert.ConverterRule */
     @Override public void onMatch(RelOptRuleCall call) {
       final Sort sort = call.rel(0);
       CassandraFilter filter = call.rel(2);
@@ -426,7 +424,6 @@ public class CassandraRules {
         convert(limit.getInput(), CassandraRel.CONVENTION), limit.offset, limit.fetch);
     }
 
-    /** @see org.apache.calcite.rel.convert.ConverterRule */
     @Override public void onMatch(RelOptRuleCall call) {
       final EnumerableLimit limit = call.rel(0);
       final RelNode converted = convert(limit);
diff --git a/cassandra/src/main/java/org/apache/calcite/adapter/cassandra/CassandraSchema.java b/cassandra/src/main/java/org/apache/calcite/adapter/cassandra/CassandraSchema.java
index d023bfa..0bcd4dc 100644
--- a/cassandra/src/main/java/org/apache/calcite/adapter/cassandra/CassandraSchema.java
+++ b/cassandra/src/main/java/org/apache/calcite/adapter/cassandra/CassandraSchema.java
@@ -65,7 +65,7 @@ import java.util.stream.Collectors;
 import java.util.stream.IntStream;
 
 /**
- * Schema mapped onto a Cassandra column family
+ * Schema mapped onto a Cassandra column family.
  */
 public class CassandraSchema extends AbstractSchema {
   final Session session;
@@ -243,7 +243,7 @@ public class CassandraSchema extends AbstractSchema {
   }
 
   /**
-   * Get all primary key columns from the underlying CQL table
+   * Returns all primary key columns from the underlying CQL table.
    *
    * @return A list of field names that are part of the partition and clustering keys
    */
@@ -305,8 +305,7 @@ public class CassandraSchema extends AbstractSchema {
     return keyCollations;
   }
 
-  /** Add all materialized views defined in the schema to this column family
-   */
+  /** Adds all materialized views defined in the schema to this column family. */
   private void addMaterializedViews() {
     // Close the hook use to get us here
     hook.close();
diff --git a/cassandra/src/main/java/org/apache/calcite/adapter/cassandra/CassandraSchemaFactory.java b/cassandra/src/main/java/org/apache/calcite/adapter/cassandra/CassandraSchemaFactory.java
index 87943a8..db64ac2 100644
--- a/cassandra/src/main/java/org/apache/calcite/adapter/cassandra/CassandraSchemaFactory.java
+++ b/cassandra/src/main/java/org/apache/calcite/adapter/cassandra/CassandraSchemaFactory.java
@@ -23,7 +23,7 @@ import org.apache.calcite.schema.SchemaPlus;
 import java.util.Map;
 
 /**
- * Factory that creates a {@link CassandraSchema}
+ * Factory that creates a {@link CassandraSchema}.
  */
 @SuppressWarnings("UnusedDeclaration")
 public class CassandraSchemaFactory implements SchemaFactory {
diff --git a/cassandra/src/main/java/org/apache/calcite/adapter/cassandra/CassandraTable.java b/cassandra/src/main/java/org/apache/calcite/adapter/cassandra/CassandraTable.java
index 8b4112a..ed65284 100644
--- a/cassandra/src/main/java/org/apache/calcite/adapter/cassandra/CassandraTable.java
+++ b/cassandra/src/main/java/org/apache/calcite/adapter/cassandra/CassandraTable.java
@@ -48,7 +48,7 @@ import java.util.List;
 import java.util.Map;
 
 /**
- * Table based on a Cassandra column family
+ * Table based on a Cassandra column family.
  */
 public class CassandraTable extends AbstractQueryableTable
     implements TranslatableTable {
diff --git a/cassandra/src/test/java/org/apache/calcite/test/CassandraExtension.java b/cassandra/src/test/java/org/apache/calcite/test/CassandraExtension.java
index 3ec105a..dc8b510 100644
--- a/cassandra/src/test/java/org/apache/calcite/test/CassandraExtension.java
+++ b/cassandra/src/test/java/org/apache/calcite/test/CassandraExtension.java
@@ -93,9 +93,8 @@ class CassandraExtension implements ParameterResolver, ExecutionCondition {
             .file().getAbsolutePath());
   }
 
-  /**
-   * Register cassandra resource in root context so it can be shared with other tests
-   */
+  /** Registers a Cassandra resource in root context so it can be shared with
+   * other tests. */
   private static CassandraResource getOrCreate(ExtensionContext context) {
     // same cassandra instance should be shared across all extension instances
     return context.getRoot()
@@ -128,7 +127,9 @@ class CassandraExtension implements ParameterResolver, ExecutionCondition {
     return ConditionEvaluationResult.disabled("Cassandra tests disabled");
   }
 
-  private static class CassandraResource implements ExtensionContext.Store.CloseableResource {
+  /** Cassandra resource. */
+  private static class CassandraResource
+      implements ExtensionContext.Store.CloseableResource {
     private final Session session;
     private final Cluster cluster;
 
diff --git a/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumUtils.java b/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumUtils.java
index 83e8089..846e523 100644
--- a/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumUtils.java
+++ b/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumUtils.java
@@ -593,7 +593,7 @@ public class EnumUtils {
   }
 
   /**
-   * Handle decimal type specifically with explicit type conversion
+   * Handles decimal type specifically with explicit type conversion.
    */
   private static Expression convertAssignableType(
       Expression argument, Type targetType) {
@@ -671,7 +671,8 @@ public class EnumUtils {
   }
 
   /**
-   * Match an argument expression to method parameter type with best effort
+   * Matches an argument expression to method parameter type with best effort.
+   *
    * @param argument Argument Expression
    * @param parameter Parameter type
    * @return Converted argument expression that matches the parameter type.
@@ -832,6 +833,7 @@ public class EnumUtils {
     };
   }
 
+  /** Enumerator that converts rows into sessions separated by gaps. */
   private static class SessionizationEnumerator implements Enumerator<Object[]> {
     private final Enumerator<Object[]> inputEnumerator;
     private final int indexOfWatermarkedColumn;
@@ -972,6 +974,7 @@ public class EnumUtils {
     };
   }
 
+  /** Enumerator that computes HOP. */
   private static class HopEnumerator implements Enumerator<Object[]> {
     private final Enumerator<Object[]> inputEnumerator;
     private final int indexOfWatermarkedColumn;
diff --git a/core/src/main/java/org/apache/calcite/adapter/enumerable/JavaRowFormat.java b/core/src/main/java/org/apache/calcite/adapter/enumerable/JavaRowFormat.java
index 00d354f..eb31923 100644
--- a/core/src/main/java/org/apache/calcite/adapter/enumerable/JavaRowFormat.java
+++ b/core/src/main/java/org/apache/calcite/adapter/enumerable/JavaRowFormat.java
@@ -189,7 +189,7 @@ public enum JavaRowFormat {
   },
 
   /**
-   * See {@link org.apache.calcite.interpreter.Row}
+   * See {@link org.apache.calcite.interpreter.Row}.
    */
   ROW {
     @Override Type javaRowClass(JavaTypeFactory typeFactory, RelDataType type) {
diff --git a/core/src/main/java/org/apache/calcite/adapter/enumerable/NestedBlockBuilder.java b/core/src/main/java/org/apache/calcite/adapter/enumerable/NestedBlockBuilder.java
index 9d8c960..d319251 100644
--- a/core/src/main/java/org/apache/calcite/adapter/enumerable/NestedBlockBuilder.java
+++ b/core/src/main/java/org/apache/calcite/adapter/enumerable/NestedBlockBuilder.java
@@ -41,8 +41,7 @@ public interface NestedBlockBuilder {
   void nestBlock(BlockBuilder block);
 
   /**
-   * Returns the current code block
-   * @return current code block
+   * Returns the current code block.
    */
   BlockBuilder currentBlock();
 
diff --git a/core/src/main/java/org/apache/calcite/adapter/enumerable/NestedBlockBuilderImpl.java b/core/src/main/java/org/apache/calcite/adapter/enumerable/NestedBlockBuilderImpl.java
index ea6c516..abc186e 100644
--- a/core/src/main/java/org/apache/calcite/adapter/enumerable/NestedBlockBuilderImpl.java
+++ b/core/src/main/java/org/apache/calcite/adapter/enumerable/NestedBlockBuilderImpl.java
@@ -60,8 +60,7 @@ public class NestedBlockBuilderImpl implements NestedBlockBuilder {
   }
 
   /**
-   * Returns the current code block
-   * @return current code block
+   * Returns the current code block.
    */
   public final BlockBuilder currentBlock() {
     return blocks.get(blocks.size() - 1);
diff --git a/core/src/main/java/org/apache/calcite/adapter/enumerable/ReflectiveCallNotNullImplementor.java b/core/src/main/java/org/apache/calcite/adapter/enumerable/ReflectiveCallNotNullImplementor.java
index d031983..1a97467 100644
--- a/core/src/main/java/org/apache/calcite/adapter/enumerable/ReflectiveCallNotNullImplementor.java
+++ b/core/src/main/java/org/apache/calcite/adapter/enumerable/ReflectiveCallNotNullImplementor.java
@@ -36,8 +36,9 @@ public class ReflectiveCallNotNullImplementor implements NotNullImplementor {
   protected final Method method;
 
   /**
-   * Constructor of {@link ReflectiveCallNotNullImplementor}
-   * @param method method that is used to implement the call
+   * Constructor of {@link ReflectiveCallNotNullImplementor}.
+   *
+   * @param method Method that is used to implement the call
    */
   public ReflectiveCallNotNullImplementor(Method method) {
     this.method = method;
diff --git a/core/src/main/java/org/apache/calcite/adapter/enumerable/RexToLixTranslator.java b/core/src/main/java/org/apache/calcite/adapter/enumerable/RexToLixTranslator.java
index 0e183b3..74318ea 100644
--- a/core/src/main/java/org/apache/calcite/adapter/enumerable/RexToLixTranslator.java
+++ b/core/src/main/java/org/apache/calcite/adapter/enumerable/RexToLixTranslator.java
@@ -1097,7 +1097,7 @@ public class RexToLixTranslator implements RexVisitor<RexToLixTranslator.Result>
 
   /**
    * For {@code PREV} operator, the offset of {@code inputGetter}
-   * should be set first
+   * should be set first.
    */
   private Result implementPrev(RexCall call) {
     final RexNode node = call.getOperands().get(0);
diff --git a/core/src/main/java/org/apache/calcite/adapter/enumerable/impl/AggResetContextImpl.java b/core/src/main/java/org/apache/calcite/adapter/enumerable/impl/AggResetContextImpl.java
index 7578a68..51e6f61 100644
--- a/core/src/main/java/org/apache/calcite/adapter/enumerable/impl/AggResetContextImpl.java
+++ b/core/src/main/java/org/apache/calcite/adapter/enumerable/impl/AggResetContextImpl.java
@@ -26,7 +26,7 @@ import java.util.List;
 
 /**
  * Implementation of
- * {@link org.apache.calcite.adapter.enumerable.AggResetContext}
+ * {@link org.apache.calcite.adapter.enumerable.AggResetContext}.
  */
 public abstract class AggResetContextImpl extends NestedBlockBuilderImpl
     implements AggResetContext {
diff --git a/core/src/main/java/org/apache/calcite/adapter/enumerable/impl/AggResultContextImpl.java b/core/src/main/java/org/apache/calcite/adapter/enumerable/impl/AggResultContextImpl.java
index db97675..ecf03b7 100644
--- a/core/src/main/java/org/apache/calcite/adapter/enumerable/impl/AggResultContextImpl.java
+++ b/core/src/main/java/org/apache/calcite/adapter/enumerable/impl/AggResultContextImpl.java
@@ -27,7 +27,7 @@ import java.util.List;
 
 /**
  * Implementation of
- * {@link org.apache.calcite.adapter.enumerable.AggResultContext}
+ * {@link org.apache.calcite.adapter.enumerable.AggResultContext}.
  */
 public class AggResultContextImpl extends AggResetContextImpl
     implements AggResultContext {
diff --git a/core/src/main/java/org/apache/calcite/adapter/java/ReflectiveSchema.java b/core/src/main/java/org/apache/calcite/adapter/java/ReflectiveSchema.java
index 86d151b..c2f23c0 100644
--- a/core/src/main/java/org/apache/calcite/adapter/java/ReflectiveSchema.java
+++ b/core/src/main/java/org/apache/calcite/adapter/java/ReflectiveSchema.java
@@ -196,7 +196,7 @@ public class ReflectiveSchema
   }
 
   /** Deduces the element type of a collection;
-   * same logic as {@link #toEnumerable} */
+   * same logic as {@link #toEnumerable}. */
   private static Type getElementType(Class clazz) {
     if (clazz.isArray()) {
       return clazz.getComponentType();
diff --git a/core/src/main/java/org/apache/calcite/adapter/jdbc/JdbcImplementor.java b/core/src/main/java/org/apache/calcite/adapter/jdbc/JdbcImplementor.java
index f0df676..eeebc0b 100644
--- a/core/src/main/java/org/apache/calcite/adapter/jdbc/JdbcImplementor.java
+++ b/core/src/main/java/org/apache/calcite/adapter/jdbc/JdbcImplementor.java
@@ -33,6 +33,7 @@ public class JdbcImplementor extends RelToSqlConverter {
     Util.discard(typeFactory);
   }
 
+  // CHECKSTYLE: IGNORE 1
   /** @see #dispatch */
   public Result visit(JdbcTableScan scan) {
     return result(scan.jdbcTable.tableName(),
diff --git a/core/src/main/java/org/apache/calcite/adapter/jdbc/JdbcRules.java b/core/src/main/java/org/apache/calcite/adapter/jdbc/JdbcRules.java
index f7f8ce8..5a46990 100644
--- a/core/src/main/java/org/apache/calcite/adapter/jdbc/JdbcRules.java
+++ b/core/src/main/java/org/apache/calcite/adapter/jdbc/JdbcRules.java
@@ -1088,10 +1088,10 @@ public class JdbcRules {
     }
   }
 
-  /**
-   * Visitor for checking whether part of projection is a user defined function or not
-   */
-  private static class CheckingUserDefinedFunctionVisitor extends RexVisitorImpl<Void> {
+  /** Visitor that checks whether part of a projection is a user-defined
+   * function (UDF). */
+  private static class CheckingUserDefinedFunctionVisitor
+      extends RexVisitorImpl<Void> {
 
     private boolean containsUsedDefinedFunction = false;
 
diff --git a/core/src/main/java/org/apache/calcite/adapter/jdbc/JdbcSchema.java b/core/src/main/java/org/apache/calcite/adapter/jdbc/JdbcSchema.java
index 1011d13..90ce722 100644
--- a/core/src/main/java/org/apache/calcite/adapter/jdbc/JdbcSchema.java
+++ b/core/src/main/java/org/apache/calcite/adapter/jdbc/JdbcSchema.java
@@ -561,7 +561,7 @@ public class JdbcSchema implements Schema {
     }
   }
 
-  /** Do not use */
+  /** Do not use. */
   @Experimental
   public interface Foo
       extends BiFunction<String, String, Iterable<MetaImpl.MetaTable>> {
diff --git a/core/src/main/java/org/apache/calcite/config/CalciteConnectionConfig.java b/core/src/main/java/org/apache/calcite/config/CalciteConnectionConfig.java
index 60dfde4..73f8c90 100644
--- a/core/src/main/java/org/apache/calcite/config/CalciteConnectionConfig.java
+++ b/core/src/main/java/org/apache/calcite/config/CalciteConnectionConfig.java
@@ -29,59 +29,70 @@ import java.util.Properties;
  * classes for system and statement properties. */
 public interface CalciteConnectionConfig extends ConnectionConfig {
   /** Default configuration. */
-  CalciteConnectionConfigImpl DEFAULT = new CalciteConnectionConfigImpl(new Properties());
-  /** @see CalciteConnectionProperty#APPROXIMATE_DISTINCT_COUNT */
+  CalciteConnectionConfigImpl DEFAULT =
+      new CalciteConnectionConfigImpl(new Properties());
+  /** Returns the value of
+   * {@link CalciteConnectionProperty#APPROXIMATE_DISTINCT_COUNT}. */
   boolean approximateDistinctCount();
-  /** @see CalciteConnectionProperty#APPROXIMATE_TOP_N */
+  /** Returns the value of
+   * {@link CalciteConnectionProperty#APPROXIMATE_TOP_N}. */
   boolean approximateTopN();
-  /** @see CalciteConnectionProperty#APPROXIMATE_DECIMAL */
+  /** Returns the value of
+   * {@link CalciteConnectionProperty#APPROXIMATE_DECIMAL}. */
   boolean approximateDecimal();
-  /** @see CalciteConnectionProperty#NULL_EQUAL_TO_EMPTY */
+  /** Returns the value of
+   * {@link CalciteConnectionProperty#NULL_EQUAL_TO_EMPTY}. */
   boolean nullEqualToEmpty();
-  /** @see CalciteConnectionProperty#AUTO_TEMP */
+  /** Returns the value of
+   * {@link CalciteConnectionProperty#AUTO_TEMP}. */
   boolean autoTemp();
-  /** @see CalciteConnectionProperty#MATERIALIZATIONS_ENABLED */
+  /** Returns the value of
+   * {@link CalciteConnectionProperty#MATERIALIZATIONS_ENABLED}. */
   boolean materializationsEnabled();
-  /** @see CalciteConnectionProperty#CREATE_MATERIALIZATIONS */
+  /** Returns the value of
+   * {@link CalciteConnectionProperty#CREATE_MATERIALIZATIONS}. */
   boolean createMaterializations();
-  /** @see CalciteConnectionProperty#DEFAULT_NULL_COLLATION */
+  /** Returns the value of
+   * {@link CalciteConnectionProperty#DEFAULT_NULL_COLLATION}. */
   NullCollation defaultNullCollation();
-  /** @see CalciteConnectionProperty#FUN */
+  /** Returns the value of {@link CalciteConnectionProperty#FUN}. */
   <T> T fun(Class<T> operatorTableClass, T defaultOperatorTable);
-  /** @see CalciteConnectionProperty#MODEL */
+  /** Returns the value of {@link CalciteConnectionProperty#MODEL}. */
   String model();
-  /** @see CalciteConnectionProperty#LEX */
+  /** Returns the value of {@link CalciteConnectionProperty#LEX}. */
   Lex lex();
-  /** @see CalciteConnectionProperty#QUOTING */
+  /** Returns the value of {@link CalciteConnectionProperty#QUOTING}. */
   Quoting quoting();
-  /** @see CalciteConnectionProperty#UNQUOTED_CASING */
+  /** Returns the value of {@link CalciteConnectionProperty#UNQUOTED_CASING}. */
   Casing unquotedCasing();
-  /** @see CalciteConnectionProperty#QUOTED_CASING */
+  /** Returns the value of {@link CalciteConnectionProperty#QUOTED_CASING}. */
   Casing quotedCasing();
-  /** @see CalciteConnectionProperty#CASE_SENSITIVE */
+  /** Returns the value of {@link CalciteConnectionProperty#CASE_SENSITIVE}. */
   boolean caseSensitive();
-  /** @see CalciteConnectionProperty#PARSER_FACTORY */
+  /** Returns the value of {@link CalciteConnectionProperty#PARSER_FACTORY}. */
   <T> T parserFactory(Class<T> parserFactoryClass, T defaultParserFactory);
-  /** @see CalciteConnectionProperty#SCHEMA_FACTORY */
+  /** Returns the value of {@link CalciteConnectionProperty#SCHEMA_FACTORY}. */
   <T> T schemaFactory(Class<T> schemaFactoryClass, T defaultSchemaFactory);
-  /** @see CalciteConnectionProperty#SCHEMA_TYPE */
+  /** Returns the value of {@link CalciteConnectionProperty#SCHEMA_TYPE}. */
   JsonSchema.Type schemaType();
-  /** @see CalciteConnectionProperty#SPARK */
+  /** Returns the value of {@link CalciteConnectionProperty#SPARK}. */
   boolean spark();
-  /** @see CalciteConnectionProperty#FORCE_DECORRELATE */
+  /** Returns the value of
+   * {@link CalciteConnectionProperty#FORCE_DECORRELATE}. */
   boolean forceDecorrelate();
-  /** @see CalciteConnectionProperty#TYPE_SYSTEM */
+  /** Returns the value of {@link CalciteConnectionProperty#TYPE_SYSTEM}. */
   <T> T typeSystem(Class<T> typeSystemClass, T defaultTypeSystem);
-  /** @see CalciteConnectionProperty#CONFORMANCE */
+  /** Returns the value of {@link CalciteConnectionProperty#CONFORMANCE}. */
   SqlConformance conformance();
-  /** @see CalciteConnectionProperty#TIME_ZONE */
+  /** Returns the value of {@link CalciteConnectionProperty#TIME_ZONE}. */
   @Override String timeZone();
-  /** @see CalciteConnectionProperty#LOCALE */
+  /** Returns the value of {@link CalciteConnectionProperty#LOCALE}. */
   String locale();
-  /** @see CalciteConnectionProperty#TYPE_COERCION */
+  /** Returns the value of {@link CalciteConnectionProperty#TYPE_COERCION}. */
   boolean typeCoercion();
-  /** @see CalciteConnectionProperty#LENIENT_OPERATOR_LOOKUP */
+  /** Returns the value of
+   * {@link CalciteConnectionProperty#LENIENT_OPERATOR_LOOKUP}. */
   boolean lenientOperatorLookup();
-  /** @see CalciteConnectionProperty#TOPDOWN_OPT */
+  /** Returns the value of {@link CalciteConnectionProperty#TOPDOWN_OPT}. */
   boolean topDownOpt();
 }
diff --git a/core/src/main/java/org/apache/calcite/config/CalciteSystemProperty.java b/core/src/main/java/org/apache/calcite/config/CalciteSystemProperty.java
index d15952b..48be219 100644
--- a/core/src/main/java/org/apache/calcite/config/CalciteSystemProperty.java
+++ b/core/src/main/java/org/apache/calcite/config/CalciteSystemProperty.java
@@ -357,8 +357,9 @@ public final class CalciteSystemProperty<T> {
   }
 
   /**
-   * Returns the value of the system property with the specified name as int, or
-   * the <code>defaultValue</code> if any of the conditions below hold:
+   * Returns the value of the system property with the specified name as {@code
+   * int}. If any of the conditions below hold, returns the
+   * <code>defaultValue</code>:
    *
    * <ol>
    * <li>the property is not defined;
diff --git a/core/src/main/java/org/apache/calcite/interpreter/Bindables.java b/core/src/main/java/org/apache/calcite/interpreter/Bindables.java
index 7d9adac..d75de31 100644
--- a/core/src/main/java/org/apache/calcite/interpreter/Bindables.java
+++ b/core/src/main/java/org/apache/calcite/interpreter/Bindables.java
@@ -109,6 +109,7 @@ public class Bindables {
   public static final RelOptRule BINDABLE_SET_OP_RULE =
       BindableSetOpRule.DEFAULT_CONFIG.toRule(BindableSetOpRule.class);
 
+  // CHECKSTYLE: IGNORE 1
   /** @deprecated Use {@link #BINDABLE_SET_OP_RULE}. */
   public static final RelOptRule BINDABLE_SETOP_RULE =
       BINDABLE_SET_OP_RULE;
diff --git a/core/src/main/java/org/apache/calcite/interpreter/Row.java b/core/src/main/java/org/apache/calcite/interpreter/Row.java
index 1a16f81..365d5f7 100644
--- a/core/src/main/java/org/apache/calcite/interpreter/Row.java
+++ b/core/src/main/java/org/apache/calcite/interpreter/Row.java
@@ -113,7 +113,8 @@ public class Row {
     }
 
     /**
-     * Set the value of a particular column.
+     * Sets the value of a particular column.
+     *
      * @param index Zero-indexed position of value.
      * @param value Desired column value.
      */
@@ -121,7 +122,7 @@ public class Row {
       values[index] = value;
     }
 
-    /** Return a Row object **/
+    /** Returns a Row. */
     public Row build() {
       return new Row(values);
     }
diff --git a/core/src/main/java/org/apache/calcite/model/ModelHandler.java b/core/src/main/java/org/apache/calcite/model/ModelHandler.java
index 2aba4aa..edc367c 100644
--- a/core/src/main/java/org/apache/calcite/model/ModelHandler.java
+++ b/core/src/main/java/org/apache/calcite/model/ModelHandler.java
@@ -100,6 +100,7 @@ public class ModelHandler {
     visit(root);
   }
 
+  // CHECKSTYLE: IGNORE 1
   /** @deprecated Use {@link #addFunctions}. */
   @Deprecated
   public static void create(SchemaPlus schema, String functionName,
diff --git a/core/src/main/java/org/apache/calcite/plan/AbstractRelOptPlanner.java b/core/src/main/java/org/apache/calcite/plan/AbstractRelOptPlanner.java
index 08731a8..b842842 100644
--- a/core/src/main/java/org/apache/calcite/plan/AbstractRelOptPlanner.java
+++ b/core/src/main/java/org/apache/calcite/plan/AbstractRelOptPlanner.java
@@ -169,7 +169,7 @@ public abstract class AbstractRelOptPlanner implements RelOptPlanner {
   }
 
   /**
-   * Returns the rule with a given description
+   * Returns the rule with a given description.
    *
    * @param description Description
    * @return Rule with given description, or null if not found
@@ -411,12 +411,11 @@ public abstract class AbstractRelOptPlanner implements RelOptPlanner {
   }
 
   /**
-   * Takes care of tracing and listener notification when a rel is discarded
+   * Takes care of tracing and listener notification when a rel is discarded.
    *
-   * @param rel discarded rel
+   * @param rel Discarded rel
    */
-  protected void notifyDiscard(
-      RelNode rel) {
+  protected void notifyDiscard(RelNode rel) {
     if (listener != null) {
       RelOptListener.RelDiscardedEvent event =
           new RelOptListener.RelDiscardedEvent(
diff --git a/core/src/main/java/org/apache/calcite/plan/Convention.java b/core/src/main/java/org/apache/calcite/plan/Convention.java
index ac30507..61cf9f1 100644
--- a/core/src/main/java/org/apache/calcite/plan/Convention.java
+++ b/core/src/main/java/org/apache/calcite/plan/Convention.java
@@ -82,9 +82,8 @@ public interface Convention extends RelTrait {
     return false;
   }
 
-  /**
-   * Return RelFactories struct for the convention which can be used to build RelNode
-   */
+  /** Return RelFactories struct for this convention. It can can be used to
+   * build RelNode. */
   default RelFactories.Struct getRelFactories() {
     return RelFactories.DEFAULT_STRUCT;
   }
diff --git a/core/src/main/java/org/apache/calcite/plan/RelOptCluster.java b/core/src/main/java/org/apache/calcite/plan/RelOptCluster.java
index 43379b3..3ce33f3 100644
--- a/core/src/main/java/org/apache/calcite/plan/RelOptCluster.java
+++ b/core/src/main/java/org/apache/calcite/plan/RelOptCluster.java
@@ -235,6 +235,7 @@ public class RelOptCluster {
     return emptyTraitSet;
   }
 
+  // CHECKSTYLE: IGNORE 2
   /** @deprecated For {@code traitSetOf(t1, t2)},
    * use {@link #traitSet}().replace(t1).replace(t2). */
   @Deprecated // to be removed before 2.0
diff --git a/core/src/main/java/org/apache/calcite/plan/RelOptCost.java b/core/src/main/java/org/apache/calcite/plan/RelOptCost.java
index aae811d..331d2ab 100644
--- a/core/src/main/java/org/apache/calcite/plan/RelOptCost.java
+++ b/core/src/main/java/org/apache/calcite/plan/RelOptCost.java
@@ -29,29 +29,21 @@ package org.apache.calcite.plan;
 public interface RelOptCost {
   //~ Methods ----------------------------------------------------------------
 
-  /**
-   * @return number of rows processed; this should not be confused with the
-   * row count produced by a relational expression
-   * ({@link org.apache.calcite.rel.RelNode#estimateRowCount})
-   */
+  /** Returns the number of rows processed; this should not be
+   * confused with the row count produced by a relational expression
+   * ({@link org.apache.calcite.rel.RelNode#estimateRowCount}). */
   double getRows();
 
-  /**
-   * @return usage of CPU resources
-   */
+  /** Returns usage of CPU resources. */
   double getCpu();
 
-  /**
-   * @return usage of I/O resources
-   */
+  /** Returns usage of I/O resources. */
   double getIo();
 
-  /**
-   * @return true iff this cost represents an expression that hasn't actually
+  /** Returns whether this cost represents an expression that hasn't actually
    * been implemented (e.g. a pure relational algebra expression) or can't
    * actually be implemented, e.g. a transfer of data between two disconnected
-   * sites
-   */
+   * sites. */
   boolean isInfinite();
 
   // REVIEW jvs 3-Apr-2006:  we should standardize this
diff --git a/core/src/main/java/org/apache/calcite/plan/RelOptPlanner.java b/core/src/main/java/org/apache/calcite/plan/RelOptPlanner.java
index e2117b5..2114f73 100644
--- a/core/src/main/java/org/apache/calcite/plan/RelOptPlanner.java
+++ b/core/src/main/java/org/apache/calcite/plan/RelOptPlanner.java
@@ -212,10 +212,9 @@ public interface RelOptPlanner {
    */
   RelOptCost getCost(RelNode rel, RelMetadataQuery mq);
 
-  /**
-   * @deprecated Use {@link #getCost(RelNode, RelMetadataQuery)}
-   * or, better, call {@link RelMetadataQuery#getCumulativeCost(RelNode)}.
-   */
+  // CHECKSTYLE: IGNORE 2
+  /** @deprecated Use {@link #getCost(RelNode, RelMetadataQuery)}
+   * or, better, call {@link RelMetadataQuery#getCumulativeCost(RelNode)}. */
   @Deprecated // to be removed before 2.0
   RelOptCost getCost(RelNode rel);
 
@@ -334,6 +333,7 @@ public interface RelOptPlanner {
   /** Called when a relational expression is copied to a similar expression. */
   void onCopy(RelNode rel, RelNode newRel);
 
+  // CHECKSTYLE: IGNORE 1
   /** @deprecated Use {@link RexExecutor} */
   @Deprecated // to be removed before 2.0
   interface Executor extends RexExecutor {
diff --git a/core/src/main/java/org/apache/calcite/plan/RelOptRule.java b/core/src/main/java/org/apache/calcite/plan/RelOptRule.java
index 6eea4b8..cfd478b 100644
--- a/core/src/main/java/org/apache/calcite/plan/RelOptRule.java
+++ b/core/src/main/java/org/apache/calcite/plan/RelOptRule.java
@@ -178,6 +178,7 @@ public abstract class RelOptRule {
         operandList.operands);
   }
 
+  // CHECKSTYLE: IGNORE 1
   /** @deprecated Use {@link #operandJ} */
   @SuppressWarnings("Guava")
   @Deprecated // to be removed before 2.0
@@ -269,6 +270,7 @@ public abstract class RelOptRule {
     return new ConverterRelOptRuleOperand(clazz, trait, predicate);
   }
 
+  // CHECKSTYLE: IGNORE 1
   /** @deprecated Use {@link #convertOperand(Class, Predicate, RelTrait)}. */
   @SuppressWarnings("Guava")
   @Deprecated // to be removed before 2.0
@@ -435,7 +437,7 @@ public abstract class RelOptRule {
   }
 
   /**
-   * Returns the root operand of this rule
+   * Returns the root operand of this rule.
    *
    * @return the root operand of this rule
    */
diff --git a/core/src/main/java/org/apache/calcite/plan/RelOptRuleCall.java b/core/src/main/java/org/apache/calcite/plan/RelOptRuleCall.java
index fd5f50f..c0dfdfa 100644
--- a/core/src/main/java/org/apache/calcite/plan/RelOptRuleCall.java
+++ b/core/src/main/java/org/apache/calcite/plan/RelOptRuleCall.java
@@ -219,7 +219,7 @@ public abstract class RelOptRuleCall {
   }
 
   /**
-   * @return list of parents of the first relational expression
+   * Returns a list of parents of the first relational expression.
    */
   public List<RelNode> getParents() {
     return parents;
diff --git a/core/src/main/java/org/apache/calcite/plan/RelOptRuleOperand.java b/core/src/main/java/org/apache/calcite/plan/RelOptRuleOperand.java
index 913db6f..75dfc51 100644
--- a/core/src/main/java/org/apache/calcite/plan/RelOptRuleOperand.java
+++ b/core/src/main/java/org/apache/calcite/plan/RelOptRuleOperand.java
@@ -158,7 +158,7 @@ public class RelOptRuleOperand {
   }
 
   /**
-   * Sets the rule this operand belongs to
+   * Sets the rule this operand belongs to.
    *
    * @param rule containing rule
    */
@@ -249,7 +249,7 @@ public class RelOptRuleOperand {
   }
 
   /**
-   * @return relational expression class matched by this operand
+   * Returns relational expression class matched by this operand.
    */
   public Class<? extends RelNode> getMatchedClass() {
     return clazz;
diff --git a/core/src/main/java/org/apache/calcite/plan/RelOptRules.java b/core/src/main/java/org/apache/calcite/plan/RelOptRules.java
index 74b34a6..5e33487 100644
--- a/core/src/main/java/org/apache/calcite/plan/RelOptRules.java
+++ b/core/src/main/java/org/apache/calcite/plan/RelOptRules.java
@@ -44,9 +44,8 @@ public class RelOptRules {
   private RelOptRules() {
   }
 
-  /**
-   * The calc rule set is public for use from {@link org.apache.calcite.tools.Programs}
-   */
+  /** Calc rule set; public so that {@link org.apache.calcite.tools.Programs} can
+   * use it. */
   public static final ImmutableList<RelOptRule> CALC_RULES =
       ImmutableList.of(
           Bindables.FROM_NONE_RULE,
diff --git a/core/src/main/java/org/apache/calcite/plan/RelOptTable.java b/core/src/main/java/org/apache/calcite/plan/RelOptTable.java
index 521765b..e80bf40 100644
--- a/core/src/main/java/org/apache/calcite/plan/RelOptTable.java
+++ b/core/src/main/java/org/apache/calcite/plan/RelOptTable.java
@@ -102,7 +102,7 @@ public interface RelOptTable extends Wrapper {
 
   /**
    * Returns a list of unique keys, empty list if no key exist,
-   * the result should be consistent with {@code isKey}
+   * the result should be consistent with {@code isKey}.
    */
   List<ImmutableBitSet> getKeys();
 
diff --git a/core/src/main/java/org/apache/calcite/plan/RelOptUtil.java b/core/src/main/java/org/apache/calcite/plan/RelOptUtil.java
index 13958ef..8e30ee5 100644
--- a/core/src/main/java/org/apache/calcite/plan/RelOptUtil.java
+++ b/core/src/main/java/org/apache/calcite/plan/RelOptUtil.java
@@ -188,14 +188,14 @@ public abstract class RelOptUtil {
   }
 
   /**
-   * Returns a set of tables used by this expression or its children
+   * Returns a set of tables used by this expression or its children.
    */
   public static Set<RelOptTable> findTables(RelNode rel) {
     return new LinkedHashSet<>(findAllTables(rel));
   }
 
   /**
-   * Returns a list of all tables used by this expression or its children
+   * Returns a list of all tables used by this expression or its children.
    */
   public static List<RelOptTable> findAllTables(RelNode rel) {
     final Multimap<Class<? extends RelNode>, RelNode> nodes =
@@ -929,6 +929,7 @@ public abstract class RelOptUtil {
         null, aggCalls);
   }
 
+  // CHECKSTYLE: IGNORE 1
   /** @deprecated Use {@link RelBuilder#distinct()}. */
   @Deprecated // to be removed before 2.0
   public static RelNode createDistinctRel(RelNode rel) {
@@ -2831,7 +2832,7 @@ public abstract class RelOptUtil {
 
   /**
    * Splits a filter into two lists, depending on whether or not the filter
-   * only references its child input
+   * only references its child input.
    *
    * @param childBitmap Fields in the child
    * @param predicate   filters that will be split
@@ -3235,6 +3236,7 @@ public abstract class RelOptUtil {
         .build();
   }
 
+  // CHECKSTYLE: IGNORE 1
   /** @deprecated Use
    * {@link RelBuilder#projectNamed(Iterable, Iterable, boolean)} */
   @Deprecated // to be removed before 2.0
@@ -4074,12 +4076,11 @@ public abstract class RelOptUtil {
    *
    * <ul>
    *   <li>Project: remove the hints that have non-empty inherit path
-   *   (which means the hint was not originally declared from it); </li>
-   *   <li>Aggregate: remove the hints that have non-empty inherit path;</>
-   *   <li>Join: remove all the hints;</li>
-   *   <li>TableScan: remove the hints that have non-empty inherit path.</li>
+   *   (which means the hint was not originally declared from it);
+   *   <li>Aggregate: remove the hints that have non-empty inherit path;
+   *   <li>Join: remove all the hints;
+   *   <li>TableScan: remove the hints that have non-empty inherit path.
    * </ul>
-   *
    */
   private static class ResetHintsShuttle extends RelHomogeneousShuttle {
     public RelNode visit(RelNode node) {
@@ -4310,6 +4311,8 @@ public abstract class RelOptUtil {
     private final int[] adjustments;
 
     /**
+     * Creates a RexInputConverter.
+     *
      * @param rexBuilder      builder for creating new RexInputRefs
      * @param srcFields       fields where the RexInputRefs originated
      *                        from; if null, a new RexInputRef is always
@@ -4455,7 +4458,7 @@ public abstract class RelOptUtil {
   }
 
   /** Result of calling
-   * {@link org.apache.calcite.plan.RelOptUtil#createExistsPlan} */
+   * {@link org.apache.calcite.plan.RelOptUtil#createExistsPlan}. */
   public static class Exists {
     public final RelNode r;
     public final boolean indicator;
diff --git a/core/src/main/java/org/apache/calcite/plan/RelTraitDef.java b/core/src/main/java/org/apache/calcite/plan/RelTraitDef.java
index 0bba404..c9d99e1 100644
--- a/core/src/main/java/org/apache/calcite/plan/RelTraitDef.java
+++ b/core/src/main/java/org/apache/calcite/plan/RelTraitDef.java
@@ -76,15 +76,11 @@ public abstract class RelTraitDef<T extends RelTrait> {
     return false;
   }
 
-  /**
-   * @return the specific RelTrait type associated with this RelTraitDef.
-   */
+  /** Returns the specific RelTrait type associated with this RelTraitDef. */
   public abstract Class<T> getTraitClass();
 
-  /**
-   * @return a simple name for this RelTraitDef (for use in
-   * {@link org.apache.calcite.rel.RelNode#explain}).
-   */
+  /** Returns a simple name for this RelTraitDef (for use in
+   * {@link org.apache.calcite.rel.RelNode#explain}). */
   public abstract String getSimpleName();
 
   /**
diff --git a/core/src/main/java/org/apache/calcite/plan/RelTraitSet.java b/core/src/main/java/org/apache/calcite/plan/RelTraitSet.java
index 3902b58..e6737dc 100644
--- a/core/src/main/java/org/apache/calcite/plan/RelTraitSet.java
+++ b/core/src/main/java/org/apache/calcite/plan/RelTraitSet.java
@@ -42,7 +42,7 @@ public final class RelTraitSet extends AbstractList<RelTrait> {
   private final Cache cache;
   private final RelTrait[] traits;
   private String string;
-  /** Cache the hash code for the traits */
+  /** Caches the hash code for the traits. */
   private int hash; // Default to 0
 
   //~ Constructors -----------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/plan/TableAccessMap.java b/core/src/main/java/org/apache/calcite/plan/TableAccessMap.java
index 30ca6db..b5810a2 100644
--- a/core/src/main/java/org/apache/calcite/plan/TableAccessMap.java
+++ b/core/src/main/java/org/apache/calcite/plan/TableAccessMap.java
@@ -91,7 +91,7 @@ public class TableAccessMap {
   }
 
   /**
-   * Constructs a TableAccessMap for a single table
+   * Constructs a TableAccessMap for a single table.
    *
    * @param table fully qualified name of the table, represented as a list
    * @param mode  access mode for the table
@@ -104,7 +104,7 @@ public class TableAccessMap {
   //~ Methods ----------------------------------------------------------------
 
   /**
-   * @return set of qualified names for all tables accessed
+   * Returns a set of qualified names for all tables accessed.
    */
   public Set<List<String>> getTablesAccessed() {
     return accessMap.keySet();
diff --git a/core/src/main/java/org/apache/calcite/plan/VisitorDataContext.java b/core/src/main/java/org/apache/calcite/plan/VisitorDataContext.java
index 675ce3a..eae7e27 100644
--- a/core/src/main/java/org/apache/calcite/plan/VisitorDataContext.java
+++ b/core/src/main/java/org/apache/calcite/plan/VisitorDataContext.java
@@ -38,7 +38,7 @@ import java.math.BigDecimal;
 import java.util.List;
 
 /**
- * DataContext for evaluating an RexExpression
+ * DataContext for evaluating a RexExpression.
  */
 public class VisitorDataContext implements DataContext {
   private static final CalciteLogger LOGGER =
diff --git a/core/src/main/java/org/apache/calcite/plan/hep/HepRelVertex.java b/core/src/main/java/org/apache/calcite/plan/hep/HepRelVertex.java
index ae613f4..add516a 100644
--- a/core/src/main/java/org/apache/calcite/plan/hep/HepRelVertex.java
+++ b/core/src/main/java/org/apache/calcite/plan/hep/HepRelVertex.java
@@ -85,7 +85,7 @@ public class HepRelVertex extends AbstractRelNode {
   }
 
   /**
-   * @return current implementation chosen for this vertex
+   * Returns current implementation chosen for this vertex.
    */
   public RelNode getCurrentRel() {
     return currentRel;
diff --git a/core/src/main/java/org/apache/calcite/plan/volcano/IterativeRuleQueue.java b/core/src/main/java/org/apache/calcite/plan/volcano/IterativeRuleQueue.java
index fed36ca..62394cc 100644
--- a/core/src/main/java/org/apache/calcite/plan/volcano/IterativeRuleQueue.java
+++ b/core/src/main/java/org/apache/calcite/plan/volcano/IterativeRuleQueue.java
@@ -170,7 +170,7 @@ class IterativeRuleQueue extends RuleQueue {
   private static class MatchList {
 
     /**
-     * Rule match queue for SubstitutionRule
+     * Rule match queue for SubstitutionRule.
      */
     private final Queue<VolcanoRuleMatch> preQueue = new LinkedList<>();
 
diff --git a/core/src/main/java/org/apache/calcite/plan/volcano/RelSet.java b/core/src/main/java/org/apache/calcite/plan/volcano/RelSet.java
index bf4fe5d..09cf0e9 100644
--- a/core/src/main/java/org/apache/calcite/plan/volcano/RelSet.java
+++ b/core/src/main/java/org/apache/calcite/plan/volcano/RelSet.java
@@ -124,7 +124,7 @@ class RelSet {
   }
 
   /**
-   * Returns the child Relset for current set
+   * Returns the child RelSet for the current set.
    */
   public Set<RelSet> getChildSets(VolcanoPlanner planner) {
     Set<RelSet> childSets = new HashSet<>();
@@ -143,8 +143,8 @@ class RelSet {
   }
 
   /**
-   * @return all of the {@link RelNode}s contained by any subset of this set
-   * (does not include the subset objects themselves)
+   * Returns all of the {@link RelNode}s contained by any subset of this set
+   * (does not include the subset objects themselves).
    */
   public List<RelNode> getRelsFromAllSubsets() {
     return rels;
diff --git a/core/src/main/java/org/apache/calcite/plan/volcano/RelSubset.java b/core/src/main/java/org/apache/calcite/plan/volcano/RelSubset.java
index f2b9d7a..dccb950 100644
--- a/core/src/main/java/org/apache/calcite/plan/volcano/RelSubset.java
+++ b/core/src/main/java/org/apache/calcite/plan/volcano/RelSubset.java
@@ -84,37 +84,30 @@ public class RelSubset extends AbstractRelNode {
 
   //~ Instance fields --------------------------------------------------------
 
-  /**
-   * Optimization task state
-   */
+  /** Optimization task state. */
   OptimizeState taskState;
 
-  /**
-   * cost of best known plan (it may have improved since)
-   */
+  /** Cost of best known plan (it may have improved since). */
   RelOptCost bestCost;
 
-  /**
-   * The set this subset belongs to.
-   */
+  /** The set this subset belongs to. */
   final RelSet set;
 
-  /**
-   * best known plan
-   */
+  /** Best known plan. */
   RelNode best;
 
-  /**
-   * Timestamp for metadata validity
-   */
+  /** Timestamp for metadata validity. */
   long timestamp;
 
   /**
-   * Physical property state of current subset
-   * 0: logical operators, NONE convention is neither DELIVERED nor REQUIRED
-   * 1: traitSet DELIVERED from child operators or itself
-   * 2: traitSet REQUIRED from parent operators
-   * 3: both DELIVERED and REQUIRED
+   * Physical property state of current subset. Values:
+   *
+   * <ul>
+   * <li>0: logical operators, NONE convention is neither DELIVERED nor REQUIRED
+   * <li>1: traitSet DELIVERED from child operators or itself
+   * <li>2: traitSet REQUIRED from parent operators
+   * <li>3: both DELIVERED and REQUIRED
+   * </ul>
    */
   private int state = 0;
 
@@ -781,6 +774,7 @@ public class RelSubset extends AbstractRelNode {
     }
   }
 
+  /** State of optimizer. */
   enum OptimizeState {
     OPTIMIZING,
     COMPLETED
diff --git a/core/src/main/java/org/apache/calcite/plan/volcano/TopDownRuleDriver.java b/core/src/main/java/org/apache/calcite/plan/volcano/TopDownRuleDriver.java
index f67f133..d41c624 100644
--- a/core/src/main/java/org/apache/calcite/plan/volcano/TopDownRuleDriver.java
+++ b/core/src/main/java/org/apache/calcite/plan/volcano/TopDownRuleDriver.java
@@ -130,6 +130,7 @@ class TopDownRuleDriver implements RuleDriver {
     applying = null;
   }
 
+  /** Procedure. */
   private interface Procedure {
     void exec();
   }
@@ -280,6 +281,7 @@ class TopDownRuleDriver implements RuleDriver {
     }
   }
 
+  /** Task for generator. */
   private interface GeneratorTask extends Task {
     RelSubset group();
     boolean exploring();
@@ -435,7 +437,7 @@ class TopDownRuleDriver implements RuleDriver {
   }
 
   /**
-   * Explore an input for a RelNode
+   * Explore an input for a RelNode.
    */
   private class ExploreInput implements Task {
     private final RelSubset group;
@@ -496,7 +498,7 @@ class TopDownRuleDriver implements RuleDriver {
   }
 
   /**
-   * Apply a rule match
+   * Apply a rule match.
    */
   private class ApplyRule implements GeneratorTask {
     private final VolcanoRuleMatch match;
diff --git a/core/src/main/java/org/apache/calcite/plan/volcano/VolcanoPlanner.java b/core/src/main/java/org/apache/calcite/plan/volcano/VolcanoPlanner.java
index 6014c79..fa26892 100644
--- a/core/src/main/java/org/apache/calcite/plan/volcano/VolcanoPlanner.java
+++ b/core/src/main/java/org/apache/calcite/plan/volcano/VolcanoPlanner.java
@@ -945,7 +945,7 @@ public class VolcanoPlanner extends AbstractRelOptPlanner {
   }
 
   /**
-   * Find the new root subset in case the root is merged with another subset
+   * Find the new root subset in case the root is merged with another subset.
    */
   void canonize() {
     root = canonize(root);
diff --git a/core/src/main/java/org/apache/calcite/prepare/PlannerImpl.java b/core/src/main/java/org/apache/calcite/prepare/PlannerImpl.java
index c9c1d7e..ba3426a 100644
--- a/core/src/main/java/org/apache/calcite/prepare/PlannerImpl.java
+++ b/core/src/main/java/org/apache/calcite/prepare/PlannerImpl.java
@@ -118,7 +118,7 @@ public class PlannerImpl implements Planner, ViewExpander {
     reset();
   }
 
-  /** Gets a user defined config and appends default connection values */
+  /** Gets a user-defined config and appends default connection values. */
   private CalciteConnectionConfig connConfig() {
     CalciteConnectionConfigImpl config = Util.first(
         context.unwrap(CalciteConnectionConfigImpl.class),
@@ -256,9 +256,10 @@ public class PlannerImpl implements Planner, ViewExpander {
     return root;
   }
 
+  // CHECKSTYLE: IGNORE 2
   /** @deprecated Now {@link PlannerImpl} implements {@link ViewExpander}
    * directly. */
-  @Deprecated
+  @Deprecated // to be removed before 2.0
   public class ViewExpanderImpl implements ViewExpander {
     ViewExpanderImpl() {
     }
diff --git a/core/src/main/java/org/apache/calcite/rel/AbstractRelNode.java b/core/src/main/java/org/apache/calcite/rel/AbstractRelNode.java
index 9f104a1..206503d 100644
--- a/core/src/main/java/org/apache/calcite/rel/AbstractRelNode.java
+++ b/core/src/main/java/org/apache/calcite/rel/AbstractRelNode.java
@@ -76,14 +76,10 @@ public abstract class AbstractRelNode implements RelNode {
 
   private final RelOptCluster cluster;
 
-  /**
-   * unique id of this object -- for debugging
-   */
+  /** Unique id of this object, for debugging. */
   protected final int id;
 
-  /**
-   * The RelTraitSet that describes the traits of this RelNode.
-   */
+  /** RelTraitSet that describes the traits of this RelNode. */
   protected RelTraitSet traitSet;
 
   //~ Constructors -----------------------------------------------------------
@@ -296,12 +292,11 @@ public abstract class AbstractRelNode implements RelNode {
     throw new UnsupportedOperationException("replaceInput called on " + this);
   }
 
-  /** Description, consists of id plus digest */
+  /** Description; consists of id plus digest. */
   public String toString() {
     return "rel#" + id + ':' + getDigest();
   }
 
-  /** Description, consists of id plus digest */
   @Deprecated // to be removed before 2.0
   public final String getDescription() {
     return this.toString();
@@ -419,10 +414,9 @@ public abstract class AbstractRelNode implements RelNode {
     return rdw.attrs;
   }
 
+  /** Implementation of {@link RelDigest}. */
   private class InnerRelDigest implements RelDigest {
-    /**
-     * Cache of hash code.
-     */
+    /** Cached hash code. */
     private int hash = 0;
 
     @Override public RelNode getRel() {
diff --git a/core/src/main/java/org/apache/calcite/rel/RelNode.java b/core/src/main/java/org/apache/calcite/rel/RelNode.java
index 3a25bde..54aae1f 100644
--- a/core/src/main/java/org/apache/calcite/rel/RelNode.java
+++ b/core/src/main/java/org/apache/calcite/rel/RelNode.java
@@ -233,19 +233,23 @@ public interface RelNode extends RelOptNode, Cloneable {
   RelNode onRegister(RelOptPlanner planner);
 
   /**
-   * Returns digest string of this {@code RelNode}. It will create new digest
-   * string on each call, so don't forget to cache the result if necessary.
+   * Returns a digest string of this {@code RelNode}.
+   *
+   * <p>Each call creates a new digest string,
+   * so don't forget to cache the result if necessary.
    *
    * @return Digest string of this {@code RelNode}
+   *
+   * @see #getRelDigest()
    */
   default String getDigest() {
     return getRelDigest().toString();
   }
 
   /**
-   * Digest of the {@code RelNode}, for planner internal use only.
+   * Returns a digest of this {@code RelNode}.
    *
-   * <p>INTERNAL USE ONLY.</p>
+   * <p>INTERNAL USE ONLY. For use by the planner.
    *
    * @return Digest of this {@code RelNode}
    * @see #getDigest()
@@ -254,7 +258,9 @@ public interface RelNode extends RelOptNode, Cloneable {
   RelDigest getRelDigest();
 
   /**
-   * Recomputes the digest. For planner internal use only.
+   * Recomputes the digest.
+   *
+   * <p>INTERNAL USE ONLY. For use by the planner.
    *
    * @see #getDigest()
    */
diff --git a/core/src/main/java/org/apache/calcite/rel/RelWriter.java b/core/src/main/java/org/apache/calcite/rel/RelWriter.java
index 92f78b6..f6be869 100644
--- a/core/src/main/java/org/apache/calcite/rel/RelWriter.java
+++ b/core/src/main/java/org/apache/calcite/rel/RelWriter.java
@@ -42,9 +42,7 @@ public interface RelWriter {
    */
   void explain(RelNode rel, List<Pair<String, Object>> valueList);
 
-  /**
-   * @return detail level at which plan should be generated
-   */
+  /** Returns detail level at which plan should be generated. */
   SqlExplainLevel getDetailLevel();
 
   /**
diff --git a/core/src/main/java/org/apache/calcite/rel/convert/Converter.java b/core/src/main/java/org/apache/calcite/rel/convert/Converter.java
index 13cc3c0..2639f21 100644
--- a/core/src/main/java/org/apache/calcite/rel/convert/Converter.java
+++ b/core/src/main/java/org/apache/calcite/rel/convert/Converter.java
@@ -67,7 +67,7 @@ public interface Converter extends RelNode {
   RelTraitDef getTraitDef();
 
   /**
-   * Returns the sole input relational expression
+   * Returns the sole input relational expression.
    *
    * @return child relational expression
    */
diff --git a/core/src/main/java/org/apache/calcite/rel/core/Aggregate.java b/core/src/main/java/org/apache/calcite/rel/core/Aggregate.java
index 82de9fc..e8a4b73 100644
--- a/core/src/main/java/org/apache/calcite/rel/core/Aggregate.java
+++ b/core/src/main/java/org/apache/calcite/rel/core/Aggregate.java
@@ -481,7 +481,7 @@ public abstract class Aggregate extends SingleRel implements Hintable {
     return Group.induce(groupSet, groupSets);
   }
 
-  /** What kind of roll-up is it? */
+  /** Describes the kind of roll-up. */
   public enum Group {
     SIMPLE,
     ROLLUP,
@@ -577,7 +577,7 @@ public abstract class Aggregate extends SingleRel implements Hintable {
     private final boolean filter;
 
     /**
-     * Creates an AggCallBinding
+     * Creates an AggCallBinding.
      *
      * @param typeFactory  Type factory
      * @param aggFunction  Aggregate function
diff --git a/core/src/main/java/org/apache/calcite/rel/core/CorrelationId.java b/core/src/main/java/org/apache/calcite/rel/core/CorrelationId.java
index 0c23729..11be21b 100644
--- a/core/src/main/java/org/apache/calcite/rel/core/CorrelationId.java
+++ b/core/src/main/java/org/apache/calcite/rel/core/CorrelationId.java
@@ -22,7 +22,7 @@ import java.util.Set;
 
 /**
  * Describes the necessary parameters for an implementation in order to
- * identify and set dynamic variables
+ * identify and set dynamic variables.
  */
 public class CorrelationId implements Cloneable, Comparable<CorrelationId> {
   /**
diff --git a/core/src/main/java/org/apache/calcite/rel/core/Join.java b/core/src/main/java/org/apache/calcite/rel/core/Join.java
index 4f38695..be2d47b 100644
--- a/core/src/main/java/org/apache/calcite/rel/core/Join.java
+++ b/core/src/main/java/org/apache/calcite/rel/core/Join.java
@@ -191,6 +191,7 @@ public abstract class Join extends BiRel implements Hintable {
     return planner.getCostFactory().makeCost(rowCount, 0, 0);
   }
 
+  // CHECKSTYLE: IGNORE 1
   /** @deprecated Use {@link RelMdUtil#getJoinRowCount(RelMetadataQuery, Join, RexNode)}. */
   @Deprecated // to be removed before 2.0
   public static double estimateJoinedRows(
diff --git a/core/src/main/java/org/apache/calcite/rel/core/RepeatUnion.java b/core/src/main/java/org/apache/calcite/rel/core/RepeatUnion.java
index 9975429..94d3865 100644
--- a/core/src/main/java/org/apache/calcite/rel/core/RepeatUnion.java
+++ b/core/src/main/java/org/apache/calcite/rel/core/RepeatUnion.java
@@ -59,7 +59,7 @@ public abstract class RepeatUnion extends BiRel {
 
   /**
    * Maximum number of times to repeat the iterative relational expression;
-   * negative value means no limit, 0 means only seed will be evaluated
+   * negative value means no limit, 0 means only seed will be evaluated.
    */
   public final int iterationLimit;
 
diff --git a/core/src/main/java/org/apache/calcite/rel/metadata/RelColumnOrigin.java b/core/src/main/java/org/apache/calcite/rel/metadata/RelColumnOrigin.java
index 4416df7..6a3d7e5 100644
--- a/core/src/main/java/org/apache/calcite/rel/metadata/RelColumnOrigin.java
+++ b/core/src/main/java/org/apache/calcite/rel/metadata/RelColumnOrigin.java
@@ -44,19 +44,15 @@ public class RelColumnOrigin {
 
   //~ Methods ----------------------------------------------------------------
 
-  /**
-   * @return table of origin
-   */
+  /** Returns table of origin. */
   public RelOptTable getOriginTable() {
     return originTable;
   }
 
-  /**
-   * @return 0-based index of column in origin table; whether this ordinal is
-   * flattened or unflattened depends on whether UDT flattening has already
+  /** Returns the 0-based index of column in origin table; whether this ordinal
+   * is flattened or unflattened depends on whether UDT flattening has already
    * been performed on the relational expression which produced this
-   * description
-   */
+   * description. */
   public int getOriginColumnOrdinal() {
     return iOriginColumn;
   }
diff --git a/core/src/main/java/org/apache/calcite/rel/metadata/RelMdPredicates.java b/core/src/main/java/org/apache/calcite/rel/metadata/RelMdPredicates.java
index 0061042..698b059 100644
--- a/core/src/main/java/org/apache/calcite/rel/metadata/RelMdPredicates.java
+++ b/core/src/main/java/org/apache/calcite/rel/metadata/RelMdPredicates.java
@@ -485,6 +485,7 @@ public class RelMdPredicates
     return mq.getPulledUpPredicates(input);
   }
 
+  // CHECKSTYLE: IGNORE 1
   /** @see RelMetadataQuery#getPulledUpPredicates(RelNode) */
   public RelOptPredicateList getPredicates(RelSubset r,
       RelMetadataQuery mq) {
diff --git a/core/src/main/java/org/apache/calcite/rel/metadata/RelMdUtil.java b/core/src/main/java/org/apache/calcite/rel/metadata/RelMdUtil.java
index 2a28588..779e9b4 100644
--- a/core/src/main/java/org/apache/calcite/rel/metadata/RelMdUtil.java
+++ b/core/src/main/java/org/apache/calcite/rel/metadata/RelMdUtil.java
@@ -425,7 +425,7 @@ public class RelMdUtil {
 
   /**
    * Takes the difference between two predicates, removing from the first any
-   * predicates also in the second
+   * predicates also in the second.
    *
    * @param rexBuilder rexBuilder used to construct AND'd RexNode
    * @param pred1      first predicate
@@ -472,7 +472,8 @@ public class RelMdUtil {
 
   /**
    * Forms two bitmaps by splitting the columns in a bitmap according to
-   * whether or not the column references the child input or is an expression
+   * whether or not the column references the child input or is an expression.
+   *
    * @param projExprs Project expressions
    * @param groupKey  Bitmap whose columns will be split
    * @param baseCols  Bitmap representing columns from the child input
@@ -507,22 +508,22 @@ public class RelMdUtil {
   }
 
   /**
-   * Computes the population size for a set of keys returned from a join
+   * Computes the population size for a set of keys returned from a join.
    *
-   * @param joinRel  the join rel
-   * @param groupKey keys to compute the population for
+   * @param join_  Join relational operator
+   * @param groupKey Keys to compute the population for
    * @return computed population size
    */
   public static Double getJoinPopulationSize(RelMetadataQuery mq,
-      RelNode joinRel, ImmutableBitSet groupKey) {
-    Join join = (Join) joinRel;
+      RelNode join_, ImmutableBitSet groupKey) {
+    Join join = (Join) join_;
     if (!join.getJoinType().projectsRight()) {
       return mq.getPopulationSize(join.getLeft(), groupKey);
     }
     ImmutableBitSet.Builder leftMask = ImmutableBitSet.builder();
     ImmutableBitSet.Builder rightMask = ImmutableBitSet.builder();
-    RelNode left = joinRel.getInputs().get(0);
-    RelNode right = joinRel.getInputs().get(1);
+    RelNode left = join.getLeft();
+    RelNode right = join.getRight();
 
     // separate the mask into masks for the left and right
     RelMdUtil.setLeftRightBitmaps(
@@ -533,7 +534,7 @@ public class RelMdUtil {
             mq.getPopulationSize(left, leftMask.build()),
             mq.getPopulationSize(right, rightMask.build()));
 
-    return numDistinctVals(population, mq.getRowCount(joinRel));
+    return numDistinctVals(population, mq.getRowCount(join));
   }
 
   /** Add an epsilon to the value passed in. **/
@@ -560,7 +561,7 @@ public class RelMdUtil {
 
   /**
    * Computes the number of distinct rows for a set of keys returned from a
-   * semi-join
+   * semi-join.
    *
    * @param semiJoinRel RelNode representing the semi-join
    * @param mq          metadata query
diff --git a/core/src/main/java/org/apache/calcite/rel/mutable/MutableCalc.java b/core/src/main/java/org/apache/calcite/rel/mutable/MutableCalc.java
index 79c2b81..5791bb9 100644
--- a/core/src/main/java/org/apache/calcite/rel/mutable/MutableCalc.java
+++ b/core/src/main/java/org/apache/calcite/rel/mutable/MutableCalc.java
@@ -30,7 +30,7 @@ public class MutableCalc extends MutableSingleRel {
   }
 
   /**
-   * Creates a MutableCalc
+   * Creates a MutableCalc.
    *
    * @param input   Input relational expression
    * @param program Calc program
diff --git a/core/src/main/java/org/apache/calcite/rel/mutable/MutableMultiRel.java b/core/src/main/java/org/apache/calcite/rel/mutable/MutableMultiRel.java
index 277c3ef..00af4cf 100644
--- a/core/src/main/java/org/apache/calcite/rel/mutable/MutableMultiRel.java
+++ b/core/src/main/java/org/apache/calcite/rel/mutable/MutableMultiRel.java
@@ -25,7 +25,7 @@ import com.google.common.collect.Lists;
 import java.util.ArrayList;
 import java.util.List;
 
-/** Base Class for relations with three or more inputs */
+/** Base Class for relations with three or more inputs. */
 abstract class MutableMultiRel extends MutableRel {
   protected final List<MutableRel> inputs;
 
diff --git a/core/src/main/java/org/apache/calcite/rel/rel2sql/RelToSqlConverter.java b/core/src/main/java/org/apache/calcite/rel/rel2sql/RelToSqlConverter.java
index c1f87b8..67325b3 100644
--- a/core/src/main/java/org/apache/calcite/rel/rel2sql/RelToSqlConverter.java
+++ b/core/src/main/java/org/apache/calcite/rel/rel2sql/RelToSqlConverter.java
@@ -156,7 +156,7 @@ public class RelToSqlConverter extends SqlImplementor
             frame.parent);
   }
 
-  /** @see #dispatch */
+  /** Visits a RelNode; called by {@link #dispatch} via reflection. */
   public Result visit(RelNode e) {
     throw new AssertionError("Need to implement " + e.getClass().getName());
   }
@@ -192,7 +192,7 @@ public class RelToSqlConverter extends SqlImplementor
     }
   }
 
-  /** @see #dispatch */
+  /** Visits a Join; called by {@link #dispatch} via reflection. */
   public Result visit(Join e) {
     switch (e.getJoinType()) {
     case ANTI:
@@ -284,7 +284,7 @@ public class RelToSqlConverter extends SqlImplementor
     return e.getJoinType() == JoinRelType.INNER && e.getCondition().isAlwaysTrue();
   }
 
-  /** @see #dispatch */
+  /** Visits a Correlate; called by {@link #dispatch} via reflection. */
   public Result visit(Correlate e) {
     final Result leftResult =
         visitInput(e, 0)
@@ -308,7 +308,7 @@ public class RelToSqlConverter extends SqlImplementor
     return result(join, leftResult, rightResult);
   }
 
-  /** @see #dispatch */
+  /** Visits a Filter; called by {@link #dispatch} via reflection. */
   public Result visit(Filter e) {
     final RelNode input = e.getInput();
     if (input instanceof Aggregate) {
@@ -329,7 +329,7 @@ public class RelToSqlConverter extends SqlImplementor
     }
   }
 
-  /** @see #dispatch */
+  /** Visits a Project; called by {@link #dispatch} via reflection. */
   public Result visit(Project e) {
     final Result x = visitInput(e, 0, Clause.SELECT);
     parseCorrelTable(e, x);
@@ -361,7 +361,7 @@ public class RelToSqlConverter extends SqlImplementor
             sqlNodeNull, dialect.getCastSpec(field.getType()));
   }
 
-  /** @see #dispatch */
+  /** Visits a Window; called by {@link #dispatch} via reflection. */
   public Result visit(Window e) {
     final Result x = visitInput(e, 0);
     final Builder builder = x.builder(e);
@@ -385,7 +385,7 @@ public class RelToSqlConverter extends SqlImplementor
     return builder.result();
   }
 
-  /** @see #dispatch */
+  /** Visits an Aggregate; called by {@link #dispatch} via reflection. */
   public Result visit(Aggregate e) {
     final Builder builder =
         visitAggregate(e, e.getGroupSet().toList(), Clause.GROUP_BY);
@@ -510,34 +510,34 @@ public class RelToSqlConverter extends SqlImplementor
     }
   }
 
-  /** @see #dispatch */
+  /** Visits a TableScan; called by {@link #dispatch} via reflection. */
   public Result visit(TableScan e) {
     final SqlIdentifier identifier = getSqlTargetTable(e);
     return result(identifier, ImmutableList.of(Clause.FROM), e, null);
   }
 
-  /** @see #dispatch */
+  /** Visits a Union; called by {@link #dispatch} via reflection. */
   public Result visit(Union e) {
     return setOpToSql(e.all
         ? SqlStdOperatorTable.UNION_ALL
         : SqlStdOperatorTable.UNION, e);
   }
 
-  /** @see #dispatch */
+  /** Visits an Intersect; called by {@link #dispatch} via reflection. */
   public Result visit(Intersect e) {
     return setOpToSql(e.all
         ? SqlStdOperatorTable.INTERSECT_ALL
         : SqlStdOperatorTable.INTERSECT, e);
   }
 
-  /** @see #dispatch */
+  /** Visits a Minus; called by {@link #dispatch} via reflection. */
   public Result visit(Minus e) {
     return setOpToSql(e.all
         ? SqlStdOperatorTable.EXCEPT_ALL
         : SqlStdOperatorTable.EXCEPT, e);
   }
 
-  /** @see #dispatch */
+  /** Visits a Calc; called by {@link #dispatch} via reflection. */
   public Result visit(Calc e) {
     final RexProgram program = e.getProgram();
     final ImmutableSet<Clause> expectedClauses =
@@ -563,7 +563,7 @@ public class RelToSqlConverter extends SqlImplementor
     return builder.result();
   }
 
-  /** @see #dispatch */
+  /** Visits a Values; called by {@link #dispatch} via reflection. */
   public Result visit(Values e) {
     final List<Clause> clauses = ImmutableList.of(Clause.SELECT);
     final Map<String, RelDataType> pairs = ImmutableMap.of();
@@ -680,7 +680,7 @@ public class RelToSqlConverter extends SqlImplementor
                     SqlLiteral.createExactNumeric("0", POS)));
   }
 
-  /** @see #dispatch */
+  /** Visits a Sort; called by {@link #dispatch} via reflection. */
   public Result visit(Sort e) {
     if (e.getInput() instanceof Aggregate) {
       final Aggregate aggregate = (Aggregate) e.getInput();
@@ -784,7 +784,7 @@ public class RelToSqlConverter extends SqlImplementor
     return sqlTargetTable;
   }
 
-  /** @see #dispatch */
+  /** Visits a TableModify; called by {@link #dispatch} via reflection. */
   public Result visit(TableModify modify) {
     final Map<String, RelDataType> pairs = ImmutableMap.of();
     final Context context = aliasContext(pairs, false);
@@ -847,7 +847,7 @@ public class RelToSqlConverter extends SqlImplementor
         Lists.transform(names, name -> new SqlIdentifier(name, POS)), POS);
   }
 
-  /** @see #dispatch */
+  /** Visits a Match; called by {@link #dispatch} via reflection. */
   public Result visit(Match e) {
     final RelNode input = e.getInput();
     final Result x = visitInput(e, 0);
diff --git a/core/src/main/java/org/apache/calcite/rel/rel2sql/SqlImplementor.java b/core/src/main/java/org/apache/calcite/rel/rel2sql/SqlImplementor.java
index 8fe1fad..1ec9ee0 100644
--- a/core/src/main/java/org/apache/calcite/rel/rel2sql/SqlImplementor.java
+++ b/core/src/main/java/org/apache/calcite/rel/rel2sql/SqlImplementor.java
@@ -137,9 +137,10 @@ public abstract class SqlImplementor {
     };
   }
 
+  // CHECKSTYLE: IGNORE 1
   /** @deprecated Use either {@link #visitRoot(RelNode)} or
    * {@link #visitInput(RelNode, int)}. */
-  @Deprecated
+  @Deprecated // to be removed before 2.0
   public final Result visitChild(int i, RelNode e) {
     throw new UnsupportedOperationException();
   }
@@ -1261,9 +1262,7 @@ public abstract class SqlImplementor {
     return new TableFunctionScanContext(dialect, inputSqlNodes);
   }
 
-  /**
-   * Context for translating MATCH_RECOGNIZE clause
-   */
+  /** Context for translating MATCH_RECOGNIZE clause. */
   public class MatchRecognizeContext extends AliasContext {
     protected MatchRecognizeContext(SqlDialect dialect,
         Map<String, RelDataType> aliases) {
@@ -1398,6 +1397,7 @@ public abstract class SqlImplementor {
       return builder(rel, expectedClauses);
     }
 
+    // CHECKSTYLE: IGNORE 3
     /** @deprecated Provide the expected clauses up-front, when you call
      * {@link #visitInput(RelNode, int, Set)}, then create a builder using
      * {@link #builder(RelNode)}. */
diff --git a/core/src/main/java/org/apache/calcite/rel/rules/AggregateReduceFunctionsRule.java b/core/src/main/java/org/apache/calcite/rel/rules/AggregateReduceFunctionsRule.java
index 0ffbbcb..427ebc2 100644
--- a/core/src/main/java/org/apache/calcite/rel/rules/AggregateReduceFunctionsRule.java
+++ b/core/src/main/java/org/apache/calcite/rel/rules/AggregateReduceFunctionsRule.java
@@ -178,7 +178,7 @@ public class AggregateReduceFunctionsRule
   }
 
   /**
-   * Returns whether the aggregate call is a reducible function
+   * Returns whether the aggregate call is a reducible function.
    */
   private boolean isReducible(final SqlKind kind) {
     return functionsToReduce.contains(kind);
diff --git a/core/src/main/java/org/apache/calcite/rel/rules/JoinProjectTransposeRule.java b/core/src/main/java/org/apache/calcite/rel/rules/JoinProjectTransposeRule.java
index c790a37..2edd53e 100644
--- a/core/src/main/java/org/apache/calcite/rel/rules/JoinProjectTransposeRule.java
+++ b/core/src/main/java/org/apache/calcite/rel/rules/JoinProjectTransposeRule.java
@@ -284,26 +284,17 @@ public class JoinProjectTransposeRule
     call.transformTo(relBuilder.build());
   }
 
-  /**
-   * @param call RelOptRuleCall
-   * @return true if the rule was invoked with a left project child
-   */
+  /** Returns whether the rule was invoked with a left project child. */
   protected boolean hasLeftChild(RelOptRuleCall call) {
     return call.rel(1) instanceof Project;
   }
 
-  /**
-   * @param call RelOptRuleCall
-   * @return true if the rule was invoked with 2 children
-   */
+  /** Returns whether the rule was invoked with 2 children. */
   protected boolean hasRightChild(RelOptRuleCall call) {
     return call.rels.length == 3;
   }
 
-  /**
-   * @param call RelOptRuleCall
-   * @return LogicalProject corresponding to the right child
-   */
+  /** Returns the Project corresponding to the right child. */
   protected Project getRightChild(RelOptRuleCall call) {
     return call.rel(2);
   }
diff --git a/core/src/main/java/org/apache/calcite/rel/rules/JoinToMultiJoinRule.java b/core/src/main/java/org/apache/calcite/rel/rules/JoinToMultiJoinRule.java
index 8e0651c..2f1d18b 100644
--- a/core/src/main/java/org/apache/calcite/rel/rules/JoinToMultiJoinRule.java
+++ b/core/src/main/java/org/apache/calcite/rel/rules/JoinToMultiJoinRule.java
@@ -378,25 +378,25 @@ public class JoinToMultiJoinRule
    * Combines the join filters from the left and right inputs (if they are
    * MultiJoinRels) with the join filter in the joinrel into a single AND'd
    * join filter, unless the inputs correspond to null generating inputs in an
-   * outer join
+   * outer join.
    *
-   * @param joinRel join rel
-   * @param left    left child of the join
-   * @param right   right child of the join
+   * @param join    Join
+   * @param left    Left input of the join
+   * @param right   Right input of the join
    * @return combined join filters AND-ed together
    */
   private List<RexNode> combineJoinFilters(
-      Join joinRel,
+      Join join,
       RelNode left,
       RelNode right) {
-    JoinRelType joinType = joinRel.getJoinType();
+    JoinRelType joinType = join.getJoinType();
 
     // AND the join condition if this isn't a left or right outer join;
     // in those cases, the outer join condition is already tracked
     // separately
     final List<RexNode> filters = new ArrayList<>();
     if ((joinType != JoinRelType.LEFT) && (joinType != JoinRelType.RIGHT)) {
-      filters.add(joinRel.getCondition());
+      filters.add(join.getCondition());
     }
     if (canCombine(left, joinType.generatesNullsOnLeft())) {
       filters.add(((MultiJoin) left).getJoinFilter());
@@ -406,7 +406,7 @@ public class JoinToMultiJoinRule
     if (canCombine(right, joinType.generatesNullsOnRight())) {
       MultiJoin multiJoin = (MultiJoin) right;
       filters.add(
-          shiftRightFilter(joinRel, left, multiJoin,
+          shiftRightFilter(join, left, multiJoin,
               multiJoin.getJoinFilter()));
     }
 
diff --git a/core/src/main/java/org/apache/calcite/rel/rules/LoptJoinTree.java b/core/src/main/java/org/apache/calcite/rel/rules/LoptJoinTree.java
index dcec3bf..de8de4b 100644
--- a/core/src/main/java/org/apache/calcite/rel/rules/LoptJoinTree.java
+++ b/core/src/main/java/org/apache/calcite/rel/rules/LoptJoinTree.java
@@ -175,9 +175,7 @@ public class LoptJoinTree {
       this.id = rootId;
     }
 
-    /**
-     * @return the id associated with a leaf node in a binary tree
-     */
+    /** Returns the id associated with a leaf node in a binary tree. */
     public int getId() {
       return id;
     }
diff --git a/core/src/main/java/org/apache/calcite/rel/rules/LoptMultiJoin.java b/core/src/main/java/org/apache/calcite/rel/rules/LoptMultiJoin.java
index f49644f..4614b2f 100644
--- a/core/src/main/java/org/apache/calcite/rel/rules/LoptMultiJoin.java
+++ b/core/src/main/java/org/apache/calcite/rel/rules/LoptMultiJoin.java
@@ -51,9 +51,7 @@ import java.util.Set;
 public class LoptMultiJoin {
   //~ Instance fields --------------------------------------------------------
 
-  /**
-   * The MultiJoin being optimized
-   */
+  /** The MultiJoin being optimized. */
   MultiJoin multiJoin;
 
   /**
@@ -68,32 +66,26 @@ public class LoptMultiJoin {
    */
   private List<RexNode> allJoinFilters;
 
-  /**
-   * Number of factors into the MultiJoin
-   */
+  /** Number of factors into the MultiJoin. */
   private final int nJoinFactors;
 
-  /**
-   * Total number of fields in the MultiJoin
-   */
+  /** Total number of fields in the MultiJoin. */
   private int nTotalFields;
 
-  /**
-   * Original inputs into the MultiJoin
-   */
+  /** Original inputs into the MultiJoin. */
   private final ImmutableList<RelNode> joinFactors;
 
   /**
-   * If a join factor is null generating in a left or right outer join,
+   * If a join factor is null-generating in a left or right outer join,
    * joinTypes indicates the join type corresponding to the factor. Otherwise,
    * it is set to INNER.
    */
   private final ImmutableList<JoinRelType> joinTypes;
 
   /**
-   * If a join factor is null generating in a left or right outer join, the
-   * bitmap contains the non-null generating factors that the null generating
-   * factor is dependent upon
+   * If a join factor is null-generating in a left or right outer join, the
+   * bitmap contains the non-null generating factors that the null-generating
+   * factor is dependent upon.
    */
   private final ImmutableBitSet [] outerJoinFactors;
 
@@ -115,39 +107,39 @@ public class LoptMultiJoin {
 
   /**
    * For each join filter, associates a bitmap indicating all factors
-   * referenced by the filter
+   * referenced by the filter.
    */
   private Map<RexNode, ImmutableBitSet> factorsRefByJoinFilter;
 
   /**
    * For each join filter, associates a bitmap indicating all fields
-   * referenced by the filter
+   * referenced by the filter.
    */
   private Map<RexNode, ImmutableBitSet> fieldsRefByJoinFilter;
 
   /**
-   * Starting RexInputRef index corresponding to each join factor
+   * Starting RexInputRef index corresponding to each join factor.
    */
   int [] joinStart;
 
   /**
-   * Number of fields in each join factor
+   * Number of fields in each join factor.
    */
   int [] nFieldsInJoinFactor;
 
   /**
    * Bitmap indicating which factors each factor references in join filters
-   * that correspond to comparisons
+   * that correspond to comparisons.
    */
   ImmutableBitSet [] factorsRefByFactor;
 
   /**
-   * Weights of each factor combination
+   * Weights of each factor combination.
    */
   int [][] factorWeights;
 
   /**
-   * Type factory
+   * Type factory.
    */
   final RelDataTypeFactory factory;
 
@@ -161,13 +153,13 @@ public class LoptMultiJoin {
   Integer [] joinRemovalFactors;
 
   /**
-   * The semijoins that allow the join of a dimension table to be removed
+   * The semijoins that allow the join of a dimension table to be removed.
    */
   LogicalJoin[] joinRemovalSemiJoins;
 
   /**
    * Set of null-generating factors whose corresponding outer join can be
-   * removed from the query plan
+   * removed from the query plan.
    */
   Set<Integer> removableOuterJoinFactors;
 
@@ -241,168 +233,168 @@ public class LoptMultiJoin {
   //~ Methods ----------------------------------------------------------------
 
   /**
-   * @return the MultiJoin corresponding to this multijoin
+   * Returns the MultiJoin corresponding to this multi-join.
    */
   public MultiJoin getMultiJoinRel() {
     return multiJoin;
   }
 
   /**
-   * @return number of factors in this multijoin
+   * Returns the number of factors in this multi-join.
    */
   public int getNumJoinFactors() {
     return nJoinFactors;
   }
 
   /**
-   * @param factIdx factor to be returned
+   * Returns the factor corresponding to the given factor index.
    *
-   * @return factor corresponding to the factor index passed in
+   * @param factIdx Factor to be returned
    */
   public RelNode getJoinFactor(int factIdx) {
     return joinFactors.get(factIdx);
   }
 
   /**
-   * @return total number of fields in the multijoin
+   * Returns the total number of fields in the multi-join.
    */
   public int getNumTotalFields() {
     return nTotalFields;
   }
 
   /**
-   * @param factIdx desired factor
+   * Returns the number of fields in a given factor.
    *
-   * @return number of fields in the specified factor
+   * @param factIdx Desired factor
    */
   public int getNumFieldsInJoinFactor(int factIdx) {
     return nFieldsInJoinFactor[factIdx];
   }
 
   /**
-   * @return all non-outer join filters in this multijoin
+   * Returns all non-outer join filters in this multi-join.
    */
   public List<RexNode> getJoinFilters() {
     return joinFilters;
   }
 
   /**
-   * @param joinFilter filter for which information will be returned
+   * Returns a bitmap corresponding to the factors referenced within
+   * the specified join filter.
    *
-   * @return bitmap corresponding to the factors referenced within the
-   * specified join filter
+   * @param joinFilter Filter for which information will be returned
    */
   public ImmutableBitSet getFactorsRefByJoinFilter(RexNode joinFilter) {
     return factorsRefByJoinFilter.get(joinFilter);
   }
 
   /**
-   * Returns array of fields contained within the multi-join
+   * Returns an array of fields contained within the multi-join.
    */
   public List<RelDataTypeField> getMultiJoinFields() {
     return multiJoin.getRowType().getFieldList();
   }
 
   /**
-   * @param joinFilter the filter for which information will be returned
+   * Returns a bitmap corresponding to the fields referenced by a join filter.
    *
-   * @return bitmap corresponding to the fields referenced by a join filter
+   * @param joinFilter the filter for which information will be returned
    */
   public ImmutableBitSet getFieldsRefByJoinFilter(RexNode joinFilter) {
     return fieldsRefByJoinFilter.get(joinFilter);
   }
 
   /**
-   * @return weights of the different factors relative to one another
+   * Returns weights of the different factors relative to one another.
    */
   public int [][] getFactorWeights() {
     return factorWeights;
   }
 
   /**
-   * @param factIdx factor for which information will be returned
+   * Returns a bitmap corresponding to the factors referenced by the specified
+   * factor in the various join filters that correspond to comparisons.
    *
-   * @return bitmap corresponding to the factors referenced by the specified
-   * factor in the various join filters that correspond to comparisons
+   * @param factIdx Factor for which information will be returned
    */
   public ImmutableBitSet getFactorsRefByFactor(int factIdx) {
     return factorsRefByFactor[factIdx];
   }
 
   /**
-   * @param factIdx factor for which information will be returned
+   * Returns the starting offset within the multi-join for the specified factor.
    *
-   * @return starting offset within the multijoin for the specified factor
+   * @param factIdx Factor for which information will be returned
    */
   public int getJoinStart(int factIdx) {
     return joinStart[factIdx];
   }
 
   /**
-   * @param factIdx factor for which information will be returned
+   * Returns whether the factor corresponds to a null-generating factor
+   * in a left or right outer join.
    *
-   * @return whether or not the factor corresponds to a null-generating factor
-   * in a left or right outer join
+   * @param factIdx Factor for which information will be returned
    */
   public boolean isNullGenerating(int factIdx) {
     return joinTypes.get(factIdx).isOuterJoin();
   }
 
   /**
-   * @param factIdx factor for which information will be returned
+   * Returns a bitmap containing the factors that a null-generating factor is
+   * dependent upon, if the factor is null-generating in a left or right outer
+   * join; otherwise null is returned.
    *
-   * @return bitmap containing the factors that a null generating factor is
-   * dependent upon, if the factor is null generating in a left or right outer
-   * join; otherwise null is returned
+   * @param factIdx Factor for which information will be returned
    */
   public ImmutableBitSet getOuterJoinFactors(int factIdx) {
     return outerJoinFactors[factIdx];
   }
 
   /**
-   * @param factIdx factor for which information will be returned
+   * Returns outer join conditions associated with the specified null-generating
+   * factor.
    *
-   * @return outer join conditions associated with the specified null
-   * generating factor
+   * @param factIdx Factor for which information will be returned
    */
   public RexNode getOuterJoinCond(int factIdx) {
     return multiJoin.getOuterJoinConditions().get(factIdx);
   }
 
   /**
-   * @param factIdx factor for which information will be returned
+   * Returns a bitmap containing the fields that are projected from a factor.
    *
-   * @return bitmap containing the fields that are projected from a factor
+   * @param factIdx Factor for which information will be returned
    */
   public ImmutableBitSet getProjFields(int factIdx) {
     return projFields.get(factIdx);
   }
 
   /**
-   * @param factIdx factor for which information will be returned
+   * Returns the join field reference counts for a factor.
    *
-   * @return the join field reference counts for a factor
+   * @param factIdx Factor for which information will be returned
    */
   public int [] getJoinFieldRefCounts(int factIdx) {
     return joinFieldRefCountsMap.get(factIdx);
   }
 
   /**
-   * @param dimIdx the dimension factor for which information will be returned
+   * Returns the factor id of the fact table corresponding to a dimension
+   * table in a semi-join, in the case where the join with the dimension table
+   * can be removed.
    *
-   * @return the factor id of the fact table corresponding to a dimension
-   * table in a semijoin, in the case where the join with the dimension table
-   * can be removed
+   * @param dimIdx Dimension factor for which information will be returned
    */
   public Integer getJoinRemovalFactor(int dimIdx) {
     return joinRemovalFactors[dimIdx];
   }
 
   /**
-   * @param dimIdx the dimension factor for which information will be returned
+   * Returns the semi-join that allows the join of a dimension table to be
+   * removed.
    *
-   * @return the semijoin that allows the join of a dimension table to be
-   * removed
+   * @param dimIdx Dimension factor for which information will be returned
    */
   public LogicalJoin getJoinRemovalSemiJoin(int dimIdx) {
     return joinRemovalSemiJoins[dimIdx];
@@ -412,18 +404,18 @@ public class LoptMultiJoin {
    * Indicates that a dimension factor's join can be removed because of a
    * semijoin with a fact table.
    *
-   * @param dimIdx id of the dimension factor
-   * @param factIdx id of the fact factor
+   * @param dimIdx Dimension factor
+   * @param factIdx Fact factor
    */
   public void setJoinRemovalFactor(int dimIdx, int factIdx) {
     joinRemovalFactors[dimIdx] = factIdx;
   }
 
   /**
-   * Indicates the semijoin that allows the join of a dimension table to be
-   * removed
+   * Indicates the semi-join that allows the join of a dimension table to be
+   * removed.
    *
-   * @param dimIdx id of the dimension factor
+   * @param dimIdx Dimension factor
    * @param semiJoin the semijoin
    */
   public void setJoinRemovalSemiJoin(int dimIdx, LogicalJoin semiJoin) {
@@ -431,7 +423,7 @@ public class LoptMultiJoin {
   }
 
   /**
-   * Returns a bitmap representing the factors referenced in a join filter
+   * Returns a bitmap representing the factors referenced in a join filter.
    *
    * @param joinFilter the join filter
    * @param setFields if true, add the fields referenced by the join filter
@@ -458,7 +450,7 @@ public class LoptMultiJoin {
 
   /**
    * Sets bitmaps indicating which factors and fields each join filter
-   * references
+   * references.
    */
   private void setJoinFilterRefs() {
     fieldsRefByJoinFilter = new HashMap<>();
@@ -480,7 +472,7 @@ public class LoptMultiJoin {
 
   /**
    * Sets the bitmap indicating which factors a filter references based on
-   * which fields it references
+   * which fields it references.
    *
    * @param fieldRefBitmap bitmap representing fields referenced
    * @return bitmap representing factors referenced that will
@@ -496,7 +488,7 @@ public class LoptMultiJoin {
   }
 
   /**
-   * Determines the join factor corresponding to a RexInputRef
+   * Determines the join factor corresponding to a RexInputRef.
    *
    * @param rexInputRef rexInputRef index
    *
@@ -590,7 +582,7 @@ public class LoptMultiJoin {
 
   /**
    * Sets an individual weight if the new weight is better than the current
-   * one
+   * one.
    *
    * @param weight weight to be set
    * @param leftFactor index of left factor
@@ -604,10 +596,10 @@ public class LoptMultiJoin {
   }
 
   /**
-   * Returns true if a join tree contains all factors required
+   * Returns whether if a join tree contains all factors required.
    *
-   * @param joinTree join tree to be examined
-   * @param factorsNeeded bitmap of factors required
+   * @param joinTree Join tree to be examined
+   * @param factorsNeeded Bitmap of factors required
    *
    * @return true if join tree contains all required factors
    */
@@ -618,7 +610,7 @@ public class LoptMultiJoin {
   }
 
   /**
-   * Sets a bitmap indicating all child RelNodes in a join tree
+   * Sets a bitmap indicating all child RelNodes in a join tree.
    *
    * @param joinTree join tree to be examined
    * @param childFactors bitmap to be set
@@ -633,7 +625,7 @@ public class LoptMultiJoin {
 
   /**
    * Retrieves the fields corresponding to a join between a left and right
-   * tree
+   * tree.
    *
    * @param left left hand side of the join
    * @param right right hand side of the join
@@ -652,20 +644,20 @@ public class LoptMultiJoin {
 
   /**
    * Adds a join factor to the set of factors that can be removed because the
-   * factor is the null generating factor in an outer join, its join keys are
-   * unique, and the factor is not projected in the query
+   * factor is the null-generating factor in an outer join, its join keys are
+   * unique, and the factor is not projected in the query.
    *
-   * @param factIdx join factor
+   * @param factIdx Join factor
    */
   public void addRemovableOuterJoinFactor(int factIdx) {
     removableOuterJoinFactors.add(factIdx);
   }
 
   /**
-   * @param factIdx factor in question
+   * Return whether the factor corresponds to the null-generating factor in
+   * an outer join that can be removed.
    *
-   * @return true if the factor corresponds to the null generating factor in
-   * an outer join that can be removed
+   * @param factIdx Factor in question
    */
   public boolean isRemovableOuterJoinFactor(int factIdx) {
     return removableOuterJoinFactors.contains(factIdx);
@@ -746,37 +738,37 @@ public class LoptMultiJoin {
     RemovableSelfJoin selfJoin = removableSelfJoinPairs.get(factIdx);
     if (selfJoin == null) {
       return null;
-    } else if (selfJoin.getRightFactor() == factIdx) {
-      return selfJoin.getLeftFactor();
+    } else if (selfJoin.rightFactor == factIdx) {
+      return selfJoin.leftFactor;
     } else {
-      return selfJoin.getRightFactor();
+      return selfJoin.rightFactor;
     }
   }
 
   /**
-   * @param factIdx factor in a self-join
+   * Returns whether the factor is the left factor in a self-join.
    *
-   * @return true if the factor is the left factor in a self-join
+   * @param factIdx Factor in a self-join
    */
   public boolean isLeftFactorInRemovableSelfJoin(int factIdx) {
     RemovableSelfJoin selfJoin = removableSelfJoinPairs.get(factIdx);
     if (selfJoin == null) {
       return false;
     }
-    return selfJoin.getLeftFactor() == factIdx;
+    return selfJoin.leftFactor == factIdx;
   }
 
   /**
-   * @param factIdx factor in a self-join
+   * Returns whether the factor is the right factor in a self-join.
    *
-   * @return true if the factor is the right factor in a self-join
+   * @param factIdx Factor in a self-join
    */
   public boolean isRightFactorInRemovableSelfJoin(int factIdx) {
     RemovableSelfJoin selfJoin = removableSelfJoinPairs.get(factIdx);
     if (selfJoin == null) {
       return false;
     }
-    return selfJoin.getRightFactor() == factIdx;
+    return selfJoin.rightFactor == factIdx;
   }
 
   /**
@@ -792,8 +784,8 @@ public class LoptMultiJoin {
    */
   public Integer getRightColumnMapping(int rightFactor, int rightOffset) {
     RemovableSelfJoin selfJoin = removableSelfJoinPairs.get(rightFactor);
-    assert selfJoin.getRightFactor() == rightFactor;
-    return selfJoin.getColumnMapping().get(rightOffset);
+    assert selfJoin.rightFactor == rightFactor;
+    return selfJoin.columnMapping.get(rightOffset);
   }
 
   public Edge createEdge(RexNode condition) {
@@ -827,24 +819,18 @@ public class LoptMultiJoin {
    * Utility class used to keep track of the factors in a removable self-join.
    * The right factor in the self-join is the one that will be removed.
    */
-  private class RemovableSelfJoin {
-    /**
-     * The left factor in a removable self-join
-     */
-    private int leftFactor;
+  private static class RemovableSelfJoin {
+    /** The left factor in a removable self-join. */
+    private final int leftFactor;
 
-    /**
-     * The right factor in a removable self-join, namely the factor that
-     * will be removed
-     */
-    private int rightFactor;
+    /** The right factor in a removable self-join, namely the factor that will
+     * be removed. */
+    private final int rightFactor;
 
-    /**
-     * A mapping that maps references to columns from the right factor to
+    /** A mapping that maps references to columns from the right factor to
      * columns in the left factor, if the column is referenced in both
-     * factors
-     */
-    private Map<Integer, Integer> columnMapping;
+     * factors. */
+    private final Map<Integer, Integer> columnMapping;
 
     RemovableSelfJoin(
         int leftFactor,
@@ -854,17 +840,5 @@ public class LoptMultiJoin {
       this.rightFactor = rightFactor;
       this.columnMapping = columnMapping;
     }
-
-    public int getLeftFactor() {
-      return leftFactor;
-    }
-
-    public int getRightFactor() {
-      return rightFactor;
-    }
-
-    public Map<Integer, Integer> getColumnMapping() {
-      return columnMapping;
-    }
   }
 }
diff --git a/core/src/main/java/org/apache/calcite/rel/rules/LoptOptimizeJoinRule.java b/core/src/main/java/org/apache/calcite/rel/rules/LoptOptimizeJoinRule.java
index c6671e6..996b4cf 100644
--- a/core/src/main/java/org/apache/calcite/rel/rules/LoptOptimizeJoinRule.java
+++ b/core/src/main/java/org/apache/calcite/rel/rules/LoptOptimizeJoinRule.java
@@ -663,7 +663,7 @@ public class LoptOptimizeJoinRule
 
   /**
    * Generates a join tree with a specific factor as the first factor in the
-   * join tree
+   * join tree.
    *
    * @param multiJoin join factors being optimized
    * @param semiJoinOpt optimal semijoins for each factor
@@ -1009,7 +1009,7 @@ public class LoptOptimizeJoinRule
 
   /**
    * Creates a join tree where the new factor is pushed down one of the
-   * operands of the current join tree
+   * operands of the current join tree.
    *
    * @param multiJoin join factors being optimized
    * @param semiJoinOpt optimal semijoins for each factor
@@ -1164,7 +1164,7 @@ public class LoptOptimizeJoinRule
   }
 
   /**
-   * Creates a join tree with the new factor added to the top of the tree
+   * Creates a join tree with the new factor added to the top of the tree.
    *
    * @param multiJoin join factors being optimized
    * @param semiJoinOpt optimal semijoins for each factor
@@ -1337,7 +1337,7 @@ public class LoptOptimizeJoinRule
 
   /**
    * Adjusts a filter to reflect a newly added factor in the middle of an
-   * existing join tree
+   * existing join tree.
    *
    * @param multiJoin join factors being optimized
    * @param left left subtree of the join
@@ -1896,7 +1896,7 @@ public class LoptOptimizeJoinRule
   }
 
   /**
-   * Adjusts a filter to reflect swapping of join inputs
+   * Adjusts a filter to reflect swapping of join inputs.
    *
    * @param rexBuilder rexBuilder
    * @param multiJoin join factors being optimized
@@ -1938,7 +1938,7 @@ public class LoptOptimizeJoinRule
 
   /**
    * Sets an array indicating how much each factor in a join tree needs to be
-   * adjusted to reflect the tree's join ordering
+   * adjusted to reflect the tree's join ordering.
    *
    * @param multiJoin join factors being optimized
    * @param adjustments array to be filled out
diff --git a/core/src/main/java/org/apache/calcite/rel/rules/LoptSemiJoinOptimizer.java b/core/src/main/java/org/apache/calcite/rel/rules/LoptSemiJoinOptimizer.java
index 1ae11a5..77e2109 100644
--- a/core/src/main/java/org/apache/calcite/rel/rules/LoptSemiJoinOptimizer.java
+++ b/core/src/main/java/org/apache/calcite/rel/rules/LoptSemiJoinOptimizer.java
@@ -327,7 +327,7 @@ public class LoptSemiJoinOptimizer {
 
   /**
    * Modifies the semijoin condition to reflect the fact that the RHS is now
-   * the second factor into a join and the LHS is the first
+   * the second factor into a join and the LHS is the first.
    *
    * @param multiJoin join factors being optimized
    * @param leftAdjustment amount the left RexInputRefs need to be adjusted by
@@ -764,7 +764,7 @@ public class LoptSemiJoinOptimizer {
   }
 
   /**
-   * Removes a dimension table from a fact table's list of possible semijoins
+   * Removes a dimension table from a fact table's list of possible semi-joins.
    *
    * @param possibleDimensions possible dimension tables associated with the
    * fact table
@@ -789,10 +789,10 @@ public class LoptSemiJoinOptimizer {
   }
 
   /**
-   * @param factIdx index corresponding to the desired factor
+   * Returns the optimal semijoin for the specified factor; may be the factor
+   * itself if semijoins are not chosen for the factor.
    *
-   * @return optimal semijoin for the specified factor; may be the factor
-   * itself if semijoins are not chosen for the factor
+   * @param factIdx Index corresponding to the desired factor
    */
   public RelNode getChosenSemiJoin(int factIdx) {
     return chosenSemiJoins[factIdx];
diff --git a/core/src/main/java/org/apache/calcite/rel/rules/MultiJoin.java b/core/src/main/java/org/apache/calcite/rel/rules/MultiJoin.java
index 9fb75d9..90d3119 100644
--- a/core/src/main/java/org/apache/calcite/rel/rules/MultiJoin.java
+++ b/core/src/main/java/org/apache/calcite/rel/rules/MultiJoin.java
@@ -205,59 +205,59 @@ public final class MultiJoin extends AbstractRelNode {
   }
 
   /**
-   * @return join filters associated with this MultiJoin
+   * Returns join filters associated with this MultiJoin.
    */
   public RexNode getJoinFilter() {
     return joinFilter;
   }
 
   /**
-   * @return true if the MultiJoin corresponds to a full outer join.
+   * Returns true if the MultiJoin corresponds to a full outer join.
    */
   public boolean isFullOuterJoin() {
     return isFullOuterJoin;
   }
 
   /**
-   * @return outer join conditions for null-generating inputs
+   * Returns outer join conditions for null-generating inputs.
    */
   public List<RexNode> getOuterJoinConditions() {
     return outerJoinConditions;
   }
 
   /**
-   * @return join types of each input
+   * Returns join types of each input.
    */
   public List<JoinRelType> getJoinTypes() {
     return joinTypes;
   }
 
   /**
-   * @return bitmaps representing the fields projected from each input; if an
-   * entry is null, all fields are projected
+   * Returns bitmaps representing the fields projected from each input; if an
+   * entry is null, all fields are projected.
    */
   public List<ImmutableBitSet> getProjFields() {
     return projFields;
   }
 
   /**
-   * @return the map of reference counts for each input, representing the
-   * fields accessed in join conditions
+   * Returns the map of reference counts for each input, representing the fields
+   * accessed in join conditions.
    */
   public ImmutableMap<Integer, ImmutableIntList> getJoinFieldRefCountsMap() {
     return joinFieldRefCountsMap;
   }
 
   /**
-   * @return a copy of the map of reference counts for each input,
-   * representing the fields accessed in join conditions
+   * Returns a copy of the map of reference counts for each input, representing
+   * the fields accessed in join conditions.
    */
   public Map<Integer, int[]> getCopyJoinFieldRefCountsMap() {
     return cloneJoinFieldRefCountsMap();
   }
 
   /**
-   * @return post-join filter associated with this MultiJoin
+   * Returns post-join filter associated with this MultiJoin.
    */
   public RexNode getPostJoinFilter() {
     return postJoinFilter;
diff --git a/core/src/main/java/org/apache/calcite/rel/rules/PushProjector.java b/core/src/main/java/org/apache/calcite/rel/rules/PushProjector.java
index fcbd60e..5807540 100644
--- a/core/src/main/java/org/apache/calcite/rel/rules/PushProjector.java
+++ b/core/src/main/java/org/apache/calcite/rel/rules/PushProjector.java
@@ -76,22 +76,22 @@ public class PushProjector {
   private final RelBuilder relBuilder;
 
   /**
-   * Original projection expressions
+   * Original projection expressions.
    */
   final List<RexNode> origProjExprs;
 
   /**
-   * Fields from the RelNode that the projection is being pushed past
+   * Fields from the RelNode that the projection is being pushed past.
    */
   final List<RelDataTypeField> childFields;
 
   /**
-   * Number of fields in the RelNode that the projection is being pushed past
+   * Number of fields in the RelNode that the projection is being pushed past.
    */
   final int nChildFields;
 
   /**
-   * Bitmap containing the references in the original projection
+   * Bitmap containing the references in the original projection.
    */
   final BitSet projRefs;
 
@@ -571,7 +571,7 @@ public class PushProjector {
 
   /**
    * Determines how much each input reference needs to be adjusted as a result
-   * of projection
+   * of projection.
    *
    * @return array indicating how much each input needs to be adjusted by
    */
diff --git a/core/src/main/java/org/apache/calcite/rel/rules/ReduceDecimalsRule.java b/core/src/main/java/org/apache/calcite/rel/rules/ReduceDecimalsRule.java
index 2a79689..bbf1c84 100644
--- a/core/src/main/java/org/apache/calcite/rel/rules/ReduceDecimalsRule.java
+++ b/core/src/main/java/org/apache/calcite/rel/rules/ReduceDecimalsRule.java
@@ -134,7 +134,7 @@ public class ReduceDecimalsRule
     }
 
     /**
-     * Rewrites a call in place, from bottom up, as follows:
+     * Rewrites a call in place, from bottom up. Algorithm is as follows:
      *
      * <ol>
      * <li>visit operands
@@ -163,7 +163,7 @@ public class ReduceDecimalsRule
     }
 
     /**
-     * Registers node so it will not be computed again
+     * Registers node so it will not be computed again.
      */
     private void register(RexNode node, RexNode reducedNode) {
       Pair<RexNode, String> key = RexUtil.makeKey(node);
@@ -175,7 +175,7 @@ public class ReduceDecimalsRule
     }
 
     /**
-     * Lookup registered node
+     * Looks up a registered node.
      */
     private RexNode lookup(RexNode node) {
       Pair<RexNode, String> key = RexUtil.makeKey(node);
@@ -186,7 +186,7 @@ public class ReduceDecimalsRule
     }
 
     /**
-     * Rewrites a call, if required, or returns the original call
+     * Rewrites a call, if required, or returns the original call.
      */
     private RexNode rewriteCall(RexCall call) {
       SqlOperator operator = call.getOperator();
@@ -202,7 +202,7 @@ public class ReduceDecimalsRule
     }
 
     /**
-     * Returns a {@link RexExpander} for a call
+     * Returns a {@link RexExpander} for a call.
      */
     private RexExpander getExpander(RexCall call) {
       return expanderMap.getExpander(call);
@@ -285,7 +285,7 @@ public class ReduceDecimalsRule
    */
   public abstract static class RexExpander {
     /**
-     * Factory for constructing new relational expressions
+     * Factory for creating relational expressions.
      */
     final RexBuilder builder;
 
@@ -302,7 +302,7 @@ public class ReduceDecimalsRule
     final RelDataType real8;
 
     /**
-     * Constructs a RexExpander
+     * Creates a RexExpander.
      */
     RexExpander(RexBuilder builder) {
       this.builder = builder;
@@ -333,7 +333,7 @@ public class ReduceDecimalsRule
     public abstract RexNode expand(RexCall call);
 
     /**
-     * Makes an exact numeric literal to be used for scaling
+     * Makes an exact numeric literal to be used for scaling.
      *
      * @param scale a scale from one to max precision - 1
      * @return 10^scale as an exact numeric value
@@ -346,7 +346,7 @@ public class ReduceDecimalsRule
     }
 
     /**
-     * Makes an approximate literal to be used for scaling
+     * Makes an approximate literal to be used for scaling.
      *
      * @param scale a scale from -99 to 99
      * @return 10^scale as an approximate value
@@ -376,7 +376,7 @@ public class ReduceDecimalsRule
     }
 
     /**
-     * Calculates a power of ten, as a long value
+     * Calculates a power of ten, as a long value.
      */
     protected long powerOfTen(int scale) {
       assert scale >= 0;
@@ -386,7 +386,7 @@ public class ReduceDecimalsRule
     }
 
     /**
-     * Makes an exact, non-nullable literal of Bigint type
+     * Makes an exact, non-nullable literal of Bigint type.
      */
     protected RexNode makeExactLiteral(long l) {
       BigDecimal bd = BigDecimal.valueOf(l);
@@ -394,7 +394,7 @@ public class ReduceDecimalsRule
     }
 
     /**
-     * Makes an approximate literal of double precision
+     * Makes an approximate literal of double precision.
      */
     protected RexNode makeApproxLiteral(BigDecimal bd) {
       return builder.makeApproxLiteral(bd);
@@ -535,7 +535,7 @@ public class ReduceDecimalsRule
     }
 
     /**
-     * Retrieves a decimal node's integer representation
+     * Retrieves a decimal node's integer representation.
      *
      * @param decimalNode the decimal value as an opaque type
      * @return an integer representation of the decimal value
@@ -995,7 +995,8 @@ public class ReduceDecimalsRule
   }
 
   /**
-   * Expander that rewrites floor(decimal) expressions:
+   * Expander that rewrites {@code FLOOR(DECIMAL)} expressions.
+   * Rewrite is as follows:
    *
    * <blockquote><pre>
    * if (value &lt; 0)
@@ -1044,7 +1045,8 @@ public class ReduceDecimalsRule
   }
 
   /**
-   * Expander that rewrites ceiling(decimal) expressions:
+   * Expander that rewrites {@code CEILING(DECIMAL)} expressions.
+   * Rewrite is as follows:
    *
    * <blockquote><pre>
    * if (value &gt; 0)
@@ -1174,7 +1176,7 @@ public class ReduceDecimalsRule
   }
 
   /**
-   * An expander that casts decimal arguments as doubles
+   * Expander that casts DECIMAL arguments as DOUBLE.
    */
   private static class CastArgAsDoubleExpander extends CastArgAsTypeExpander {
     private CastArgAsDoubleExpander(RexBuilder builder) {
@@ -1194,7 +1196,7 @@ public class ReduceDecimalsRule
   }
 
   /**
-   * An expander that casts decimal arguments as another type
+   * Expander that casts DECIMAL arguments as another type.
    */
   private abstract static class CastArgAsTypeExpander extends RexExpander {
     private CastArgAsTypeExpander(RexBuilder builder) {
diff --git a/core/src/main/java/org/apache/calcite/rel/rules/materialize/MaterializedViewRule.java b/core/src/main/java/org/apache/calcite/rel/rules/materialize/MaterializedViewRule.java
index 9c2e0dc..8ff7e43 100644
--- a/core/src/main/java/org/apache/calcite/rel/rules/materialize/MaterializedViewRule.java
+++ b/core/src/main/java/org/apache/calcite/rel/rules/materialize/MaterializedViewRule.java
@@ -605,10 +605,11 @@ public abstract class MaterializedViewRule<C extends MaterializedViewRule.Config
     return result;
   }
 
-  /** Currently we only support TableScan - Project - Filter - Inner Join */
+  /** Returns whether a RelNode is a valid tree. Currently we only support
+   * TableScan - Project - Filter - Inner Join. */
   protected boolean isValidRelNodePlan(RelNode node, RelMetadataQuery mq) {
     final Multimap<Class<? extends RelNode>, RelNode> m =
-            mq.getNodeTypes(node);
+        mq.getNodeTypes(node);
     if (m == null) {
       return false;
     }
@@ -616,9 +617,9 @@ public abstract class MaterializedViewRule<C extends MaterializedViewRule.Config
     for (Entry<Class<? extends RelNode>, Collection<RelNode>> e : m.asMap().entrySet()) {
       Class<? extends RelNode> c = e.getKey();
       if (!TableScan.class.isAssignableFrom(c)
-              && !Project.class.isAssignableFrom(c)
-              && !Filter.class.isAssignableFrom(c)
-              && (!Join.class.isAssignableFrom(c))) {
+          && !Project.class.isAssignableFrom(c)
+          && !Filter.class.isAssignableFrom(c)
+          && (!Join.class.isAssignableFrom(c))) {
         // Skip it
         return false;
       }
@@ -1329,7 +1330,7 @@ public abstract class MaterializedViewRule<C extends MaterializedViewRule.Config
     }
   }
 
-  /** Edge for graph */
+  /** Edge for graph. */
   protected static class Edge extends DefaultEdge {
     final Multimap<RexTableInputRef, RexTableInputRef> equiColumns =
         ArrayListMultimap.create();
@@ -1343,7 +1344,7 @@ public abstract class MaterializedViewRule<C extends MaterializedViewRule.Config
     }
   }
 
-  /** View partitioning result */
+  /** View partitioning result. */
   protected static class ViewPartialRewriting {
     private final RelNode newView;
     private final Project newTopViewProject;
diff --git a/core/src/main/java/org/apache/calcite/rel/type/RelDataType.java b/core/src/main/java/org/apache/calcite/rel/type/RelDataType.java
index 0e41c0d..8655c04 100644
--- a/core/src/main/java/org/apache/calcite/rel/type/RelDataType.java
+++ b/core/src/main/java/org/apache/calcite/rel/type/RelDataType.java
@@ -227,27 +227,20 @@ public interface RelDataType {
    */
   RelDataTypeFamily getFamily();
 
-  /**
-   * @return precedence list for this type
-   */
+  /** Returns the precedence list for this type. */
   RelDataTypePrecedenceList getPrecedenceList();
 
-  /**
-   * @return the category of comparison operators which make sense when
-   * applied to values of this type
-   */
+  /** Returns the category of comparison operators that make sense when applied
+   * to values of this type. */
   RelDataTypeComparability getComparability();
 
-  /**
-   * @return whether it has dynamic structure (for "schema-on-read" table)
-   */
+  /** Returns whether this type has dynamic structure (for "schema-on-read"
+   * table). */
   boolean isDynamicStruct();
 
-  /**
-   * @return whether the field types are equal with each other by ignoring
-   * the field names. If it is not a struct, just return the result of
-   * {@code #equals(Object)}.
-   */
+  /** Returns whether the field types are equal with each other by ignoring the
+   * field names. If it is not a struct, just return the result of {@code
+   * #equals(Object)}. */
   @API(since = "1.24", status = API.Status.INTERNAL)
   default boolean equalsSansFieldNames(RelDataType that) {
     if (this == that) {
diff --git a/core/src/main/java/org/apache/calcite/rel/type/RelDataTypeFactory.java b/core/src/main/java/org/apache/calcite/rel/type/RelDataTypeFactory.java
index 4663d50..e82d3b4 100644
--- a/core/src/main/java/org/apache/calcite/rel/type/RelDataTypeFactory.java
+++ b/core/src/main/java/org/apache/calcite/rel/type/RelDataTypeFactory.java
@@ -183,9 +183,7 @@ public interface RelDataTypeFactory {
       Charset charset,
       SqlCollation collation);
 
-  /**
-   * @return the default {@link Charset} for string types
-   */
+  /** Returns the default {@link Charset} (valid if this is a string type). */
   Charset getDefaultCharset();
 
   /**
diff --git a/core/src/main/java/org/apache/calcite/rex/RexBuilder.java b/core/src/main/java/org/apache/calcite/rex/RexBuilder.java
index e58fe32..092bb5b 100644
--- a/core/src/main/java/org/apache/calcite/rex/RexBuilder.java
+++ b/core/src/main/java/org/apache/calcite/rex/RexBuilder.java
@@ -138,7 +138,7 @@ public class RexBuilder {
   //~ Methods ----------------------------------------------------------------
 
   /**
-   * Returns this RexBuilder's type factory
+   * Returns this RexBuilder's type factory.
    *
    * @return type factory
    */
@@ -147,7 +147,7 @@ public class RexBuilder {
   }
 
   /**
-   * Returns this RexBuilder's operator table
+   * Returns this RexBuilder's operator table.
    *
    * @return operator table
    */
@@ -730,7 +730,7 @@ public class RexBuilder {
   }
 
   /**
-   * Retrieves an interval or decimal node's integer representation
+   * Retrieves an INTERVAL or DECIMAL node's integer representation.
    *
    * @param node the interval or decimal value as an opaque type
    * @return an integer representation of the decimal value
@@ -1138,6 +1138,7 @@ public class RexBuilder {
     return makeLiteral(str, type, SqlTypeName.CHAR);
   }
 
+  // CHECKSTYLE: IGNORE 1
   /** @deprecated Use {@link #makeDateLiteral(DateString)}. */
   @Deprecated // to be removed before 2.0
   public RexLiteral makeDateLiteral(Calendar calendar) {
@@ -1152,6 +1153,7 @@ public class RexBuilder {
         typeFactory.createSqlType(SqlTypeName.DATE), SqlTypeName.DATE);
   }
 
+  // CHECKSTYLE: IGNORE 1
   /** @deprecated Use {@link #makeTimeLiteral(TimeString, int)}. */
   @Deprecated // to be removed before 2.0
   public RexLiteral makeTimeLiteral(Calendar calendar, int precision) {
@@ -1178,6 +1180,7 @@ public class RexBuilder {
         SqlTypeName.TIME_WITH_LOCAL_TIME_ZONE);
   }
 
+  // CHECKSTYLE: IGNORE 1
   /** @deprecated Use {@link #makeTimestampLiteral(TimestampString, int)}. */
   @Deprecated // to be removed before 2.0
   public RexLiteral makeTimestampLiteral(Calendar calendar, int precision) {
@@ -1230,7 +1233,7 @@ public class RexBuilder {
   }
 
   /**
-   * Creates a reference to a dynamic parameter
+   * Creates a reference to a dynamic parameter.
    *
    * @param type  Type of dynamic parameter
    * @param index Index of dynamic parameter
@@ -1260,12 +1263,14 @@ public class RexBuilder {
     return (RexLiteral) makeCast(type, constantNull);
   }
 
+  // CHECKSTYLE: IGNORE 1
   /** @deprecated Use {@link #makeNullLiteral(RelDataType)} */
   @Deprecated // to be removed before 2.0
   public RexNode makeNullLiteral(SqlTypeName typeName, int precision) {
     return makeNullLiteral(typeFactory.createSqlType(typeName, precision));
   }
 
+  // CHECKSTYLE: IGNORE 1
   /** @deprecated Use {@link #makeNullLiteral(RelDataType)} */
   @Deprecated // to be removed before 2.0
   public RexNode makeNullLiteral(SqlTypeName typeName) {
@@ -1629,7 +1634,7 @@ public class RexBuilder {
   }
 
   /** Returns a byte-string padded with zero bytes to make it at least a given
-   * length, */
+   * length. */
   private static ByteString padRight(ByteString s, int length) {
     if (s.length() >= length) {
       return s;
diff --git a/core/src/main/java/org/apache/calcite/rex/RexLiteral.java b/core/src/main/java/org/apache/calcite/rex/RexLiteral.java
index f40d126..4195966 100644
--- a/core/src/main/java/org/apache/calcite/rex/RexLiteral.java
+++ b/core/src/main/java/org/apache/calcite/rex/RexLiteral.java
@@ -282,10 +282,8 @@ public class RexLiteral extends RexNode {
     return shouldIncludeType(value, type);
   }
 
-  /**
-   * @return whether value is appropriate for its type (we have rules about
-   * these things)
-   */
+  /** Returns whether a value is appropriate for its type. (We have rules about
+   * these things!) */
   public static boolean valueMatchesType(
       Comparable value,
       SqlTypeName typeName,
diff --git a/core/src/main/java/org/apache/calcite/rex/RexMultisetUtil.java b/core/src/main/java/org/apache/calcite/rex/RexMultisetUtil.java
index 971cf47..f0606e2 100644
--- a/core/src/main/java/org/apache/calcite/rex/RexMultisetUtil.java
+++ b/core/src/main/java/org/apache/calcite/rex/RexMultisetUtil.java
@@ -32,7 +32,7 @@ public class RexMultisetUtil {
   //~ Static fields/initializers ---------------------------------------------
 
   /**
-   * A set defining all implementable multiset calls
+   * A set defining all implementable multiset calls.
    */
   private static final Set<SqlOperator> MULTISET_OPERATORS =
       ImmutableSet.of(
@@ -134,7 +134,7 @@ public class RexMultisetUtil {
 
   /**
    * Returns a reference to the first found multiset call or null if none was
-   * found
+   * found.
    */
   public static RexCall findFirstMultiset(final RexNode node, boolean deep) {
     if (node instanceof RexFieldAccess) {
diff --git a/core/src/main/java/org/apache/calcite/rex/RexPatternFieldRef.java b/core/src/main/java/org/apache/calcite/rex/RexPatternFieldRef.java
index a0d039e..560f88f 100644
--- a/core/src/main/java/org/apache/calcite/rex/RexPatternFieldRef.java
+++ b/core/src/main/java/org/apache/calcite/rex/RexPatternFieldRef.java
@@ -20,7 +20,7 @@ import org.apache.calcite.rel.type.RelDataType;
 import org.apache.calcite.sql.SqlKind;
 
 /**
- * Variable which references a field of an input relational expression
+ * Variable that references a field of an input relational expression.
  */
 public class RexPatternFieldRef extends RexInputRef {
   private final String alpha;
diff --git a/core/src/main/java/org/apache/calcite/rex/RexProgram.java b/core/src/main/java/org/apache/calcite/rex/RexProgram.java
index 7369217..24e4194 100644
--- a/core/src/main/java/org/apache/calcite/rex/RexProgram.java
+++ b/core/src/main/java/org/apache/calcite/rex/RexProgram.java
@@ -401,7 +401,7 @@ public class RexProgram {
   }
 
   /**
-   * Returns whether this program contains windowed aggregate functions
+   * Returns whether this program contains windowed aggregate functions.
    *
    * @return whether this program contains windowed aggregate functions
    */
diff --git a/core/src/main/java/org/apache/calcite/rex/RexProgramBuilder.java b/core/src/main/java/org/apache/calcite/rex/RexProgramBuilder.java
index 71ac25c..488b2a0 100644
--- a/core/src/main/java/org/apache/calcite/rex/RexProgramBuilder.java
+++ b/core/src/main/java/org/apache/calcite/rex/RexProgramBuilder.java
@@ -867,7 +867,7 @@ public class RexProgramBuilder {
   }
 
   /**
-   * Returns the rowtype of the input to the program
+   * Returns the row type of the input to the program.
    */
   public RelDataType getInputRowType() {
     return inputRowType;
@@ -1045,8 +1045,8 @@ public class RexProgramBuilder {
   }
 
   /**
-   * Shuttle which rewires {@link RexLocalRef} using a list of updated
-   * references
+   * Shuttle that rewires {@link RexLocalRef} using a list of updated
+   * references.
    */
   private class UpdateRefShuttle extends RexShuttle {
     private List<RexLocalRef> newRefs;
diff --git a/core/src/main/java/org/apache/calcite/rex/RexSimplify.java b/core/src/main/java/org/apache/calcite/rex/RexSimplify.java
index 67af8f1..35ded74 100644
--- a/core/src/main/java/org/apache/calcite/rex/RexSimplify.java
+++ b/core/src/main/java/org/apache/calcite/rex/RexSimplify.java
@@ -1032,7 +1032,7 @@ public class RexSimplify {
             && oldType.isNullable());
   }
 
-  /** Object to describe a Case branch */
+  /** Object to describe a CASE branch. */
   static final class CaseBranch {
 
     private final RexNode cond;
@@ -1074,7 +1074,7 @@ public class RexSimplify {
   }
 
   /**
-   * Decides whether it is safe to flatten the given case part into AND/ORs
+   * Decides whether it is safe to flatten the given CASE part into ANDs/ORs.
    */
   enum SafeRexVisitor implements RexVisitor<Boolean> {
     INSTANCE;
diff --git a/core/src/main/java/org/apache/calcite/rex/RexSqlReflectiveConvertletTable.java b/core/src/main/java/org/apache/calcite/rex/RexSqlReflectiveConvertletTable.java
index c19d540..65d4fc6 100644
--- a/core/src/main/java/org/apache/calcite/rex/RexSqlReflectiveConvertletTable.java
+++ b/core/src/main/java/org/apache/calcite/rex/RexSqlReflectiveConvertletTable.java
@@ -72,7 +72,7 @@ public class RexSqlReflectiveConvertletTable implements RexSqlConvertletTable {
   }
 
   /**
-   * Registers a convertlet for a given operator instance
+   * Registers a convertlet for a given operator instance.
    *
    * @param op         Operator instance, say
    * {@link org.apache.calcite.sql.fun.SqlStdOperatorTable#MINUS}
diff --git a/core/src/main/java/org/apache/calcite/rex/RexTableInputRef.java b/core/src/main/java/org/apache/calcite/rex/RexTableInputRef.java
index fd14ede..6ebf65b 100644
--- a/core/src/main/java/org/apache/calcite/rex/RexTableInputRef.java
+++ b/core/src/main/java/org/apache/calcite/rex/RexTableInputRef.java
@@ -94,7 +94,8 @@ public class RexTableInputRef extends RexInputRef {
     return SqlKind.TABLE_INPUT_REF;
   }
 
-  /** Identifies uniquely a table by its qualified name and its entity number (occurrence) */
+  /** Identifies uniquely a table by its qualified name and its entity number
+   * (occurrence). */
   public static class RelTableRef implements Comparable<RelTableRef> {
 
     private final RelOptTable table;
diff --git a/core/src/main/java/org/apache/calcite/rex/RexUtil.java b/core/src/main/java/org/apache/calcite/rex/RexUtil.java
index 67d60a5..e1aff76 100644
--- a/core/src/main/java/org/apache/calcite/rex/RexUtil.java
+++ b/core/src/main/java/org/apache/calcite/rex/RexUtil.java
@@ -94,7 +94,7 @@ public class RexUtil {
   }
 
   /**
-   * Generates a cast from one row type to another
+   * Generates a cast from one row type to another.
    *
    * @param rexBuilder RexBuilder to use for constructing casts
    * @param lhsRowType target row type
@@ -629,7 +629,7 @@ public class RexUtil {
   }
 
    /**
-   * Returns whether a given node contains a RexCall with a specified operator
+   * Returns whether a given node contains a RexCall with a specified operator.
    *
    * @param operator Operator to look for
    * @param node     a RexNode tree
@@ -766,7 +766,7 @@ public class RexUtil {
   }
 
   /**
-   * Determines whether any operand of a set requires decimal expansion
+   * Determines whether any operand of a set requires decimal expansion.
    */
   public static boolean requiresDecimalExpansion(
       List<RexNode> operands,
diff --git a/core/src/main/java/org/apache/calcite/runtime/CalciteContextException.java b/core/src/main/java/org/apache/calcite/runtime/CalciteContextException.java
index fdedfe6..0b269d1 100644
--- a/core/src/main/java/org/apache/calcite/runtime/CalciteContextException.java
+++ b/core/src/main/java/org/apache/calcite/runtime/CalciteContextException.java
@@ -132,43 +132,44 @@ public class CalciteContextException extends CalciteException {
   }
 
   /**
-   * @return 1-based line number, or 0 for missing position information
+   * Returns the 1-based line number, or 0 for missing position information.
    */
   public int getPosLine() {
     return posLine;
   }
 
   /**
-   * @return 1-based column number, or 0 for missing position information
+   * Returns the 1-based column number, or 0 for missing position information.
    */
   public int getPosColumn() {
     return posColumn;
   }
 
   /**
-   * @return 1-based ending line number, or 0 for missing position information
+   * Returns the 1-based ending line number, or 0 for missing position
+   * information.
    */
   public int getEndPosLine() {
     return endPosLine;
   }
 
   /**
-   * @return 1-based ending column number, or 0 for missing position
-   * information
+   * Returns the 1-based ending column number, or 0 for missing position
+   * information.
    */
   public int getEndPosColumn() {
     return endPosColumn;
   }
 
   /**
-   * @return the input string that is associated with the context
+   * Returns the input string that is associated with the context.
    */
   public String getOriginalStatement() {
     return originalStatement;
   }
 
   /**
-   * @param originalStatement - String to associate with the current context
+   * Sets the input string to associate with the current context.
    */
   public void setOriginalStatement(String originalStatement) {
     this.originalStatement = originalStatement;
diff --git a/core/src/main/java/org/apache/calcite/runtime/Enumerables.java b/core/src/main/java/org/apache/calcite/runtime/Enumerables.java
index a9c3f82..1114391 100644
--- a/core/src/main/java/org/apache/calcite/runtime/Enumerables.java
+++ b/core/src/main/java/org/apache/calcite/runtime/Enumerables.java
@@ -91,7 +91,7 @@ public class Enumerables {
           /** Current result row. Null if no row is ready. */
           TResult resultRow;
 
-          /** Match counter is 1 based in Oracle */
+          /** Match counter is 1-based in Oracle. */
           final AtomicInteger matchCounter = new AtomicInteger(1);
 
           public TResult current() {
diff --git a/core/src/main/java/org/apache/calcite/runtime/EnumeratorCursor.java b/core/src/main/java/org/apache/calcite/runtime/EnumeratorCursor.java
index c1a12b6..042f88c 100644
--- a/core/src/main/java/org/apache/calcite/runtime/EnumeratorCursor.java
+++ b/core/src/main/java/org/apache/calcite/runtime/EnumeratorCursor.java
@@ -35,7 +35,8 @@ public abstract class EnumeratorCursor<T> extends PositionedCursor<T> {
   private final Enumerator<T> enumerator;
 
   /**
-   * Creates a {@code EnumeratorCursor}
+   * Creates an {@code EnumeratorCursor}.
+   *
    * @param enumerator input enumerator
    */
   protected EnumeratorCursor(Enumerator<T> enumerator) {
diff --git a/core/src/main/java/org/apache/calcite/runtime/Hook.java b/core/src/main/java/org/apache/calcite/runtime/Hook.java
index 372572f..ce681f3 100644
--- a/core/src/main/java/org/apache/calcite/runtime/Hook.java
+++ b/core/src/main/java/org/apache/calcite/runtime/Hook.java
@@ -130,6 +130,7 @@ public enum Hook {
     return () -> remove(handler);
   }
 
+  // CHECKSTYLE: IGNORE 1
   /** @deprecated Use {@link #add(Consumer)}. */
   @SuppressWarnings("Guava")
   @Deprecated // to be removed before 2.0
@@ -149,6 +150,7 @@ public enum Hook {
     return () -> removeThread(handler);
   }
 
+  // CHECKSTYLE: IGNORE 1
   /** @deprecated Use {@link #addThread(Consumer)}. */
   @SuppressWarnings("Guava")
   @Deprecated // to be removed before 2.0
@@ -162,6 +164,7 @@ public enum Hook {
     return threadHandlers.get().remove(handler);
   }
 
+  // CHECKSTYLE: IGNORE 1
   /** @deprecated Use {@link #propertyJ}. */
   @SuppressWarnings("Guava")
   @Deprecated // return type will change in 2.0
diff --git a/core/src/main/java/org/apache/calcite/runtime/Matcher.java b/core/src/main/java/org/apache/calcite/runtime/Matcher.java
index 3d835cb..627c6f5 100644
--- a/core/src/main/java/org/apache/calcite/runtime/Matcher.java
+++ b/core/src/main/java/org/apache/calcite/runtime/Matcher.java
@@ -320,7 +320,7 @@ public class Matcher<E> {
   }
 
   /**
-   * Represents a Tuple of a symbol and a row
+   * A 2-tuple consisting of a symbol and a row.
    *
    * @param <E> Type of Row
    */
diff --git a/core/src/main/java/org/apache/calcite/runtime/Pattern.java b/core/src/main/java/org/apache/calcite/runtime/Pattern.java
index d0ae8a2..1818fb6 100644
--- a/core/src/main/java/org/apache/calcite/runtime/Pattern.java
+++ b/core/src/main/java/org/apache/calcite/runtime/Pattern.java
@@ -38,9 +38,9 @@ public interface Pattern {
   enum Op {
     /** A leaf pattern, consisting of a single symbol. */
     SYMBOL(0, 0),
-    /** Anchor for start "^" */
+    /** Anchor for start "^". */
     ANCHOR_START(0, 0),
-    /** Anchor for end "$" */
+    /** Anchor for end "$". */
     ANCHOR_END(0, 0),
     /** Pattern that matches one pattern followed by another. */
     SEQ(2, -1),
@@ -53,7 +53,7 @@ public interface Pattern {
     /** Pattern that matches a pattern repeated between {@code minRepeat}
      * and {@code maxRepeat} times. */
     REPEAT(1, 1),
-    /** Pattern that machtes a pattern one time or zero times */
+    /** Pattern that matches a pattern one time or zero times. */
     OPTIONAL(1, 1);
 
     private final int minArity;
diff --git a/core/src/main/java/org/apache/calcite/runtime/SocketFactoryImpl.java b/core/src/main/java/org/apache/calcite/runtime/SocketFactoryImpl.java
index 6bd857d..857fd98 100644
--- a/core/src/main/java/org/apache/calcite/runtime/SocketFactoryImpl.java
+++ b/core/src/main/java/org/apache/calcite/runtime/SocketFactoryImpl.java
@@ -43,53 +43,53 @@ import javax.net.SocketFactory;
  */
 public class SocketFactoryImpl extends SocketFactory {
   /**
-   * should keep alives be sent
+   * Whether keep-alives should be sent.
    */
   public static final boolean SO_KEEPALIVE = false;
 
   /**
-   * is out of band in-line enabled
+   * Whether out-of-band in-line is enabled.
    */
   public static final boolean OOBINLINE = false;
 
   /**
-   * should the address be reused
+   * Whether the address should be reused.
    */
   public static final boolean SO_REUSEADDR = false;
 
   /**
-   * do not buffer send(s) iff true
+   * Whether to not buffer send(s).
    */
   public static final boolean TCP_NODELAY = true;
 
   /**
-   * size of receiving buffer
+   * Size of receiving buffer.
    */
   public static final int SO_RCVBUF = 8192;
 
   /**
-   * size of sending buffer iff needed
+   * Size of sending buffer iff needed.
    */
   public static final int SO_SNDBUF = 1024;
 
   /**
-   * read timeout in milliseconds
+   * Read timeout in milliseconds.
    */
   public static final int SO_TIMEOUT = 12000;
 
   /**
-   * connect timeout in milliseconds
+   * Connect timeout in milliseconds.
    */
   public static final int SO_CONNECT_TIMEOUT = 5000;
 
   /**
-   * enabling lingering with 0-timeout will cause the socket to be
-   * closed forcefully upon execution of close()
+   * Enabling lingering with 0-timeout will cause the socket to be
+   * closed forcefully upon execution of {@code close()}.
    */
   public static final boolean SO_LINGER = true;
 
   /**
-   * amount of time to linger
+   * Amount of time to linger.
    */
   public static final int LINGER = 0;
 
@@ -153,6 +153,8 @@ public class SocketFactoryImpl extends SocketFactory {
   }
 
   /**
+   * Returns a copy of the environment's default socket factory.
+   *
    * @see javax.net.SocketFactory#getDefault()
    */
   public static SocketFactory getDefault() {
diff --git a/core/src/main/java/org/apache/calcite/runtime/SqlFunctions.java b/core/src/main/java/org/apache/calcite/runtime/SqlFunctions.java
index 248990e..608af6f 100644
--- a/core/src/main/java/org/apache/calcite/runtime/SqlFunctions.java
+++ b/core/src/main/java/org/apache/calcite/runtime/SqlFunctions.java
@@ -1110,19 +1110,19 @@ public class SqlFunctions {
   }
 
   // &
-  /** Helper function for implementing <code>BIT_AND</code> */
+  /** Helper function for implementing <code>BIT_AND</code>. */
   public static long bitAnd(long b0, long b1) {
     return b0 & b1;
   }
 
   // |
-  /** Helper function for implementing <code>BIT_OR</code> */
+  /** Helper function for implementing <code>BIT_OR</code>. */
   public static long bitOr(long b0, long b1) {
     return b0 | b1;
   }
 
   // ^
-  /** Helper function for implementing <code>BIT_XOR</code> */
+  /** Helper function for implementing <code>BIT_XOR</code>. */
   public static long bitXor(long b0, long b1) {
     return b0 ^ b1;
   }
diff --git a/core/src/main/java/org/apache/calcite/runtime/TrustAllSslSocketFactory.java b/core/src/main/java/org/apache/calcite/runtime/TrustAllSslSocketFactory.java
index 3e212a4..9218bdb 100644
--- a/core/src/main/java/org/apache/calcite/runtime/TrustAllSslSocketFactory.java
+++ b/core/src/main/java/org/apache/calcite/runtime/TrustAllSslSocketFactory.java
@@ -76,6 +76,8 @@ public class TrustAllSslSocketFactory extends SocketFactoryImpl {
   }
 
   /**
+   * Returns a copy of the environment's default socket factory.
+   *
    * @see javax.net.SocketFactory#getDefault()
    */
   public static TrustAllSslSocketFactory getDefault() {
diff --git a/core/src/main/java/org/apache/calcite/runtime/Utilities.java b/core/src/main/java/org/apache/calcite/runtime/Utilities.java
index 68bfd3b..b09c91a 100644
--- a/core/src/main/java/org/apache/calcite/runtime/Utilities.java
+++ b/core/src/main/java/org/apache/calcite/runtime/Utilities.java
@@ -33,6 +33,7 @@ public class Utilities {
   protected Utilities() {
   }
 
+  // CHECKSTYLE: IGNORE 1
   /** @deprecated Use {@link java.util.Objects#equals}. */
   @Deprecated // to be removed before 2.0
   public static boolean equal(Object o0, Object o1) {
diff --git a/core/src/main/java/org/apache/calcite/schema/impl/ReflectiveFunctionBase.java b/core/src/main/java/org/apache/calcite/schema/impl/ReflectiveFunctionBase.java
index 82a966e..2ce8160 100644
--- a/core/src/main/java/org/apache/calcite/schema/impl/ReflectiveFunctionBase.java
+++ b/core/src/main/java/org/apache/calcite/schema/impl/ReflectiveFunctionBase.java
@@ -42,8 +42,9 @@ public abstract class ReflectiveFunctionBase implements Function {
   public final List<FunctionParameter> parameters;
 
   /**
-   * {@code ReflectiveFunctionBase} constructor
-   * @param method method that is used to get type information from
+   * Creates a ReflectiveFunctionBase.
+   *
+   * @param method Method that is used to get type information from
    */
   public ReflectiveFunctionBase(Method method) {
     this.method = method;
diff --git a/core/src/main/java/org/apache/calcite/sql/JoinConditionType.java b/core/src/main/java/org/apache/calcite/sql/JoinConditionType.java
index 421af6f..faf4ee8 100644
--- a/core/src/main/java/org/apache/calcite/sql/JoinConditionType.java
+++ b/core/src/main/java/org/apache/calcite/sql/JoinConditionType.java
@@ -21,19 +21,19 @@ package org.apache.calcite.sql;
  */
 public enum JoinConditionType implements Symbolizable {
   /**
-   * Join clause has no condition, for example "FROM EMP, DEPT"
+   * Join clause has no condition, for example "{@code FROM EMP, DEPT}".
    */
   NONE,
 
   /**
-   * Join clause has an ON condition, for example "FROM EMP JOIN DEPT ON
-   * EMP.DEPTNO = DEPT.DEPTNO"
+   * Join clause has an {@code ON} condition,
+   * for example "{@code FROM EMP JOIN DEPT ON EMP.DEPTNO = DEPT.DEPTNO}".
    */
   ON,
 
   /**
-   * Join clause has a USING condition, for example "FROM EMP JOIN DEPT
-   * USING (DEPTNO)"
+   * Join clause has a {@code USING} condition,
+   * for example "{@code FROM EMP JOIN DEPT USING (DEPTNO)}".
    */
   USING
 }
diff --git a/core/src/main/java/org/apache/calcite/sql/SqlAccessEnum.java b/core/src/main/java/org/apache/calcite/sql/SqlAccessEnum.java
index 7abf1f7..80d9411 100644
--- a/core/src/main/java/org/apache/calcite/sql/SqlAccessEnum.java
+++ b/core/src/main/java/org/apache/calcite/sql/SqlAccessEnum.java
@@ -17,7 +17,7 @@
 package org.apache.calcite.sql;
 
 /**
- * Enumeration representing different access types
+ * Access type.
  */
 public enum SqlAccessEnum {
   SELECT, UPDATE, INSERT, DELETE;
diff --git a/core/src/main/java/org/apache/calcite/sql/SqlAccessType.java b/core/src/main/java/org/apache/calcite/sql/SqlAccessType.java
index b5e0466..7f9ee24 100644
--- a/core/src/main/java/org/apache/calcite/sql/SqlAccessType.java
+++ b/core/src/main/java/org/apache/calcite/sql/SqlAccessType.java
@@ -20,7 +20,9 @@ import java.util.EnumSet;
 import java.util.Locale;
 
 /**
- * SqlAccessType is represented by a set of allowed access types
+ * SqlAccessType is represented by a set of allowed access types.
+ *
+ * @see SqlAccessEnum
  */
 public class SqlAccessType {
   //~ Static fields/initializers ---------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/SqlBasicTypeNameSpec.java b/core/src/main/java/org/apache/calcite/sql/SqlBasicTypeNameSpec.java
index 01358fb..4e3d7db 100644
--- a/core/src/main/java/org/apache/calcite/sql/SqlBasicTypeNameSpec.java
+++ b/core/src/main/java/org/apache/calcite/sql/SqlBasicTypeNameSpec.java
@@ -235,7 +235,7 @@ public class SqlBasicTypeNameSpec extends SqlTypeNameSpec {
   //~ Tools ------------------------------------------------------------------
 
   /**
-   * @return true if this type name has "local time zone" definition.
+   * Returns whether this type name has "local time zone" definition.
    */
   private static boolean isWithLocalTimeZoneDef(SqlTypeName typeName) {
     switch (typeName) {
diff --git a/core/src/main/java/org/apache/calcite/sql/SqlBinaryStringLiteral.java b/core/src/main/java/org/apache/calcite/sql/SqlBinaryStringLiteral.java
index a2f2433..9c225da 100644
--- a/core/src/main/java/org/apache/calcite/sql/SqlBinaryStringLiteral.java
+++ b/core/src/main/java/org/apache/calcite/sql/SqlBinaryStringLiteral.java
@@ -26,8 +26,8 @@ import java.util.List;
 /**
  * A binary (or hexadecimal) string literal.
  *
- * <p>The {@link #value} field is a {@link BitString} and {@link #typeName} is
- * {@link SqlTypeName#BINARY}.
+ * <p>The {@link #value} field is a {@link BitString} and {@link #getTypeName()}
+ * is {@link SqlTypeName#BINARY}.
  */
 public class SqlBinaryStringLiteral extends SqlAbstractStringLiteral {
 
@@ -41,9 +41,11 @@ public class SqlBinaryStringLiteral extends SqlAbstractStringLiteral {
 
   //~ Methods ----------------------------------------------------------------
 
-  /**
-   * @return the underlying BitString
+  /** Returns the underlying {@link BitString}.
+   *
+   * @deprecated Use {@link SqlLiteral#getValueAs getValueAs(BitString.class)}
    */
+  @Deprecated // to be removed before 2.0
   public BitString getBitString() {
     return (BitString) value;
   }
@@ -64,7 +66,7 @@ public class SqlBinaryStringLiteral extends SqlAbstractStringLiteral {
     return new SqlBinaryStringLiteral(
         BitString.concat(
             Util.transform(literals,
-                literal -> ((SqlBinaryStringLiteral) literal).getBitString())),
+                literal -> literal.getValueAs(BitString.class))),
         literals.get(0).getParserPosition());
   }
 }
diff --git a/core/src/main/java/org/apache/calcite/sql/SqlCall.java b/core/src/main/java/org/apache/calcite/sql/SqlCall.java
index e425e16..8678c7e 100755
--- a/core/src/main/java/org/apache/calcite/sql/SqlCall.java
+++ b/core/src/main/java/org/apache/calcite/sql/SqlCall.java
@@ -183,9 +183,9 @@ public abstract class SqlCall extends SqlNode {
   }
 
   /**
-   * Test to see if it is the function COUNT(*)
+   * Returns whether it is the function {@code COUNT(*)}.
    *
-   * @return boolean true if function call to COUNT(*)
+   * @return true if function call to COUNT(*)
    */
   public boolean isCountStar() {
     SqlOperator sqlOperator = getOperator();
diff --git a/core/src/main/java/org/apache/calcite/sql/SqlCharStringLiteral.java b/core/src/main/java/org/apache/calcite/sql/SqlCharStringLiteral.java
index bf3e43b..15c7c6d 100644
--- a/core/src/main/java/org/apache/calcite/sql/SqlCharStringLiteral.java
+++ b/core/src/main/java/org/apache/calcite/sql/SqlCharStringLiteral.java
@@ -41,17 +41,20 @@ public class SqlCharStringLiteral extends SqlAbstractStringLiteral {
   //~ Methods ----------------------------------------------------------------
 
   /**
-   * @return the underlying NlsString
+   * Returns the underlying NlsString.
+   *
+   * @deprecated Use {@link #getValueAs getValueAs(NlsString.class)}
    */
+  @Deprecated // to be removed before 2.0
   public NlsString getNlsString() {
     return (NlsString) value;
   }
 
   /**
-   * @return the collation
+   * Returns the collation.
    */
   public SqlCollation getCollation() {
-    return getNlsString().getCollation();
+    return ((NlsString) value).getCollation();
   }
 
   @Override public SqlCharStringLiteral clone(SqlParserPos pos) {
@@ -77,7 +80,7 @@ public class SqlCharStringLiteral extends SqlAbstractStringLiteral {
     return new SqlCharStringLiteral(
         NlsString.concat(
             Util.transform(literals,
-                literal -> ((SqlCharStringLiteral) literal).getNlsString())),
+                literal -> literal.getValueAs(NlsString.class))),
         literals.get(0).getParserPosition());
   }
 }
diff --git a/core/src/main/java/org/apache/calcite/sql/SqlCollation.java b/core/src/main/java/org/apache/calcite/sql/SqlCollation.java
index f1e3366..cadc89e 100644
--- a/core/src/main/java/org/apache/calcite/sql/SqlCollation.java
+++ b/core/src/main/java/org/apache/calcite/sql/SqlCollation.java
@@ -301,9 +301,9 @@ public class SqlCollation implements Serializable {
   }
 
   /**
-   * @return the {@link Collator} to compare values having the current collation,
-   * or {@code null} if no specific {@link Collator} is needed, in which case
-   * {@link String#compareTo} will be used.
+   * Returns the {@link Collator} to compare values having the current
+   * collation, or {@code null} if no specific {@link Collator} is needed, in
+   * which case {@link String#compareTo} will be used.
    */
   public Collator getCollator() {
     return null;
diff --git a/core/src/main/java/org/apache/calcite/sql/SqlDelete.java b/core/src/main/java/org/apache/calcite/sql/SqlDelete.java
index d4aa732..e9772f1 100644
--- a/core/src/main/java/org/apache/calcite/sql/SqlDelete.java
+++ b/core/src/main/java/org/apache/calcite/sql/SqlDelete.java
@@ -86,14 +86,14 @@ public class SqlDelete extends SqlCall {
   }
 
   /**
-   * @return the identifier for the target table of the deletion
+   * Returns the identifier for the target table of the deletion.
    */
   public SqlNode getTargetTable() {
     return targetTable;
   }
 
   /**
-   * @return the alias for the target table of the deletion
+   * Returns the alias for the target table of the deletion.
    */
   public SqlIdentifier getAlias() {
     return alias;
diff --git a/core/src/main/java/org/apache/calcite/sql/SqlExplain.java b/core/src/main/java/org/apache/calcite/sql/SqlExplain.java
index caa434f..79ccc5f 100644
--- a/core/src/main/java/org/apache/calcite/sql/SqlExplain.java
+++ b/core/src/main/java/org/apache/calcite/sql/SqlExplain.java
@@ -102,14 +102,14 @@ public class SqlExplain extends SqlCall {
   }
 
   /**
-   * @return the underlying SQL statement to be explained
+   * Returns the underlying SQL statement to be explained.
    */
   public SqlNode getExplicandum() {
     return explicandum;
   }
 
   /**
-   * @return detail level to be generated
+   * Return the detail level to be generated.
    */
   public SqlExplainLevel getDetailLevel() {
     return detailLevel.symbolValue(SqlExplainLevel.class);
@@ -123,21 +123,21 @@ public class SqlExplain extends SqlCall {
   }
 
   /**
-   * @return the number of dynamic parameters in the statement
+   * Returns the number of dynamic parameters in the statement.
    */
   public int getDynamicParamCount() {
     return dynamicParameterCount;
   }
 
   /**
-   * @return whether physical plan implementation should be returned
+   * Returns whether physical plan implementation should be returned.
    */
   public boolean withImplementation() {
     return getDepth() == Depth.PHYSICAL;
   }
 
   /**
-   * @return whether type should be returned
+   * Returns whether type should be returned.
    */
   public boolean withType() {
     return getDepth() == Depth.TYPE;
diff --git a/core/src/main/java/org/apache/calcite/sql/SqlFunction.java b/core/src/main/java/org/apache/calcite/sql/SqlFunction.java
index 55706d4..fa6b180 100644
--- a/core/src/main/java/org/apache/calcite/sql/SqlFunction.java
+++ b/core/src/main/java/org/apache/calcite/sql/SqlFunction.java
@@ -53,9 +53,9 @@ public class SqlFunction extends SqlOperator {
   //~ Constructors -----------------------------------------------------------
 
   /**
-   * Creates a new SqlFunction for a call to a builtin function.
+   * Creates a new SqlFunction for a call to a built-in function.
    *
-   * @param name                 Name of builtin function
+   * @param name                 Name of built-in function
    * @param kind                 kind of operator implemented by function
    * @param returnTypeInference  strategy to use for return type inference
    * @param operandTypeInference strategy to use for parameter type inference
@@ -70,7 +70,7 @@ public class SqlFunction extends SqlOperator {
       SqlOperandTypeChecker operandTypeChecker,
       SqlFunctionCategory category) {
     // We leave sqlIdentifier as null to indicate
-    // that this is a builtin.  Same for paramTypes.
+    // that this is a built-in.  Same for paramTypes.
     this(name, null, kind, returnTypeInference, operandTypeInference,
         operandTypeChecker, null, category);
 
@@ -80,7 +80,7 @@ public class SqlFunction extends SqlOperator {
 
   /**
    * Creates a placeholder SqlFunction for an invocation of a function with a
-   * possibly qualified name. This name must be resolved into either a builtin
+   * possibly qualified name. This name must be resolved into either a built-in
    * function or a user-defined function.
    *
    * @param sqlIdentifier        possibly qualified identifier for function
@@ -130,7 +130,8 @@ public class SqlFunction extends SqlOperator {
   }
 
   /**
-   * @return fully qualified name of function, or null for a builtin function
+   * Returns the fully-qualified name of function, or null for a built-in
+   * function.
    */
   public SqlIdentifier getSqlIdentifier() {
     return sqlIdentifier;
@@ -144,7 +145,7 @@ public class SqlFunction extends SqlOperator {
   }
 
   /**
-   * @return array of parameter types, or null for builtin function
+   * Return array of parameter types, or null for built-in function.
    */
   public List<RelDataType> getParamTypes() {
     return paramTypes;
@@ -168,7 +169,7 @@ public class SqlFunction extends SqlOperator {
   }
 
   /**
-   * @return function category
+   * Return function category.
    */
   @Nonnull public SqlFunctionCategory getFunctionType() {
     return this.category;
diff --git a/core/src/main/java/org/apache/calcite/sql/SqlInsert.java b/core/src/main/java/org/apache/calcite/sql/SqlInsert.java
index 722d0ce..b3dccd7 100644
--- a/core/src/main/java/org/apache/calcite/sql/SqlInsert.java
+++ b/core/src/main/java/org/apache/calcite/sql/SqlInsert.java
@@ -105,14 +105,14 @@ public class SqlInsert extends SqlCall {
   }
 
   /**
-   * @return the identifier for the target table of the insertion
+   * Return the identifier for the target table of the insertion.
    */
   public SqlNode getTargetTable() {
     return targetTable;
   }
 
   /**
-   * @return the source expression for the data to be inserted
+   * Returns the source expression for the data to be inserted.
    */
   public SqlNode getSource() {
     return source;
@@ -123,8 +123,8 @@ public class SqlInsert extends SqlCall {
   }
 
   /**
-   * @return the list of target column names, or null for all columns in the
-   * target table
+   * Returns the list of target column names, or null for all columns in the
+   * target table.
    */
   public SqlNodeList getTargetColumnList() {
     return columnList;
diff --git a/core/src/main/java/org/apache/calcite/sql/SqlIntervalQualifier.java b/core/src/main/java/org/apache/calcite/sql/SqlIntervalQualifier.java
index 20baf1e..032b5db 100644
--- a/core/src/main/java/org/apache/calcite/sql/SqlIntervalQualifier.java
+++ b/core/src/main/java/org/apache/calcite/sql/SqlIntervalQualifier.java
@@ -328,7 +328,7 @@ public class SqlIntervalQualifier extends SqlNode {
   }
 
   /**
-   * @return 1 or -1
+   * Returns 1 or -1.
    */
   public int getIntervalSign(String value) {
     int sign = 1; // positive until proven otherwise
diff --git a/core/src/main/java/org/apache/calcite/sql/SqlJdbcFunctionCall.java b/core/src/main/java/org/apache/calcite/sql/SqlJdbcFunctionCall.java
index fb727b8..c04babc 100644
--- a/core/src/main/java/org/apache/calcite/sql/SqlJdbcFunctionCall.java
+++ b/core/src/main/java/org/apache/calcite/sql/SqlJdbcFunctionCall.java
@@ -528,28 +528,28 @@ public class SqlJdbcFunctionCall extends SqlFunction {
   }
 
   /**
-   * @see java.sql.DatabaseMetaData#getNumericFunctions
+   * As {@link java.sql.DatabaseMetaData#getNumericFunctions}.
    */
   public static String getNumericFunctions() {
     return NUMERIC_FUNCTIONS;
   }
 
   /**
-   * @see java.sql.DatabaseMetaData#getStringFunctions
+   * As {@link java.sql.DatabaseMetaData#getStringFunctions}.
    */
   public static String getStringFunctions() {
     return STRING_FUNCTIONS;
   }
 
   /**
-   * @see java.sql.DatabaseMetaData#getTimeDateFunctions
+   * As {@link java.sql.DatabaseMetaData#getTimeDateFunctions}.
    */
   public static String getTimeDateFunctions() {
     return TIME_DATE_FUNCTIONS;
   }
 
   /**
-   * @see java.sql.DatabaseMetaData#getSystemFunctions
+   * As {@link java.sql.DatabaseMetaData#getSystemFunctions}.
    */
   public static String getSystemFunctions() {
     return SYSTEM_FUNCTIONS;
@@ -657,7 +657,7 @@ public class SqlJdbcFunctionCall extends SqlFunction {
   }
 
   /**
-   * Lookup table between JDBC functions and internal representation
+   * Lookup table between JDBC functions and internal representation.
    */
   private static class JdbcToInternalLookupTable {
     /**
diff --git a/core/src/main/java/org/apache/calcite/sql/SqlJsonConstructorNullClause.java b/core/src/main/java/org/apache/calcite/sql/SqlJsonConstructorNullClause.java
index 6415fd7..08f9e4c 100644
--- a/core/src/main/java/org/apache/calcite/sql/SqlJsonConstructorNullClause.java
+++ b/core/src/main/java/org/apache/calcite/sql/SqlJsonConstructorNullClause.java
@@ -17,7 +17,7 @@
 package org.apache.calcite.sql;
 
 /**
- * Indicating that how do Json constructors handle null
+ * Indicating how JSON constructors handle null.
  */
 public enum SqlJsonConstructorNullClause {
   NULL_ON_NULL("NULL ON NULL"),
diff --git a/core/src/main/java/org/apache/calcite/sql/SqlKind.java b/core/src/main/java/org/apache/calcite/sql/SqlKind.java
index 247c985..adb3223 100644
--- a/core/src/main/java/org/apache/calcite/sql/SqlKind.java
+++ b/core/src/main/java/org/apache/calcite/sql/SqlKind.java
@@ -114,14 +114,10 @@ public enum SqlKind {
    */
   JOIN,
 
-  /**
-   * Identifier
-   */
+  /** An identifier. */
   IDENTIFIER,
 
-  /**
-   * A literal.
-   */
+  /** A literal. */
   LITERAL,
 
   /**
@@ -131,49 +127,31 @@ public enum SqlKind {
    */
   OTHER_FUNCTION,
 
-  /**
-   * POSITION Function
-   */
+  /** POSITION function. */
   POSITION,
 
-  /**
-   * EXPLAIN statement
-   */
+  /** EXPLAIN statement. */
   EXPLAIN,
 
-  /**
-   * DESCRIBE SCHEMA statement
-   */
+  /** DESCRIBE SCHEMA statement. */
   DESCRIBE_SCHEMA,
 
-  /**
-   * DESCRIBE TABLE statement
-   */
+  /** DESCRIBE TABLE statement. */
   DESCRIBE_TABLE,
 
-  /**
-   * INSERT statement
-   */
+  /** INSERT statement. */
   INSERT,
 
-  /**
-   * DELETE statement
-   */
+  /** DELETE statement. */
   DELETE,
 
-  /**
-   * UPDATE statement
-   */
+  /** UPDATE statement. */
   UPDATE,
 
-  /**
-   * "ALTER scope SET option = value" statement.
-   */
+  /** "{@code ALTER scope SET option = value}" statement. */
   SET_OPTION,
 
-  /**
-   * A dynamic parameter.
-   */
+  /** A dynamic parameter. */
   DYNAMIC_PARAM,
 
   /**
@@ -191,347 +169,239 @@ public enum SqlKind {
   /** Item in WITH clause. */
   WITH_ITEM,
 
-  /** Item expression */
+  /** Item expression. */
   ITEM,
 
-  /**
-   * Union
-   */
+  /** {@code UNION} relational operator. */
   UNION,
 
-  /**
-   * Except
-   */
+  /** {@code EXCEPT} relational operator (known as {@code MINUS} in some SQL
+   * dialects). */
   EXCEPT,
 
-  /**
-   * Intersect
-   */
+  /** {@code INTERSECT} relational operator. */
   INTERSECT,
 
-  /**
-   * AS operator
-   */
+  /** {@code AS} operator. */
   AS,
 
-  /**
-   * ARGUMENT_ASSIGNMENT operator, {@code =>}
-   */
+  /** Argument assignment operator, {@code =>}. */
   ARGUMENT_ASSIGNMENT,
 
-  /**
-   * DEFAULT operator
-   */
+  /** {@code DEFAULT} operator. */
   DEFAULT,
 
-  /**
-   * OVER operator
-   */
+  /** {@code OVER} operator. */
   OVER,
 
-  /**
-   * RESPECT NULLS operator
-   */
+  /** {@code RESPECT NULLS} operator. */
   RESPECT_NULLS("RESPECT NULLS"),
 
-  /**
-   * IGNORE NULLS operator
-   */
+  /** {@code IGNORE NULLS} operator. */
   IGNORE_NULLS("IGNORE NULLS"),
 
-  /**
-   * FILTER operator
-   */
+  /** {@code FILTER} operator. */
   FILTER,
 
-  /**
-   * WITHIN_GROUP operator
-   */
+  /** {@code WITHIN GROUP} operator. */
   WITHIN_GROUP,
 
-  /**
-   * Window specification
-   */
+  /** Window specification. */
   WINDOW,
 
-  /**
-   * MERGE statement
-   */
+  /** MERGE statement. */
   MERGE,
 
-  /**
-   * TABLESAMPLE operator
-   */
+  /** TABLESAMPLE relational operator. */
   TABLESAMPLE,
 
-  /**
-   * MATCH_RECOGNIZE clause
-   */
+  /** MATCH_RECOGNIZE clause. */
   MATCH_RECOGNIZE,
 
-  /**
-   * SNAPSHOT operator
-   */
+  /** SNAPSHOT operator. */
   SNAPSHOT,
 
   // binary operators
 
-  /**
-   * The arithmetic multiplication operator, "*".
-   */
+  /** Arithmetic multiplication operator, "*". */
   TIMES,
 
-  /**
-   * The arithmetic division operator, "/".
-   */
+  /** Arithmetic division operator, "/". */
   DIVIDE,
 
-  /**
-   * The arithmetic remainder operator, "MOD" (and "%" in some dialects).
-   */
+  /** Arithmetic remainder operator, "MOD" (and "%" in some dialects). */
   MOD,
 
   /**
-   * The arithmetic plus operator, "+".
+   * Arithmetic plus operator, "+".
    *
    * @see #PLUS_PREFIX
    */
   PLUS,
 
   /**
-   * The arithmetic minus operator, "-".
+   * Arithmetic minus operator, "-".
    *
    * @see #MINUS_PREFIX
    */
   MINUS,
 
   /**
-   * the alternation operator in a pattern expression within a match_recognize clause
+   * Alternation operator in a pattern expression within a
+   * {@code MATCH_RECOGNIZE} clause.
    */
   PATTERN_ALTER,
 
   /**
-   * the concatenation operator in a pattern expression within a match_recognize clause
+   * Concatenation operator in a pattern expression within a
+   * {@code MATCH_RECOGNIZE} clause.
    */
   PATTERN_CONCAT,
 
   // comparison operators
 
-  /**
-   * The "IN" operator.
-   */
+  /** {@code IN} operator. */
   IN,
 
   /**
-   * The "NOT IN" operator.
+   * {@code NOT IN} operator.
    *
    * <p>Only occurs in SqlNode trees. Is expanded to NOT(IN ...) before
    * entering RelNode land.
    */
   NOT_IN("NOT IN"),
 
-  /**
-   * The less-than operator, "&lt;".
-   */
+  /** Less-than operator, "&lt;". */
   LESS_THAN("<"),
 
-  /**
-   * The greater-than operator, "&gt;".
-   */
+  /** Greater-than operator, "&gt;". */
   GREATER_THAN(">"),
 
-  /**
-   * The less-than-or-equal operator, "&lt;=".
-   */
+  /** Less-than-or-equal operator, "&lt;=". */
   LESS_THAN_OR_EQUAL("<="),
 
-  /**
-   * The greater-than-or-equal operator, "&gt;=".
-   */
+  /** Greater-than-or-equal operator, "&gt;=". */
   GREATER_THAN_OR_EQUAL(">="),
 
-  /**
-   * The equals operator, "=".
-   */
+  /** Equals operator, "=". */
   EQUALS("="),
 
   /**
-   * The not-equals operator, "&#33;=" or "&lt;&gt;".
+   * Not-equals operator, "&#33;=" or "&lt;&gt;".
    * The latter is standard, and preferred.
    */
   NOT_EQUALS("<>"),
 
-  /**
-   * The is-distinct-from operator.
-   */
+  /** {@code IS DISTINCT FROM} operator. */
   IS_DISTINCT_FROM,
 
-  /**
-   * The is-not-distinct-from operator.
-   */
+  /** {@code IS NOT DISTINCT FROM} operator. */
   IS_NOT_DISTINCT_FROM,
 
-  /**
-   * The logical "OR" operator.
-   */
+  /** Logical "OR" operator. */
   OR,
 
-  /**
-   * The logical "AND" operator.
-   */
+  /** Logical "AND" operator. */
   AND,
 
   // other infix
 
-  /**
-   * Dot
-   */
+  /** Dot. */
   DOT,
 
-  /**
-   * The "OVERLAPS" operator for periods.
-   */
+  /** {@code OVERLAPS} operator for periods. */
   OVERLAPS,
 
-  /**
-   * The "CONTAINS" operator for periods.
-   */
+  /** {@code CONTAINS} operator for periods. */
   CONTAINS,
 
-  /**
-   * The "PRECEDES" operator for periods.
-   */
+  /** {@code PRECEDES} operator for periods. */
   PRECEDES,
 
-  /**
-   * The "IMMEDIATELY PRECEDES" operator for periods.
-   */
+  /** {@code IMMEDIATELY PRECEDES} operator for periods. */
   IMMEDIATELY_PRECEDES("IMMEDIATELY PRECEDES"),
 
-  /**
-   * The "SUCCEEDS" operator for periods.
-   */
+  /** {@code SUCCEEDS} operator for periods. */
   SUCCEEDS,
 
-  /**
-   * The "IMMEDIATELY SUCCEEDS" operator for periods.
-   */
+  /** {@code IMMEDIATELY SUCCEEDS} operator for periods. */
   IMMEDIATELY_SUCCEEDS("IMMEDIATELY SUCCEEDS"),
 
-  /**
-   * The "EQUALS" operator for periods.
-   */
+  /** {@code EQUALS} operator for periods. */
   PERIOD_EQUALS("EQUALS"),
 
-  /**
-   * The "LIKE" operator.
-   */
+  /** {@code LIKE} operator. */
   LIKE,
 
-  /**
-   * The "SIMILAR" operator.
-   */
+  /** {@code SIMILAR} operator. */
   SIMILAR,
 
-  /**
-   * The "~" operator.
-   */
+  /** {@code ~} operator (for POSIX-style regular expressions). */
   POSIX_REGEX_CASE_SENSITIVE,
 
-  /**
-   * The "~*" operator.
-   */
+  /** {@code ~*} operator (for case-insensitive POSIX-style regular
+   * expressions). */
   POSIX_REGEX_CASE_INSENSITIVE,
 
-  /**
-   * The "BETWEEN" operator.
-   */
+  /** {@code BETWEEN} operator. */
   BETWEEN,
 
-  /**
-   * A "CASE" expression.
-   */
+  /** {@code CASE} expression. */
   CASE,
 
-  /**
-   * The "NULLIF" operator.
-   */
+  /** {@code NULLIF} operator. */
   NULLIF,
 
-  /**
-   * The "COALESCE" operator.
-   */
+  /** {@code COALESCE} operator. */
   COALESCE,
 
-  /**
-   * The "DECODE" function (Oracle).
-   */
+  /** {@code DECODE} function (Oracle). */
   DECODE,
 
-  /**
-   * The "NVL" function (Oracle).
-   */
+  /** {@code NVL} function (Oracle). */
   NVL,
 
-  /**
-   * The "GREATEST" function (Oracle).
-   */
+  /** {@code GREATEST} function (Oracle). */
   GREATEST,
 
-  /**
-   * The "LEAST" function (Oracle).
-   */
+  /** {@code LEAST} function (Oracle). */
   LEAST,
 
-  /**
-   * The "TIMESTAMP_ADD" function (ODBC, SQL Server, MySQL).
-   */
+  /** {@code TIMESTAMP_ADD} function (ODBC, SQL Server, MySQL). */
   TIMESTAMP_ADD,
 
-  /**
-   * The "TIMESTAMP_DIFF" function (ODBC, SQL Server, MySQL).
-   */
+  /** {@code TIMESTAMP_DIFF} function (ODBC, SQL Server, MySQL). */
   TIMESTAMP_DIFF,
 
   // prefix operators
 
-  /**
-   * The logical "NOT" operator.
-   */
+  /** Logical {@code NOT} operator. */
   NOT,
 
   /**
-   * The unary plus operator, as in "+1".
+   * Unary plus operator, as in "+1".
    *
    * @see #PLUS
    */
   PLUS_PREFIX,
 
   /**
-   * The unary minus operator, as in "-1".
+   * Unary minus operator, as in "-1".
    *
    * @see #MINUS
    */
   MINUS_PREFIX,
 
-  /**
-   * The "EXISTS" operator.
-   */
+  /** {@code EXISTS} operator. */
   EXISTS,
 
-  /**
-   * The "SOME" quantification operator (also called "ANY").
-   */
+  /** {@code SOME} quantification operator (also called {@code ANY}). */
   SOME,
 
-  /**
-   * The "ALL" quantification operator.
-   */
+  /** {@code ALL} quantification operator. */
   ALL,
 
-  /**
-   * The "VALUES" operator.
-   */
+  /** {@code VALUES} relational operator. */
   VALUES,
 
   /**
@@ -546,110 +416,87 @@ public enum SqlKind {
    */
   SCALAR_QUERY,
 
-  /**
-   * ProcedureCall
-   */
+  /** Procedure call. */
   PROCEDURE_CALL,
 
-  /**
-   * NewSpecification
-   */
+  /** New specification. */
   NEW_SPECIFICATION,
 
+  // special functions in MATCH_RECOGNIZE
 
-  /**
-   * Special functions in MATCH_RECOGNIZE.
-   */
+  /** {@code FINAL} operator in {@code MATCH_RECOGNIZE}. */
   FINAL,
 
+  /** {@code FINAL} operator in {@code MATCH_RECOGNIZE}. */
   RUNNING,
 
+  /** {@code PREV} operator in {@code MATCH_RECOGNIZE}. */
   PREV,
 
+  /** {@code NEXT} operator in {@code MATCH_RECOGNIZE}. */
   NEXT,
 
+  /** {@code FIRST} operator in {@code MATCH_RECOGNIZE}. */
   FIRST,
 
+  /** {@code LAST} operator in {@code MATCH_RECOGNIZE}. */
   LAST,
 
+  /** {@code CLASSIFIER} operator in {@code MATCH_RECOGNIZE}. */
   CLASSIFIER,
 
+  /** {@code MATCH_NUMBER} operator in {@code MATCH_RECOGNIZE}. */
   MATCH_NUMBER,
 
-  /**
-   * The "SKIP TO FIRST" qualifier of restarting point in a MATCH_RECOGNIZE
-   * clause.
-   */
+  /** {@code SKIP TO FIRST} qualifier of restarting point in a
+   * {@code MATCH_RECOGNIZE} clause. */
   SKIP_TO_FIRST,
 
-  /**
-   * The "SKIP TO LAST" qualifier of restarting point in a MATCH_RECOGNIZE
-   * clause.
-   */
+  /** {@code SKIP TO LAST} qualifier of restarting point in a
+   * {@code MATCH_RECOGNIZE} clause. */
   SKIP_TO_LAST,
 
   // postfix operators
 
-  /**
-   * DESC in ORDER BY. A parse tree, not a true expression.
-   */
+  /** {@code DESC} operator in {@code ORDER BY}. A parse tree, not a true
+   * expression. */
   DESCENDING,
 
-  /**
-   * NULLS FIRST clause in ORDER BY. A parse tree, not a true expression.
-   */
+  /** {@code NULLS FIRST} clause in {@code ORDER BY}. A parse tree, not a true
+   * expression. */
   NULLS_FIRST,
 
-  /**
-   * NULLS LAST clause in ORDER BY. A parse tree, not a true expression.
-   */
+  /** {@code NULLS LAST} clause in {@code ORDER BY}. A parse tree, not a true
+   * expression. */
   NULLS_LAST,
 
-  /**
-   * The "IS TRUE" operator.
-   */
+  /** {@code IS TRUE} operator. */
   IS_TRUE,
 
-  /**
-   * The "IS FALSE" operator.
-   */
+  /** {@code IS FALSE} operator. */
   IS_FALSE,
 
-  /**
-   * The "IS NOT TRUE" operator.
-   */
+  /** {@code IS NOT TRUE} operator. */
   IS_NOT_TRUE,
 
-  /**
-   * The "IS NOT FALSE" operator.
-   */
+  /** {@code IS NOT FALSE} operator. */
   IS_NOT_FALSE,
 
-  /**
-   * The "IS UNKNOWN" operator.
-   */
+  /** {@code IS UNKNOWN} operator. */
   IS_UNKNOWN,
 
-  /**
-   * The "IS NULL" operator.
-   */
+  /** {@code IS NULL} operator. */
   IS_NULL,
 
-  /**
-   * The "IS NOT NULL" operator.
-   */
+  /** {@code IS NOT NULL} operator. */
   IS_NOT_NULL,
 
-  /**
-   * The "PRECEDING" qualifier of an interval end-point in a window
-   * specification.
-   */
+  /** {@code PRECEDING} qualifier of an interval end-point in a window
+   * specification. */
   PRECEDING,
 
-  /**
-   * The "FOLLOWING" qualifier of an interval end-point in a window
-   * specification.
-   */
+  /** {@code FOLLOWING} qualifier of an interval end-point in a window
+   * specification. */
   FOLLOWING,
 
   /**
@@ -668,14 +515,14 @@ public enum SqlKind {
   INPUT_REF,
 
   /**
-   * Reference to an input field, with a qualified name and an identifier
+   * Reference to an input field, with a qualified name and an identifier.
    *
    * <p>(Only used at the RexNode level.)</p>
    */
   TABLE_INPUT_REF,
 
   /**
-   * Reference to an input field, with pattern var as modifier
+   * Reference to an input field, with pattern var as modifier.
    *
    * <p>(Only used at the RexNode level.)</p>
    */
@@ -730,74 +577,46 @@ public enum SqlKind {
    */
   CURRENT_VALUE,
 
-  /**
-   * The "FLOOR" function
-   */
+  /** {@code FLOOR} function. */
   FLOOR,
 
-  /**
-   * The "CEIL" function
-   */
+  /** {@code CEIL} function. */
   CEIL,
 
-  /**
-   * The "TRIM" function.
-   */
+  /** {@code TRIM} function. */
   TRIM,
 
-  /**
-   * The "LTRIM" function (Oracle).
-   */
+  /** {@code LTRIM} function (Oracle). */
   LTRIM,
 
-  /**
-   * The "RTRIM" function (Oracle).
-   */
+  /** {@code RTRIM} function (Oracle). */
   RTRIM,
 
-  /**
-   * The "EXTRACT" function.
-   */
+  /** {@code EXTRACT} function. */
   EXTRACT,
 
-  /**
-   * The "REVERSE" function (SQL Server, MySQL).
-   */
+  /** {@code REVERSE} function (SQL Server, MySQL). */
   REVERSE,
 
-  /**
-   * Call to a function using JDBC function syntax.
-   */
+  /** Call to a function using JDBC function syntax. */
   JDBC_FN,
 
-  /**
-   * The MULTISET value constructor.
-   */
+  /** {@code MULTISET} value constructor. */
   MULTISET_VALUE_CONSTRUCTOR,
 
-  /**
-   * The MULTISET query constructor.
-   */
+  /** {@code MULTISET} query constructor. */
   MULTISET_QUERY_CONSTRUCTOR,
 
-  /**
-   * The JSON value expression.
-   */
+  /** {@code JSON} value expression. */
   JSON_VALUE_EXPRESSION,
 
-  /**
-   * The {@code JSON_ARRAYAGG} aggregate function.
-   */
+  /** {@code JSON_ARRAYAGG} aggregate function. */
   JSON_ARRAYAGG,
 
-  /**
-   * The {@code JSON_OBJECTAGG} aggregate function.
-   */
+  /** {@code JSON_OBJECTAGG} aggregate function. */
   JSON_OBJECTAGG,
 
-  /**
-   * The "UNNEST" operator.
-   */
+  /** {@code UNNEST} operator. */
   UNNEST,
 
   /**
@@ -822,20 +641,15 @@ public enum SqlKind {
    */
   ARRAY_QUERY_CONSTRUCTOR,
 
-  /**
-   * Map Value Constructor, e.g. {@code Map['washington', 1, 'obama', 44]}.
-   */
+  /** MAP value constructor, e.g. {@code MAP ['washington', 1, 'obama', 44]}. */
   MAP_VALUE_CONSTRUCTOR,
 
-  /**
-   * Map Query Constructor, e.g. {@code MAP (SELECT empno, deptno FROM emp)}.
-   */
+  /** MAP query constructor,
+   * e.g. {@code MAP (SELECT empno, deptno FROM emp)}. */
   MAP_QUERY_CONSTRUCTOR,
 
-  /**
-   * CURSOR constructor, for example, <code>select * from
-   * TABLE(udx(CURSOR(select ...), x, y, z))</code>
-   */
+  /** {@code CURSOR} constructor, for example, <code>SELECT * FROM
+   * TABLE(udx(CURSOR(SELECT ...), x, y, z))</code>. */
   CURSOR,
 
   // internal operators (evaluated in validator) 200-299
@@ -877,6 +691,7 @@ public enum SqlKind {
   /** The {@code GROUPING(e, ...)} function. */
   GROUPING,
 
+  // CHECKSTYLE: IGNORE 1
   /** @deprecated Use {@link #GROUPING}. */
   @Deprecated // to be removed before 2.0
   GROUPING_ID,
diff --git a/core/src/main/java/org/apache/calcite/sql/SqlLiteral.java b/core/src/main/java/org/apache/calcite/sql/SqlLiteral.java
index 3c87f43..bd80488 100644
--- a/core/src/main/java/org/apache/calcite/sql/SqlLiteral.java
+++ b/core/src/main/java/org/apache/calcite/sql/SqlLiteral.java
@@ -175,17 +175,13 @@ public class SqlLiteral extends SqlNode {
 
   //~ Methods ----------------------------------------------------------------
 
-  /**
-   * @return value of {@link #typeName}
-   */
+  /** Returns the value of {@link #typeName}. */
   public SqlTypeName getTypeName() {
     return typeName;
   }
 
-  /**
-   * @return whether value is appropriate for its type (we have rules about
-   * these things)
-   */
+  /** Returns whether value is appropriate for its type. (We have rules about
+   * these things!) */
   public static boolean valueMatchesType(
       Object value,
       SqlTypeName typeName) {
@@ -500,7 +496,7 @@ public class SqlLiteral extends SqlNode {
   }
 
   /**
-   * For calc program builder - value may be different than {@link #unparse}
+   * For calc program builder - value may be different than {@link #unparse}.
    * Typical values:
    *
    * <ul>
diff --git a/core/src/main/java/org/apache/calcite/sql/SqlMerge.java b/core/src/main/java/org/apache/calcite/sql/SqlMerge.java
index ac529cf..665897e 100644
--- a/core/src/main/java/org/apache/calcite/sql/SqlMerge.java
+++ b/core/src/main/java/org/apache/calcite/sql/SqlMerge.java
@@ -105,23 +105,17 @@ public class SqlMerge extends SqlCall {
     }
   }
 
-  /**
-   * @return the identifier for the target table of the merge
-   */
+  /** Return the identifier for the target table of this MERGE. */
   public SqlNode getTargetTable() {
     return targetTable;
   }
 
-  /**
-   * @return the alias for the target table of the merge
-   */
+  /** Returns the alias for the target table of this MERGE. */
   public SqlIdentifier getAlias() {
     return alias;
   }
 
-  /**
-   * @return the source for the merge
-   */
+  /** Returns the source query of this MERGE. */
   public SqlNode getSourceTableRef() {
     return source;
   }
@@ -130,23 +124,18 @@ public class SqlMerge extends SqlCall {
     this.source = tableRef;
   }
 
-  /**
-   * @return the update statement for the merge
-   */
+  /** Returns the UPDATE statement for this MERGE. */
   public SqlUpdate getUpdateCall() {
     return updateCall;
   }
 
-  /**
-   * @return the insert statement for the merge
-   */
+  /** Returns the INSERT statement for this MERGE. */
   public SqlInsert getInsertCall() {
     return insertCall;
   }
 
-  /**
-   * @return the condition expression to determine whether to update or insert
-   */
+  /** Returns the condition expression to determine whether to UPDATE or
+   * INSERT. */
   public SqlNode getCondition() {
     return condition;
   }
diff --git a/core/src/main/java/org/apache/calcite/sql/SqlNode.java b/core/src/main/java/org/apache/calcite/sql/SqlNode.java
index 9947f78..ec69cae 100644
--- a/core/src/main/java/org/apache/calcite/sql/SqlNode.java
+++ b/core/src/main/java/org/apache/calcite/sql/SqlNode.java
@@ -64,6 +64,7 @@ public abstract class SqlNode implements Cloneable {
 
   //~ Methods ----------------------------------------------------------------
 
+  // CHECKSTYLE: IGNORE 1
   /** @deprecated Please use {@link #clone(SqlNode)}; this method brings
    * along too much baggage from early versions of Java */
   @Deprecated
diff --git a/core/src/main/java/org/apache/calcite/sql/SqlOperator.java b/core/src/main/java/org/apache/calcite/sql/SqlOperator.java
index 14d9edd..e1c2c2c 100644
--- a/core/src/main/java/org/apache/calcite/sql/SqlOperator.java
+++ b/core/src/main/java/org/apache/calcite/sql/SqlOperator.java
@@ -105,19 +105,13 @@ public abstract class SqlOperator {
    */
   private final int rightPrec;
 
-  /**
-   * used to infer the return type of a call to this operator
-   */
+  /** Used to infer the return type of a call to this operator. */
   private final SqlReturnTypeInference returnTypeInference;
 
-  /**
-   * used to infer types of unknown operands
-   */
+  /** Used to infer types of unknown operands. */
   private final SqlOperandTypeInference operandTypeInference;
 
-  /**
-   * used to validate operand types
-   */
+  /** Used to validate operand types. */
   private final SqlOperandTypeChecker operandTypeChecker;
 
   //~ Constructors -----------------------------------------------------------
@@ -885,17 +879,16 @@ public abstract class SqlOperator {
     }
   }
 
-  /**
-   * @return the return type inference strategy for this operator, or null if
-   * return type inference is implemented by a subclass override
-   */
+  /** Returns the return type inference strategy for this operator, or null if
+   * return type inference is implemented by a subclass override. */
   public SqlReturnTypeInference getReturnTypeInference() {
     return returnTypeInference;
   }
 
   /**
-   * Returns the {@link Strong.Policy} strategy for this operator, or null if there is no particular
-   * strategy, in which case this policy will be deducted from the operator's {@link SqlKind}.
+   * Returns the {@link Strong.Policy} strategy for this operator, or null if
+   * there is no particular strategy, in which case this policy will be deducted
+   * from the operator's {@link SqlKind}.
    *
    * @see Strong
    */
@@ -935,7 +928,7 @@ public abstract class SqlOperator {
 
   /**
    * Returns whether a call to this operator is guaranteed to always return
-   * the same result given the same operands; true is assumed by default
+   * the same result given the same operands; true is assumed by default.
    */
   public boolean isDeterministic() {
     return true;
@@ -954,7 +947,7 @@ public abstract class SqlOperator {
 
   /**
    * Returns whether it is unsafe to cache query plans referencing this
-   * operator; false is assumed by default
+   * operator; false is assumed by default.
    */
   public boolean isDynamicFunction() {
     return false;
diff --git a/core/src/main/java/org/apache/calcite/sql/SqlOperatorBinding.java b/core/src/main/java/org/apache/calcite/sql/SqlOperatorBinding.java
index 72973ee..21d1fd9 100644
--- a/core/src/main/java/org/apache/calcite/sql/SqlOperatorBinding.java
+++ b/core/src/main/java/org/apache/calcite/sql/SqlOperatorBinding.java
@@ -75,16 +75,12 @@ public abstract class SqlOperatorBinding {
     return false;
   }
 
-  /**
-   * @return bound operator
-   */
+  /** Returns the bound operator. */
   public SqlOperator getOperator() {
     return sqlOperator;
   }
 
-  /**
-   * @return factory for type creation
-   */
+  /** Returns the factory for type creation. */
   public RelDataTypeFactory getTypeFactory() {
     return typeFactory;
   }
@@ -169,9 +165,7 @@ public abstract class SqlOperatorBinding {
     throw new UnsupportedOperationException();
   }
 
-  /**
-   * @return the number of bound operands
-   */
+  /** Returns the number of bound operands. */
   public abstract int getOperandCount();
 
   /**
diff --git a/core/src/main/java/org/apache/calcite/sql/SqlUpdate.java b/core/src/main/java/org/apache/calcite/sql/SqlUpdate.java
index a6e9b3e..611e181 100644
--- a/core/src/main/java/org/apache/calcite/sql/SqlUpdate.java
+++ b/core/src/main/java/org/apache/calcite/sql/SqlUpdate.java
@@ -100,16 +100,12 @@ public class SqlUpdate extends SqlCall {
     }
   }
 
-  /**
-   * @return the identifier for the target table of the update
-   */
+  /** Returns the identifier for the target table of this UPDATE. */
   public SqlNode getTargetTable() {
     return targetTable;
   }
 
-  /**
-   * @return the alias for the target table of the update
-   */
+  /** Returns the alias for the target table of this UPDATE. */
   public SqlIdentifier getAlias() {
     return alias;
   }
@@ -118,16 +114,12 @@ public class SqlUpdate extends SqlCall {
     this.alias = alias;
   }
 
-  /**
-   * @return the list of target column names
-   */
+  /** Returns the list of target column names. */
   public SqlNodeList getTargetColumnList() {
     return targetColumnList;
   }
 
-  /**
-   * @return the list of source expressions
-   */
+  /** Returns the list of source expressions. */
   public SqlNodeList getSourceExpressionList() {
     return sourceExpressionList;
   }
diff --git a/core/src/main/java/org/apache/calcite/sql/SqlUtil.java b/core/src/main/java/org/apache/calcite/sql/SqlUtil.java
index 16d463b..18dc6bb 100644
--- a/core/src/main/java/org/apache/calcite/sql/SqlUtil.java
+++ b/core/src/main/java/org/apache/calcite/sql/SqlUtil.java
@@ -135,9 +135,7 @@ public abstract class SqlUtil {
     }
   }
 
-  /**
-   * Converts an SqlNode array to a SqlNodeList
-   */
+  /** Converts a SqlNode array to a SqlNodeList. */
   public static SqlNodeList toNodeList(SqlNode[] operands) {
     SqlNodeList ret = new SqlNodeList(SqlParserPos.ZERO);
     for (SqlNode node : operands) {
@@ -581,6 +579,9 @@ public abstract class SqlUtil {
   }
 
   /**
+   * Filters an iterator of routines, keeping only those that have the required
+   * argument types and names.
+   *
    * @see Glossary#SQL99 SQL:1999 Part 2 Section 10.4 Syntax Rule 6.b.iii.2.B
    */
   private static Iterator<SqlOperator> filterRoutinesByParameterTypeAndName(
@@ -653,6 +654,9 @@ public abstract class SqlUtil {
   }
 
   /**
+   * Filters an iterator of routines, keeping only those with the best match for
+   * the actual argument types.
+   *
    * @see Glossary#SQL99 SQL:1999 Part 2 Section 9.4
    */
   private static Iterator<SqlOperator> filterRoutinesByTypePrecedence(
diff --git a/core/src/main/java/org/apache/calcite/sql/SqlWindow.java b/core/src/main/java/org/apache/calcite/sql/SqlWindow.java
index 68c429a..ceba7e0 100644
--- a/core/src/main/java/org/apache/calcite/sql/SqlWindow.java
+++ b/core/src/main/java/org/apache/calcite/sql/SqlWindow.java
@@ -294,6 +294,7 @@ public class SqlWindow extends SqlCall {
     return windowCall;
   }
 
+  // CHECKSTYLE: IGNORE 1
   /** @see Util#deprecated(Object, boolean) */
   static void checkSpecialLiterals(SqlWindow window, SqlValidator validator) {
     final SqlNode lowerBound = window.getLowerBound();
diff --git a/core/src/main/java/org/apache/calcite/sql/SqlWindowTableFunction.java b/core/src/main/java/org/apache/calcite/sql/SqlWindowTableFunction.java
index 00c715a..309efd5 100644
--- a/core/src/main/java/org/apache/calcite/sql/SqlWindowTableFunction.java
+++ b/core/src/main/java/org/apache/calcite/sql/SqlWindowTableFunction.java
@@ -79,9 +79,9 @@ public class SqlWindowTableFunction extends SqlFunction {
   }
 
   /**
-   * Type-inference strategy whereby the result type of a table function call is a ROW,
-   * which is combined from the operand #0(TABLE parameter)'s schema and two
-   * additional fields:
+   * Type-inference strategy whereby the result type of a table function call is
+   * a ROW, which is combined from the operand #0(TABLE parameter)'s schema and
+   * two additional fields. The fields are as follows:
    *
    * <ol>
    *  <li>window_start: TIMESTAMP type to indicate a window's start.</li>
diff --git a/core/src/main/java/org/apache/calcite/sql/advise/SqlAdvisor.java b/core/src/main/java/org/apache/calcite/sql/advise/SqlAdvisor.java
index b15d19a..a642b28 100644
--- a/core/src/main/java/org/apache/calcite/sql/advise/SqlAdvisor.java
+++ b/core/src/main/java/org/apache/calcite/sql/advise/SqlAdvisor.java
@@ -79,7 +79,7 @@ public class SqlAdvisor {
   //~ Constructors -----------------------------------------------------------
 
   /**
-   * Creates a SqlAdvisor with a validator instance
+   * Creates a SqlAdvisor with a validator instance.
    *
    * @param validator Validator
    * @deprecated use {@link #SqlAdvisor(SqlValidatorWithHints, SqlParser.Config)}
@@ -91,7 +91,8 @@ public class SqlAdvisor {
   }
 
   /**
-   * Creates a SqlAdvisor with a validator instance and given parser configuration
+   * Creates a SqlAdvisor with a validator instance and given parser
+   * configuration.
    *
    * @param validator Validator
    * @param parserConfig parser config
@@ -306,8 +307,8 @@ public class SqlAdvisor {
   }
 
   /**
-   * Gets completion hints for a syntactically correct sql statement with dummy
-   * SqlIdentifier
+   * Gets completion hints for a syntactically correct SQL statement with dummy
+   * {@link SqlIdentifier}.
    *
    * @param sql A syntactically correct sql statement for which to retrieve
    *            completion hints
@@ -505,11 +506,12 @@ public class SqlAdvisor {
 
   /**
    * Turns a partially completed or syntactically incorrect sql statement into
-   * a simplified, valid one that can be passed into getCompletionHints()
+   * a simplified, valid one that can be passed into
+   * {@link #getCompletionHints(String, SqlParserPos)}.
    *
-   * @param sql    A partial or syntactically incorrect sql statement
-   * @param cursor to indicate column position in the query at which
-   *               completion hints need to be retrieved.
+   * @param sql    A partial or syntactically incorrect SQL statement
+   * @param cursor Indicates the position in the query at which
+   *               completion hints need to be retrieved
    * @return a completed, valid (and possibly simplified SQL statement
    */
   public String simplifySql(String sql, int cursor) {
@@ -518,7 +520,7 @@ public class SqlAdvisor {
   }
 
   /**
-   * Return an array of SQL reserved and keywords
+   * Returns an array of SQL reserved and keywords.
    *
    * @return an of SQL reserved and keywords
    */
@@ -604,10 +606,7 @@ public class SqlAdvisor {
 
   //~ Inner Classes ----------------------------------------------------------
 
-  /**
-   * An inner class that represents error message text and position info of a
-   * validator or parser exception
-   */
+  /** Text and position info of a validator or parser exception. */
   public class ValidateErrorInfo {
     private int startLineNum;
     private int startColumnNum;
@@ -669,37 +668,27 @@ public class SqlAdvisor {
       this.errorMsg = errorMsg;
     }
 
-    /**
-     * @return 1-based starting line number
-     */
+    /** Returns 1-based starting line number. */
     public int getStartLineNum() {
       return startLineNum;
     }
 
-    /**
-     * @return 1-based starting column number
-     */
+    /** Returns 1-based starting column number. */
     public int getStartColumnNum() {
       return startColumnNum;
     }
 
-    /**
-     * @return 1-based end line number
-     */
+    /** Returns 1-based end line number. */
     public int getEndLineNum() {
       return endLineNum;
     }
 
-    /**
-     * @return 1-based end column number
-     */
+    /** Returns 1-based end column number. */
     public int getEndColumnNum() {
       return endColumnNum;
     }
 
-    /**
-     * @return error message
-     */
+    /** Returns the error message. */
     public String getMessage() {
       return errorMsg;
     }
diff --git a/core/src/main/java/org/apache/calcite/sql/advise/SqlAdvisorHint2.java b/core/src/main/java/org/apache/calcite/sql/advise/SqlAdvisorHint2.java
index a829f9f..bc073a4 100644
--- a/core/src/main/java/org/apache/calcite/sql/advise/SqlAdvisorHint2.java
+++ b/core/src/main/java/org/apache/calcite/sql/advise/SqlAdvisorHint2.java
@@ -23,7 +23,7 @@ import org.apache.calcite.sql.validate.SqlMoniker;
  * {@link SqlAdvisor#getCompletionHints (String, int, String[])}.
  */
 public class SqlAdvisorHint2 extends SqlAdvisorHint {
-  /** Replacement string */
+  /** Replacement string. */
   public final String replacement;
 
   public SqlAdvisorHint2(String id, String[] names, String type, String replacement) {
diff --git a/core/src/main/java/org/apache/calcite/sql/advise/SqlSimpleParser.java b/core/src/main/java/org/apache/calcite/sql/advise/SqlSimpleParser.java
index 2b61b6d..7e98225 100644
--- a/core/src/main/java/org/apache/calcite/sql/advise/SqlSimpleParser.java
+++ b/core/src/main/java/org/apache/calcite/sql/advise/SqlSimpleParser.java
@@ -34,33 +34,28 @@ import java.util.Map;
 public class SqlSimpleParser {
   //~ Enums ------------------------------------------------------------------
 
+  /** Token. */
   enum TokenType {
     // keywords
     SELECT, FROM, JOIN, ON, USING, WHERE, GROUP, HAVING, ORDER, BY,
 
     UNION, INTERSECT, EXCEPT, MINUS,
 
-    /**
-     * left parenthesis
-     */
+    /** Left parenthesis. */
     LPAREN {
       public String sql() {
         return "(";
       }
     },
 
-    /**
-     * right parenthesis
-     */
+    /** Right parenthesis. */
     RPAREN {
       public String sql() {
         return ")";
       }
     },
 
-    /**
-     * identifier, or indeed any miscellaneous sequence of characters
-     */
+    /** Identifier, or indeed any miscellaneous sequence of characters. */
     ID,
 
     /**
@@ -96,10 +91,10 @@ public class SqlSimpleParser {
   //~ Constructors -----------------------------------------------------------
 
   /**
-   * Creates a SqlSimpleParser
+   * Creates a SqlSimpleParser.
    *
    * @param hintToken Hint token
-   * @deprecated
+   * @deprecated Use {@link #SqlSimpleParser(String, SqlParser.Config)}
    */
   @Deprecated // to be removed before 2.0
   public SqlSimpleParser(String hintToken) {
@@ -107,7 +102,7 @@ public class SqlSimpleParser {
   }
 
   /**
-   * Creates a SqlSimpleParser
+   * Creates a SqlSimpleParser.
    *
    * @param hintToken Hint token
    * @param parserConfig parser configuration
@@ -142,8 +137,8 @@ public class SqlSimpleParser {
   }
 
   /**
-   * Turns a partially completed or syntactically incorrect sql statement into
-   * a simplified, valid one that can be validated
+   * Turns a partially completed or syntactically incorrect SQL statement into a
+   * simplified, valid one that can be validated.
    *
    * @param sql A partial or syntactically incorrect sql statement
    * @return a completed, valid (and possibly simplified) SQL statement
@@ -260,6 +255,7 @@ public class SqlSimpleParser {
 
   //~ Inner Classes ----------------------------------------------------------
 
+  /** Tokenizer. */
   public static class Tokenizer {
     private static final Map<String, TokenType> TOKEN_TYPES = new HashMap<>();
 
@@ -444,6 +440,7 @@ public class SqlSimpleParser {
     }
   }
 
+  /** Token. */
   public static class Token {
     private final TokenType type;
     private final String s;
@@ -470,6 +467,7 @@ public class SqlSimpleParser {
     }
   }
 
+  /** Token representing an identifier. */
   public static class IdToken extends Token {
     public IdToken(TokenType type, String s) {
       super(type, s);
@@ -477,6 +475,7 @@ public class SqlSimpleParser {
     }
   }
 
+  /** Token representing a query. */
   static class Query extends Token {
     private final List<Token> tokenList;
 
diff --git a/core/src/main/java/org/apache/calcite/sql/dialect/BigQuerySqlDialect.java b/core/src/main/java/org/apache/calcite/sql/dialect/BigQuerySqlDialect.java
index 7451215..af2e855 100644
--- a/core/src/main/java/org/apache/calcite/sql/dialect/BigQuerySqlDialect.java
+++ b/core/src/main/java/org/apache/calcite/sql/dialect/BigQuerySqlDialect.java
@@ -246,9 +246,11 @@ public class BigQuerySqlDialect extends SqlDialect {
     }
   }
 
-  /** BigQuery data type reference:
+  /** {@inheritDoc}
+   *
+   * <p>BigQuery data type reference:
    * <a href="https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types">
-   * BigQuery Standard SQL Data Types</a>
+   * BigQuery Standard SQL Data Types</a>.
    */
   @Override public SqlNode getCastSpec(final RelDataType type) {
     if (type instanceof BasicSqlType) {
diff --git a/core/src/main/java/org/apache/calcite/sql/fun/SqlCase.java b/core/src/main/java/org/apache/calcite/sql/fun/SqlCase.java
index b0b004e..b2d737a 100644
--- a/core/src/main/java/org/apache/calcite/sql/fun/SqlCase.java
+++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlCase.java
@@ -59,7 +59,7 @@ public class SqlCase extends SqlCall {
   }
 
   /**
-   * Creates a call to the switched form of the case operator, viz:
+   * Creates a call to the switched form of the CASE operator. For example:
    *
    * <blockquote><code>CASE value<br>
    * WHEN whenList[0] THEN thenList[0]<br>
diff --git a/core/src/main/java/org/apache/calcite/sql/fun/SqlLiteralChainOperator.java b/core/src/main/java/org/apache/calcite/sql/fun/SqlLiteralChainOperator.java
index 0aba5c0..61a9978 100644
--- a/core/src/main/java/org/apache/calcite/sql/fun/SqlLiteralChainOperator.java
+++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlLiteralChainOperator.java
@@ -166,7 +166,7 @@ public class SqlLiteralChainOperator extends SqlSpecialOperator {
         writer.newlineAndIndent();
       }
       if (rand instanceof SqlCharStringLiteral) {
-        NlsString nls = ((SqlCharStringLiteral) rand).getNlsString();
+        final NlsString nls = rand.getValueAs(NlsString.class);
         if (operand.i == 0) {
           collation = nls.getCollation();
 
diff --git a/core/src/main/java/org/apache/calcite/sql/fun/SqlStdOperatorTable.java b/core/src/main/java/org/apache/calcite/sql/fun/SqlStdOperatorTable.java
index 3a6027d..46f2208 100644
--- a/core/src/main/java/org/apache/calcite/sql/fun/SqlStdOperatorTable.java
+++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlStdOperatorTable.java
@@ -2240,16 +2240,13 @@ public class SqlStdOperatorTable extends ReflectiveSqlOperatorTable {
           SqlFunctionCategory.SYSTEM, false, false,
           Optionality.FORBIDDEN) {
       };
-  /**
-   * The sequence next value function: <code>NEXT VALUE FOR sequence</code>
-   */
+
+  /** The sequence next value function: <code>NEXT VALUE FOR sequence</code>. */
   public static final SqlOperator NEXT_VALUE =
       new SqlSequenceValueOperator(SqlKind.NEXT_VALUE);
 
-  /**
-   * The sequence current value function: <code>CURRENT VALUE FOR
-   * sequence</code>
-   */
+  /** The sequence current value function: <code>CURRENT VALUE FOR
+   * sequence</code>. */
   public static final SqlOperator CURRENT_VALUE =
       new SqlSequenceValueOperator(SqlKind.CURRENT_VALUE);
 
diff --git a/core/src/main/java/org/apache/calcite/sql/parser/SqlParserPos.java b/core/src/main/java/org/apache/calcite/sql/parser/SqlParserPos.java
index e544422..a1d9d29 100644
--- a/core/src/main/java/org/apache/calcite/sql/parser/SqlParserPos.java
+++ b/core/src/main/java/org/apache/calcite/sql/parser/SqlParserPos.java
@@ -98,32 +98,24 @@ public class SqlParserPos implements Serializable {
         && this.endColumnNumber == ((SqlParserPos) o).endColumnNumber;
   }
 
-  /**
-   * @return 1-based starting line number
-   */
+  /** Returns 1-based starting line number. */
   public int getLineNum() {
     return lineNumber;
   }
 
-  /**
-   * @return 1-based starting column number
-   */
+  /** Returns 1-based starting column number. */
   public int getColumnNum() {
     return columnNumber;
   }
 
-  /**
-   * @return 1-based end line number (same as starting line number if the
-   * ParserPos is a point, not a range)
-   */
+  /** Returns 1-based end line number (same as starting line number if the
+   * ParserPos is a point, not a range). */
   public int getEndLineNum() {
     return endLineNumber;
   }
 
-  /**
-   * @return 1-based end column number (same as starting column number if the
-   * ParserPos is a point, not a range)
-   */
+  /** Returns 1-based end column number (same as starting column number if the
+   * ParserPos is a point, not a range). */
   public int getEndColumnNum() {
     return endColumnNumber;
   }
@@ -141,7 +133,7 @@ public class SqlParserPos implements Serializable {
     }
   }
 
-  /** @return true if this SqlParserPos is quoted. **/
+  /** Returns whether this SqlParserPos is quoted. */
   public boolean isQuoted() {
     return false;
   }
diff --git a/core/src/main/java/org/apache/calcite/sql/parser/SqlParserUtil.java b/core/src/main/java/org/apache/calcite/sql/parser/SqlParserUtil.java
index 84a2559..55325d1 100644
--- a/core/src/main/java/org/apache/calcite/sql/parser/SqlParserUtil.java
+++ b/core/src/main/java/org/apache/calcite/sql/parser/SqlParserUtil.java
@@ -80,10 +80,8 @@ public final class SqlParserUtil {
 
   //~ Methods ----------------------------------------------------------------
 
-  /**
-   * @return the character-set prefix of an sql string literal; returns null
-   * if there is none
-   */
+  /** Returns the character-set prefix of a SQL string literal; returns null if
+   * there is none. */
   public static String getCharacterSet(String s) {
     if (s.charAt(0) == '\'') {
       return null;
@@ -116,25 +114,22 @@ public final class SqlParserUtil {
     return new BigDecimal(s);
   }
 
-  /**
-   * @deprecated this method is not localized for Farrago standards
-   */
+  // CHECKSTYLE: IGNORE 1
+  /** @deprecated this method is not localized for Farrago standards */
   @Deprecated // to be removed before 2.0
   public static java.sql.Date parseDate(String s) {
     return java.sql.Date.valueOf(s);
   }
 
-  /**
-   * @deprecated Does not parse SQL:99 milliseconds
-   */
+  // CHECKSTYLE: IGNORE 1
+  /** @deprecated Does not parse SQL:99 milliseconds */
   @Deprecated // to be removed before 2.0
   public static java.sql.Time parseTime(String s) {
     return java.sql.Time.valueOf(s);
   }
 
-  /**
-   * @deprecated this method is not localized for Farrago standards
-   */
+  // CHECKSTYLE: IGNORE 1
+  /** @deprecated this method is not localized for Farrago standards */
   @Deprecated // to be removed before 2.0
   public static java.sql.Timestamp parseTimestamp(String s) {
     return java.sql.Timestamp.valueOf(s);
@@ -207,7 +202,7 @@ public final class SqlParserUtil {
   }
 
   /**
-   * Checks if the date/time format is valid
+   * Checks if the date/time format is valid, throws if not.
    *
    * @param pattern {@link SimpleDateFormat}  pattern
    */
diff --git a/core/src/main/java/org/apache/calcite/sql/type/MultisetOperandTypeChecker.java b/core/src/main/java/org/apache/calcite/sql/type/MultisetOperandTypeChecker.java
index 621d090..4f97633 100644
--- a/core/src/main/java/org/apache/calcite/sql/type/MultisetOperandTypeChecker.java
+++ b/core/src/main/java/org/apache/calcite/sql/type/MultisetOperandTypeChecker.java
@@ -27,8 +27,8 @@ import com.google.common.collect.ImmutableList;
 import static org.apache.calcite.util.Static.RESOURCE;
 
 /**
- * Parameter type-checking strategy types must be [nullable] Multiset,
- * [nullable] Multiset and the two types must have the same element type
+ * Parameter type-checking strategy where types must be ([nullable] Multiset,
+ * [nullable] Multiset), and the two types must have the same element type.
  *
  * @see MultisetSqlType#getComponentType
  */
diff --git a/core/src/main/java/org/apache/calcite/sql/type/OperandTypes.java b/core/src/main/java/org/apache/calcite/sql/type/OperandTypes.java
index b601aa3..f23cd2a 100644
--- a/core/src/main/java/org/apache/calcite/sql/type/OperandTypes.java
+++ b/core/src/main/java/org/apache/calcite/sql/type/OperandTypes.java
@@ -37,7 +37,7 @@ import static org.apache.calcite.util.Static.RESOURCE;
  * Strategies for checking operand types.
  *
  * <p>This class defines singleton instances of strategy objects for operand
- * type checking. {@link org.apache.calcite.sql.type.ReturnTypes}
+ * type-checking. {@link org.apache.calcite.sql.type.ReturnTypes}
  * and {@link org.apache.calcite.sql.type.InferTypes} provide similar strategies
  * for operand type inference and operator return type inference.
  *
@@ -445,8 +445,8 @@ public abstract class OperandTypes {
       family(SqlTypeFamily.ANY, SqlTypeFamily.NUMERIC);
 
   /**
-   * Parameter type-checking strategy type must a nullable time interval,
-   * nullable time interval
+   * Parameter type-checking strategy where type must a nullable time interval,
+   * nullable time interval.
    */
   public static final SqlSingleOperandTypeChecker INTERVAL_SAME_SAME =
       OperandTypes.and(INTERVAL_INTERVAL, SAME_SAME);
@@ -485,13 +485,13 @@ public abstract class OperandTypes {
           INTERVAL_DATETIME);
 
   /**
-   * Type checking strategy for the "*" operator
+   * Type-checking strategy for the "*" operator.
    */
   public static final SqlSingleOperandTypeChecker MULTIPLY_OPERATOR =
       OperandTypes.or(NUMERIC_NUMERIC, INTERVAL_NUMERIC, NUMERIC_INTERVAL);
 
   /**
-   * Type checking strategy for the "/" operator
+   * Type-checking strategy for the "/" operator.
    */
   public static final SqlSingleOperandTypeChecker DIVISION_OPERATOR =
       OperandTypes.or(NUMERIC_NUMERIC, INTERVAL_NUMERIC);
@@ -681,11 +681,14 @@ public abstract class OperandTypes {
         }
       };
 
-  /** Operand type checker that accepts period types:
-   * PERIOD (DATETIME, DATETIME)
-   * PERIOD (DATETIME, INTERVAL)
-   * [ROW] (DATETIME, DATETIME)
-   * [ROW] (DATETIME, INTERVAL) */
+  /** Operand type-checker that accepts period types. Examples:
+   *
+   * <ul>
+   * <li>PERIOD (DATETIME, DATETIME)
+   * <li>PERIOD (DATETIME, INTERVAL)
+   * <li>[ROW] (DATETIME, DATETIME)
+   * <li>[ROW] (DATETIME, INTERVAL)
+   * </ul> */
   private static class PeriodOperandTypeChecker
       implements SqlSingleOperandTypeChecker {
     public boolean checkSingleOperandType(SqlCallBinding callBinding,
diff --git a/core/src/main/java/org/apache/calcite/sql/type/ReturnTypes.java b/core/src/main/java/org/apache/calcite/sql/type/ReturnTypes.java
index 1a31917..7c76f65 100644
--- a/core/src/main/java/org/apache/calcite/sql/type/ReturnTypes.java
+++ b/core/src/main/java/org/apache/calcite/sql/type/ReturnTypes.java
@@ -287,13 +287,14 @@ public abstract class ReturnTypes {
       cascade(INTEGER, SqlTypeTransforms.TO_NULLABLE);
 
   /**
-   * Type-inference strategy whereby the result type of a call is a Bigint
+   * Type-inference strategy whereby the result type of a call is a BIGINT.
    */
   public static final SqlReturnTypeInference BIGINT =
       explicit(SqlTypeName.BIGINT);
+
   /**
    * Type-inference strategy whereby the result type of a call is a nullable
-   * Bigint
+   * BIGINT.
    */
   public static final SqlReturnTypeInference BIGINT_FORCE_NULLABLE =
       cascade(BIGINT, SqlTypeTransforms.FORCE_NULLABLE);
@@ -331,7 +332,7 @@ public abstract class ReturnTypes {
       cascade(VARCHAR_2000, SqlTypeTransforms.TO_NULLABLE);
 
   /**
-   * Type-inference strategy for Histogram agg support
+   * Type-inference strategy for Histogram agg support.
    */
   public static final SqlReturnTypeInference HISTOGRAM =
       explicit(SqlTypeName.VARBINARY, 8);
@@ -388,7 +389,7 @@ public abstract class ReturnTypes {
   };
 
   /**
-   * Returns a multiset type.
+   * Returns a MULTISET type.
    *
    * <p>For example, given <code>INTEGER</code>, returns
    * <code>INTEGER MULTISET</code>.
@@ -397,7 +398,7 @@ public abstract class ReturnTypes {
       cascade(ARG0, SqlTypeTransforms.TO_MULTISET);
 
   /**
-   * Returns the element type of a multiset
+   * Returns the element type of a MULTISET.
    */
   public static final SqlReturnTypeInference MULTISET_ELEMENT_NULLABLE =
       cascade(MULTISET, SqlTypeTransforms.TO_MULTISET_ELEMENT_TYPE);
@@ -474,10 +475,11 @@ public abstract class ReturnTypes {
     RelDataType type2 = opBinding.getOperandType(1);
     return typeFactory.getTypeSystem().deriveDecimalMultiplyType(typeFactory, type1, type2);
   };
+
   /**
    * Same as {@link #DECIMAL_PRODUCT} but returns with nullability if any of
    * the operands is nullable by using
-   * {@link org.apache.calcite.sql.type.SqlTypeTransforms#TO_NULLABLE}
+   * {@link org.apache.calcite.sql.type.SqlTypeTransforms#TO_NULLABLE}.
    */
   public static final SqlReturnTypeInference DECIMAL_PRODUCT_NULLABLE =
       cascade(DECIMAL_PRODUCT, SqlTypeTransforms.TO_NULLABLE);
@@ -508,7 +510,7 @@ public abstract class ReturnTypes {
   /**
    * Same as {@link #DECIMAL_QUOTIENT} but returns with nullability if any of
    * the operands is nullable by using
-   * {@link org.apache.calcite.sql.type.SqlTypeTransforms#TO_NULLABLE}
+   * {@link org.apache.calcite.sql.type.SqlTypeTransforms#TO_NULLABLE}.
    */
   public static final SqlReturnTypeInference DECIMAL_QUOTIENT_NULLABLE =
       cascade(DECIMAL_QUOTIENT, SqlTypeTransforms.TO_NULLABLE);
@@ -574,7 +576,8 @@ public abstract class ReturnTypes {
           chain(DECIMAL_MOD_NULLABLE, ARG1_NULLABLE);
 
   /**
-   * Type-inference strategy whereby the result type of a call is
+   * Type-inference strategy for concatenating two string arguments. The result
+   * type of a call is:
    *
    * <ul>
    * <li>the same type as the input types but with the combined length of the
@@ -735,7 +738,7 @@ public abstract class ReturnTypes {
 
   /**
    * Same as {@link #DYADIC_STRING_SUM_PRECISION} and using
-   * {@link org.apache.calcite.sql.type.SqlTypeTransforms#TO_NULLABLE}
+   * {@link org.apache.calcite.sql.type.SqlTypeTransforms#TO_NULLABLE}.
    */
   public static final SqlReturnTypeInference DYADIC_STRING_SUM_PRECISION_NULLABLE =
       cascade(DYADIC_STRING_SUM_PRECISION, SqlTypeTransforms.TO_NULLABLE);
diff --git a/core/src/main/java/org/apache/calcite/sql/type/SqlOperandTypeChecker.java b/core/src/main/java/org/apache/calcite/sql/type/SqlOperandTypeChecker.java
index ff2e78c..6e3452c 100644
--- a/core/src/main/java/org/apache/calcite/sql/type/SqlOperandTypeChecker.java
+++ b/core/src/main/java/org/apache/calcite/sql/type/SqlOperandTypeChecker.java
@@ -41,9 +41,7 @@ public interface SqlOperandTypeChecker {
       SqlCallBinding callBinding,
       boolean throwOnFailure);
 
-  /**
-   * @return range of operand counts allowed in a call
-   */
+  /** Returns the range of operand counts allowed in a call. */
   SqlOperandCountRange getOperandCountRange();
 
   /**
diff --git a/core/src/main/java/org/apache/calcite/sql/type/SqlTypeFamily.java b/core/src/main/java/org/apache/calcite/sql/type/SqlTypeFamily.java
index 77973c9..3a689c5 100644
--- a/core/src/main/java/org/apache/calcite/sql/type/SqlTypeFamily.java
+++ b/core/src/main/java/org/apache/calcite/sql/type/SqlTypeFamily.java
@@ -123,9 +123,7 @@ public enum SqlTypeFamily implements RelDataTypeFamily {
     return JDBC_TYPE_TO_FAMILY.get(jdbcType);
   }
 
-  /**
-   * @return collection of {@link SqlTypeName}s included in this family
-   */
+  /** Returns the collection of {@link SqlTypeName}s included in this family. */
   public Collection<SqlTypeName> getTypeNames() {
     switch (this) {
     case CHARACTER:
@@ -181,9 +179,7 @@ public enum SqlTypeFamily implements RelDataTypeFamily {
     }
   }
 
-  /**
-   * @return Default {@link RelDataType} belongs to this family.
-   */
+  /** Return the default {@link RelDataType} that belongs to this family. */
   public RelDataType getDefaultConcreteType(RelDataTypeFactory factory) {
     switch (this) {
     case CHARACTER:
diff --git a/core/src/main/java/org/apache/calcite/sql/type/SqlTypeName.java b/core/src/main/java/org/apache/calcite/sql/type/SqlTypeName.java
index 7752c7f..f1df362 100644
--- a/core/src/main/java/org/apache/calcite/sql/type/SqlTypeName.java
+++ b/core/src/main/java/org/apache/calcite/sql/type/SqlTypeName.java
@@ -338,10 +338,8 @@ public enum SqlTypeName {
     return special;
   }
 
-  /**
-   * @return the ordinal from {@link java.sql.Types} corresponding to this
-   * SqlTypeName
-   */
+  /** Returns the ordinal from {@link java.sql.Types} corresponding to this
+   * SqlTypeName. */
   public int getJdbcOrdinal() {
     return jdbcOrdinal;
   }
@@ -355,10 +353,8 @@ public enum SqlTypeName {
         .build();
   }
 
-  /**
-   * @return default scale for this type if supported, otherwise -1 if scale
-   * is either unsupported or must be specified explicitly
-   */
+  /** Returns the default scale for this type if supported, otherwise -1 if
+   * scale is either unsupported or must be specified explicitly. */
   public int getDefaultScale() {
     switch (this) {
     case DECIMAL:
@@ -938,9 +934,7 @@ public enum SqlTypeName {
     }
   }
 
-  /**
-   * @return name of this type
-   */
+  /** Returns the name of this type. */
   public String getName() {
     return toString();
   }
diff --git a/core/src/main/java/org/apache/calcite/sql/type/SqlTypeTransformCascade.java b/core/src/main/java/org/apache/calcite/sql/type/SqlTypeTransformCascade.java
index 13baf9f..8b60f48 100644
--- a/core/src/main/java/org/apache/calcite/sql/type/SqlTypeTransformCascade.java
+++ b/core/src/main/java/org/apache/calcite/sql/type/SqlTypeTransformCascade.java
@@ -24,7 +24,7 @@ import com.google.common.collect.ImmutableList;
 /**
  * Strategy to infer the type of an operator call from the type of the operands
  * by using one {@link SqlReturnTypeInference} rule and a combination of
- * {@link SqlTypeTransform}s
+ * {@link SqlTypeTransform}s.
  */
 public class SqlTypeTransformCascade implements SqlReturnTypeInference {
   //~ Instance fields --------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/type/SqlTypeTransforms.java b/core/src/main/java/org/apache/calcite/sql/type/SqlTypeTransforms.java
index d5fed0b..5912514 100644
--- a/core/src/main/java/org/apache/calcite/sql/type/SqlTypeTransforms.java
+++ b/core/src/main/java/org/apache/calcite/sql/type/SqlTypeTransforms.java
@@ -40,7 +40,7 @@ public abstract class SqlTypeTransforms {
   /**
    * Parameter type-inference transform strategy where a derived type is
    * transformed into the same type but nullable if any of a calls operands is
-   * nullable
+   * nullable.
    */
   public static final SqlTypeTransform TO_NULLABLE =
       (opBinding, typeToTransform) ->
diff --git a/core/src/main/java/org/apache/calcite/sql/type/SqlTypeUtil.java b/core/src/main/java/org/apache/calcite/sql/type/SqlTypeUtil.java
index 009ef8f..eb1aafd 100644
--- a/core/src/main/java/org/apache/calcite/sql/type/SqlTypeUtil.java
+++ b/core/src/main/java/org/apache/calcite/sql/type/SqlTypeUtil.java
@@ -289,16 +289,12 @@ public abstract class SqlTypeUtil {
     return false;
   }
 
-  /**
-   * @return true if type is DATE, TIME, or TIMESTAMP
-   */
+  /** Returns whether a type is DATE, TIME, or TIMESTAMP. */
   public static boolean isDatetime(RelDataType type) {
     return SqlTypeFamily.DATETIME.contains(type);
   }
 
-  /**
-   * @return true if type is DATE
-   */
+  /** Returns whether a type is DATE. */
   public static boolean isDate(RelDataType type) {
     SqlTypeName typeName = type.getSqlTypeName();
     if (typeName == null) {
@@ -308,77 +304,57 @@ public abstract class SqlTypeUtil {
     return type.getSqlTypeName() == SqlTypeName.DATE;
   }
 
-  /**
-   * @return true if type is TIMESTAMP
-   */
+  /** Returns whether a type is TIMESTAMP. */
   public static boolean isTimestamp(RelDataType type) {
     return SqlTypeFamily.TIMESTAMP.contains(type);
   }
 
-  /**
-   * @return true if type is some kind of INTERVAL
-   */
+  /** Returns whether a type is some kind of INTERVAL. */
   public static boolean isInterval(RelDataType type) {
     return SqlTypeFamily.DATETIME_INTERVAL.contains(type);
   }
 
-  /**
-   * @return true if type is in SqlTypeFamily.Character
-   */
+  /** Returns whether a type is in SqlTypeFamily.Character. */
   public static boolean inCharFamily(RelDataType type) {
     return type.getFamily() == SqlTypeFamily.CHARACTER;
   }
 
-  /**
-   * @return true if type is in SqlTypeFamily.Character
-   */
+  /** Returns whether a type name is in SqlTypeFamily.Character. */
   public static boolean inCharFamily(SqlTypeName typeName) {
     return typeName.getFamily() == SqlTypeFamily.CHARACTER;
   }
 
-  /**
-   * @return true if type is in SqlTypeFamily.Boolean
-   */
+  /** Returns whether a type is in SqlTypeFamily.Boolean. */
   public static boolean inBooleanFamily(RelDataType type) {
     return type.getFamily() == SqlTypeFamily.BOOLEAN;
   }
 
-  /**
-   * @return true if two types are in same type family
-   */
+  /** Returns whether two types are in same type family. */
   public static boolean inSameFamily(RelDataType t1, RelDataType t2) {
     return t1.getFamily() == t2.getFamily();
   }
 
-  /**
-   * @return true if two types are in same type family, or one or the other is
-   * of type {@link SqlTypeName#NULL}.
-   */
+  /** Returns whether two types are in same type family, or one or the other is
+   * of type {@link SqlTypeName#NULL}. */
   public static boolean inSameFamilyOrNull(RelDataType t1, RelDataType t2) {
     return (t1.getSqlTypeName() == SqlTypeName.NULL)
         || (t2.getSqlTypeName() == SqlTypeName.NULL)
         || (t1.getFamily() == t2.getFamily());
   }
 
-  /**
-   * @return true if type family is either character or binary
-   */
+  /** Returns whether a type family is either character or binary. */
   public static boolean inCharOrBinaryFamilies(RelDataType type) {
     return (type.getFamily() == SqlTypeFamily.CHARACTER)
         || (type.getFamily() == SqlTypeFamily.BINARY);
   }
 
-  /**
-   * @return true if type is a LOB of some kind
-   */
+  /** Returns whether a type is a LOB of some kind. */
   public static boolean isLob(RelDataType type) {
     // TODO jvs 9-Dec-2004:  once we support LOB types
     return false;
   }
 
-  /**
-   * @return true if type is variable width with bounded precision
-   */
+  /** Returns whether a type is variable width with bounded precision. */
   public static boolean isBoundedVariableWidth(RelDataType type) {
     SqlTypeName typeName = type.getSqlTypeName();
     if (typeName == null) {
@@ -396,9 +372,7 @@ public abstract class SqlTypeUtil {
     }
   }
 
-  /**
-   * @return true if type is one of the integer types
-   */
+  /** Returns whether a type is one of the integer types. */
   public static boolean isIntType(RelDataType type) {
     SqlTypeName typeName = type.getSqlTypeName();
     if (typeName == null) {
@@ -415,9 +389,7 @@ public abstract class SqlTypeUtil {
     }
   }
 
-  /**
-   * @return true if type is decimal
-   */
+  /** Returns whether a type is DECIMAL. */
   public static boolean isDecimal(RelDataType type) {
     SqlTypeName typeName = type.getSqlTypeName();
     if (typeName == null) {
@@ -426,9 +398,7 @@ public abstract class SqlTypeUtil {
     return typeName == SqlTypeName.DECIMAL;
   }
 
-  /**
-   * @return true if type is double
-   */
+  /** Returns whether a type is DOUBLE. */
   public static boolean isDouble(RelDataType type) {
     SqlTypeName typeName = type.getSqlTypeName();
     if (typeName == null) {
@@ -437,9 +407,7 @@ public abstract class SqlTypeUtil {
     return typeName == SqlTypeName.DOUBLE;
   }
 
-  /**
-   * @return true if type is bigint
-   */
+  /** Returns whether a type is BIGINT. */
   public static boolean isBigint(RelDataType type) {
     SqlTypeName typeName = type.getSqlTypeName();
     if (typeName == null) {
@@ -448,9 +416,7 @@ public abstract class SqlTypeUtil {
     return typeName == SqlTypeName.BIGINT;
   }
 
-  /**
-   * @return true if type is numeric with exact precision
-   */
+  /** Returns whether a type is numeric with exact precision. */
   public static boolean isExactNumeric(RelDataType type) {
     SqlTypeName typeName = type.getSqlTypeName();
     if (typeName == null) {
@@ -473,9 +439,7 @@ public abstract class SqlTypeUtil {
     return type.getScale() != Integer.MIN_VALUE;
   }
 
-  /**
-   * Returns the maximum value of an integral type, as a long value
-   */
+  /** Returns the maximum value of an integral type, as a long value. */
   public static long maxValue(RelDataType type) {
     assert SqlTypeUtil.isIntType(type);
     switch (type.getSqlTypeName()) {
@@ -492,9 +456,7 @@ public abstract class SqlTypeUtil {
     }
   }
 
-  /**
-   * @return true if type is numeric with approximate precision
-   */
+  /** Returns whether a type is numeric with approximate precision. */
   public static boolean isApproximateNumeric(RelDataType type) {
     SqlTypeName typeName = type.getSqlTypeName();
     if (typeName == null) {
@@ -510,23 +472,17 @@ public abstract class SqlTypeUtil {
     }
   }
 
-  /**
-   * @return true if type is numeric
-   */
+  /** Returns whether a type is numeric. */
   public static boolean isNumeric(RelDataType type) {
     return isExactNumeric(type) || isApproximateNumeric(type);
   }
 
-  /**
-   * @return true if type is null.
-   */
+  /** Returns whether a type is null. */
   public static boolean isNull(RelDataType type) {
     SqlTypeName typeName = type.getSqlTypeName();
-
     if (typeName == null) {
       return false;
     }
-
     return typeName == SqlTypeName.NULL;
   }
 
@@ -613,8 +569,7 @@ public abstract class SqlTypeUtil {
     }
   }
 
-  /**
-   * Determines the minimum unscaled value of a numeric type
+  /** Returns the minimum unscaled value of a numeric type.
    *
    * @param type a numeric type
    */
@@ -635,8 +590,7 @@ public abstract class SqlTypeUtil {
     }
   }
 
-  /**
-   * Determines the maximum unscaled value of a numeric type
+  /** Returns the maximum unscaled value of a numeric type.
    *
    * @param type a numeric type
    */
@@ -657,10 +611,8 @@ public abstract class SqlTypeUtil {
     }
   }
 
-  /**
-   * @return true if type has a representation as a Java primitive (ignoring
-   * nullability)
-   */
+  /** Returns whether a type has a representation as a Java primitive (ignoring
+   * nullability). */
   @Deprecated // to be removed before 2.0
   public static boolean isJavaPrimitive(RelDataType type) {
     SqlTypeName typeName = type.getSqlTypeName();
@@ -684,9 +636,7 @@ public abstract class SqlTypeUtil {
     }
   }
 
-  /**
-   * @return class name of the wrapper for the primitive data type.
-   */
+  /** Returns the class name of the wrapper for the primitive data type. */
   @Deprecated // to be removed before 2.0
   public static String getPrimitiveWrapperJavaClassName(RelDataType type) {
     if (type == null) {
@@ -706,9 +656,7 @@ public abstract class SqlTypeUtil {
     }
   }
 
-  /**
-   * @return class name of the numeric data type.
-   */
+  /** Returns the class name of a numeric data type. */
   @Deprecated // to be removed before 2.0
   public static String getNumericJavaClassName(RelDataType type) {
     if (type == null) {
@@ -1601,16 +1549,12 @@ public abstract class SqlTypeUtil {
     return Integer.compare(p0, p1);
   }
 
-  /**
-   * @return true if type is ARRAY
-   */
+  /** Returns whether a type is ARRAY. */
   public static boolean isArray(RelDataType type) {
     return type.getSqlTypeName() == SqlTypeName.ARRAY;
   }
 
-  /**
-   * @return true if type is ROW
-   */
+  /** Returns whether a type is ROW. */
   public static boolean isRow(RelDataType type) {
     SqlTypeName typeName = type.getSqlTypeName();
     if (typeName == null) {
@@ -1619,58 +1563,44 @@ public abstract class SqlTypeUtil {
     return type.getSqlTypeName() == SqlTypeName.ROW;
   }
 
-  /**
-   * @return true if type is MAP
-   */
+  /** Returns whether a type is MAP. */
   public static boolean isMap(RelDataType type) {
     SqlTypeName typeName = type.getSqlTypeName();
     if (typeName == null) {
       return false;
     }
-
     return type.getSqlTypeName() == SqlTypeName.MAP;
   }
 
-  /**
-   * @return true if type is MULTISET
-   */
+  /** Returns whether a type is MULTISET. */
   public static boolean isMultiset(RelDataType type) {
     SqlTypeName typeName = type.getSqlTypeName();
     if (typeName == null) {
       return false;
     }
-
     return type.getSqlTypeName() == SqlTypeName.MULTISET;
   }
 
-  /**
-   * @return true if type is ARRAY/MULTISET
-   */
+  /** Returns whether a type is ARRAY or MULTISET. */
   public static boolean isCollection(RelDataType type) {
     SqlTypeName typeName = type.getSqlTypeName();
     if (typeName == null) {
       return false;
     }
-
     return type.getSqlTypeName() == SqlTypeName.ARRAY
         || type.getSqlTypeName() == SqlTypeName.MULTISET;
   }
 
-  /**
-   * @return true if type is CHARACTER
-   */
+  /** Returns whether a type is CHARACTER. */
   public static boolean isCharacter(RelDataType type) {
     SqlTypeName typeName = type.getSqlTypeName();
     if (typeName == null) {
       return false;
     }
-
     return SqlTypeFamily.CHARACTER.contains(type);
   }
 
-  /**
-   * @return true if the type is a CHARACTER or contains a CHARACTER type
-   */
+  /** Returns whether a type is a CHARACTER or contains a CHARACTER type. */
   public static boolean hasCharactor(RelDataType type) {
     if (isCharacter(type)) {
       return true;
@@ -1681,58 +1611,48 @@ public abstract class SqlTypeUtil {
     return false;
   }
 
-  /**
-   * @return true if type is STRING
-   */
+  /** Returns whether a type is STRING. */
   public static boolean isString(RelDataType type) {
     SqlTypeName typeName = type.getSqlTypeName();
     if (typeName == null) {
       return false;
     }
-
     return SqlTypeFamily.STRING.contains(type);
   }
 
-  /**
-   * @return true if type is BOOLEAN
-   */
+  /** Returns whether a type is BOOLEAN. */
   public static boolean isBoolean(RelDataType type) {
     SqlTypeName typeName = type.getSqlTypeName();
     if (typeName == null) {
       return false;
     }
-
     return SqlTypeFamily.BOOLEAN.contains(type);
   }
 
-  /**
-   * @return true if type is BINARY
-   */
+  /** Returns whether a type is BINARY. */
   public static boolean isBinary(RelDataType type) {
     SqlTypeName typeName = type.getSqlTypeName();
     if (typeName == null) {
       return false;
     }
-
     return SqlTypeFamily.BINARY.contains(type);
   }
 
-  /**
-   * @return true if type is Atomic
-   */
+  /** Returns whether a type is atomic (datetime, numeric, string or
+   * BOOLEAN). */
   public static boolean isAtomic(RelDataType type) {
     SqlTypeName typeName = type.getSqlTypeName();
     if (typeName == null) {
       return false;
     }
-
     return SqlTypeUtil.isDatetime(type)
         || SqlTypeUtil.isNumeric(type)
         || SqlTypeUtil.isString(type)
         || SqlTypeUtil.isBoolean(type);
   }
 
-  /** Get decimal with max precision/scale for the current type system. */
+  /** Returns a DECIMAL type with the maximum precision/scale for the current
+   * type system. */
   public static RelDataType getMaxPrecisionScaleDecimal(RelDataTypeFactory factory) {
     int maxPrecision = factory.getTypeSystem().getMaxNumericPrecision();
     int maxScale = factory.getTypeSystem().getMaxNumericScale();
diff --git a/core/src/main/java/org/apache/calcite/sql/util/SqlVisitor.java b/core/src/main/java/org/apache/calcite/sql/util/SqlVisitor.java
index 07c097d..c91beba 100644
--- a/core/src/main/java/org/apache/calcite/sql/util/SqlVisitor.java
+++ b/core/src/main/java/org/apache/calcite/sql/util/SqlVisitor.java
@@ -92,7 +92,7 @@ public interface SqlVisitor<R> {
   R visit(SqlDynamicParam param);
 
   /**
-   * Visits an interval qualifier
+   * Visits an interval qualifier.
    *
    * @param intervalQualifier Interval qualifier
    * @see SqlIntervalQualifier#accept(SqlVisitor)
diff --git a/core/src/main/java/org/apache/calcite/sql/validate/AggregatingSelectScope.java b/core/src/main/java/org/apache/calcite/sql/validate/AggregatingSelectScope.java
index aa7e199..e0e9b3c 100644
--- a/core/src/main/java/org/apache/calcite/sql/validate/AggregatingSelectScope.java
+++ b/core/src/main/java/org/apache/calcite/sql/validate/AggregatingSelectScope.java
@@ -71,7 +71,7 @@ public class AggregatingSelectScope
   //~ Constructors -----------------------------------------------------------
 
   /**
-   * Creates an AggregatingSelectScope
+   * Creates an AggregatingSelectScope.
    *
    * @param selectScope Parent scope
    * @param select      Enclosing SELECT node
diff --git a/core/src/main/java/org/apache/calcite/sql/validate/SelectScope.java b/core/src/main/java/org/apache/calcite/sql/validate/SelectScope.java
index 5cade17..2649d59 100644
--- a/core/src/main/java/org/apache/calcite/sql/validate/SelectScope.java
+++ b/core/src/main/java/org/apache/calcite/sql/validate/SelectScope.java
@@ -99,9 +99,7 @@ public class SelectScope extends ListScope {
    */
   private SqlNodeList orderList;
 
-  /**
-   * Scope to use to resolve windows
-   */
+  /** Scope to use to resolve windows. */
   private final SqlValidatorScope windowParent;
 
   //~ Constructors -----------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/validate/SqlMoniker.java b/core/src/main/java/org/apache/calcite/sql/validate/SqlMoniker.java
index 7a67e77..8b8069e 100644
--- a/core/src/main/java/org/apache/calcite/sql/validate/SqlMoniker.java
+++ b/core/src/main/java/org/apache/calcite/sql/validate/SqlMoniker.java
@@ -24,7 +24,7 @@ import java.util.Comparator;
 import java.util.List;
 
 /**
- * An interface of an object identifier that represents a SqlIdentifier
+ * An interface of an object identifier that represents a SqlIdentifier.
  */
 public interface SqlMoniker {
   Comparator<SqlMoniker> COMPARATOR =
diff --git a/core/src/main/java/org/apache/calcite/sql/validate/SqlValidator.java b/core/src/main/java/org/apache/calcite/sql/validate/SqlValidator.java
index 09a50ff..cd563cb 100644
--- a/core/src/main/java/org/apache/calcite/sql/validate/SqlValidator.java
+++ b/core/src/main/java/org/apache/calcite/sql/validate/SqlValidator.java
@@ -206,7 +206,7 @@ public interface SqlValidator {
   void validateLiteral(SqlLiteral literal);
 
   /**
-   * Validates a {@link SqlIntervalQualifier}
+   * Validates a {@link SqlIntervalQualifier}.
    *
    * @param qualifier Interval qualifier
    */
@@ -301,7 +301,7 @@ public interface SqlValidator {
       SqlNodeList orderList, SqlValidatorScope scope);
 
   /**
-   * Validates a COLUMN_LIST parameter
+   * Validates a COLUMN_LIST parameter.
    *
    * @param function function containing COLUMN_LIST parameter
    * @param argTypes function arguments
@@ -384,7 +384,11 @@ public interface SqlValidator {
       SqlNode windowOrRef,
       SqlValidatorScope scope);
 
-  /** @deprecated Use {@link #resolveWindow(SqlNode, SqlValidatorScope)}, which
+  /**
+   * Converts a window specification or window name into a fully-resolved
+   * window specification.
+   *
+   * @deprecated Use {@link #resolveWindow(SqlNode, SqlValidatorScope)}, which
    * does not have the deprecated {@code populateBounds} parameter.
    *
    * @param populateBounds Whether to populate bounds. Doing so may alter the
@@ -472,7 +476,7 @@ public interface SqlValidator {
       RelDataType type);
 
   /**
-   * Removes a node from the set of validated nodes
+   * Removes a node from the set of validated nodes.
    *
    * @param node node to be removed
    */
@@ -787,9 +791,7 @@ public interface SqlValidator {
      * contain NULLS FIRST or NULLS LAST. */
     Config withDefaultNullCollation(NullCollation nullCollation);
 
-    /**
-     * Returns whether column reference expansion is enabled
-     */
+    /** Returns whether column reference expansion is enabled. */
     @ImmutableBeans.Property
     @ImmutableBeans.BooleanDefault(true)
     boolean columnReferenceExpansion();
diff --git a/core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorCatalogReader.java b/core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorCatalogReader.java
index 62d05e6..1dea580 100644
--- a/core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorCatalogReader.java
+++ b/core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorCatalogReader.java
@@ -84,6 +84,7 @@ public interface SqlValidatorCatalogReader extends Wrapper {
    */
   List<List<String>> getSchemaPaths();
 
+  // CHECKSTYLE: IGNORE 1
   /** @deprecated Use
    * {@link #nameMatcher()}.{@link SqlNameMatcher#field(RelDataType, String)} */
   @Deprecated // to be removed before 2.0
@@ -94,6 +95,7 @@ public interface SqlValidatorCatalogReader extends Wrapper {
    * that matches the case-sensitivity policy. */
   SqlNameMatcher nameMatcher();
 
+  // CHECKSTYLE: IGNORE 1
   /** @deprecated Use
    * {@link #nameMatcher()}.{@link SqlNameMatcher#matches(String, String)} */
   @Deprecated // to be removed before 2.0
@@ -102,6 +104,7 @@ public interface SqlValidatorCatalogReader extends Wrapper {
   RelDataType createTypeFromProjection(RelDataType type,
       List<String> columnNameList);
 
+  // CHECKSTYLE: IGNORE 1
   /** @deprecated Use
    * {@link #nameMatcher()}.{@link SqlNameMatcher#isCaseSensitive()} */
   @Deprecated // to be removed before 2.0
@@ -110,6 +113,6 @@ public interface SqlValidatorCatalogReader extends Wrapper {
   /** Returns the root namespace for name resolution. */
   CalciteSchema getRootSchema();
 
-  /** Returns Config settings */
+  /** Returns Config settings. */
   CalciteConnectionConfig getConfig();
 }
diff --git a/core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java b/core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java
index 32dc272..bf59a4f 100644
--- a/core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java
+++ b/core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java
@@ -168,8 +168,8 @@ public class SqlValidatorImpl implements SqlValidatorWithHints {
   final SqlValidatorCatalogReader catalogReader;
 
   /**
-   * Maps ParsePosition strings to the {@link SqlIdentifier} identifier
-   * objects at these positions
+   * Maps {@link SqlParserPos} strings to the {@link SqlIdentifier} identifier
+   * objects at these positions.
    */
   protected final Map<String, IdInfo> idPositions = new HashMap<>();
 
@@ -208,7 +208,7 @@ public class SqlValidatorImpl implements SqlValidatorWithHints {
 
   /**
    * Maps a {@link SqlSelect} node that is the argument to a CURSOR
-   * constructor to the scope of the result of that select node
+   * constructor to the scope of the result of that select node.
    */
   private final Map<SqlSelect, SqlValidatorScope> cursorScopes =
       new IdentityHashMap<>();
@@ -5709,9 +5709,7 @@ public class SqlValidatorImpl implements SqlValidatorWithHints {
     }
   }
 
-  /**
-   * retrieve pattern variables defined
-   */
+  /** Visitor that retrieves pattern variables defined. */
   private static class PatternVarVisitor implements SqlVisitor<Void> {
     private MatchRecognizeScope scope;
     PatternVarVisitor(MatchRecognizeScope scope) {
@@ -6368,9 +6366,8 @@ public class SqlValidatorImpl implements SqlValidatorWithHints {
     }
   }
 
-  /**
-   * Within one navigation function, the pattern var should be same
-   */
+  /** Validates that within one navigation function, the pattern var is the
+   * same. */
   private class PatternValidator extends SqlBasicVisitor<Set<String>> {
     private final boolean isMeasure;
     int firstLastCount;
diff --git a/core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorScope.java b/core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorScope.java
index c3847c0..dc7f1cb 100644
--- a/core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorScope.java
+++ b/core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorScope.java
@@ -70,6 +70,7 @@ public interface SqlValidatorScope {
   void resolve(List<String> names, SqlNameMatcher nameMatcher, boolean deep,
       Resolved resolved);
 
+  // CHECKSTYLE: IGNORE 1
   /** @deprecated Use
    * {@link #findQualifyingTableNames(String, SqlNode, SqlNameMatcher)} */
   @Deprecated // to be removed before 2.0
@@ -177,6 +178,7 @@ public interface SqlValidatorScope {
    */
   void validateExpr(SqlNode expr);
 
+  // CHECKSTYLE: IGNORE 1
   /** @deprecated Use
    * {@link #resolveTable(List, SqlNameMatcher, Path, Resolved)}. */
   @Deprecated // to be removed before 2.0
diff --git a/core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorTable.java b/core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorTable.java
index 7f9204b..f1d0423 100644
--- a/core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorTable.java
+++ b/core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorTable.java
@@ -42,7 +42,7 @@ public interface SqlValidatorTable extends Wrapper {
   SqlMonotonicity getMonotonicity(String columnName);
 
   /**
-   * Returns the access type of the table
+   * Returns the access type of the table.
    */
   SqlAccessType getAllowedAccess();
 
diff --git a/core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorWithHints.java b/core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorWithHints.java
index cd15ff0..f5d4fca 100644
--- a/core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorWithHints.java
+++ b/core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorWithHints.java
@@ -24,8 +24,8 @@ import java.util.List;
 
 /**
  * Extends {@link SqlValidator} to allow discovery of useful data such as fully
- * qualified names of sql objects, alternative valid sql objects that can be
- * used in the SQL statement (dubbed as hints)
+ * qualified names of SQL objects, alternative valid SQL objects that can be
+ * used in the SQL statement (dubbed as hints).
  */
 public interface SqlValidatorWithHints extends SqlValidator {
   //~ Methods ----------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/validate/TableNamespace.java b/core/src/main/java/org/apache/calcite/sql/validate/TableNamespace.java
index cf3bf64..8a8c59a 100644
--- a/core/src/main/java/org/apache/calcite/sql/validate/TableNamespace.java
+++ b/core/src/main/java/org/apache/calcite/sql/validate/TableNamespace.java
@@ -111,8 +111,8 @@ class TableNamespace extends AbstractNamespace {
   }
 
   /**
-   * Gets the data-type of all columns in a table (for a view table: including
-   * columns of the underlying table)
+   * Gets the data-type of all columns in a table. For a view table, includes
+   * columns of the underlying table.
    */
   private RelDataType getBaseRowType() {
     final Table schemaTable = table.unwrap(Table.class);
diff --git a/core/src/main/java/org/apache/calcite/sql/validate/implicit/TypeCoercionImpl.java b/core/src/main/java/org/apache/calcite/sql/validate/implicit/TypeCoercionImpl.java
index e122152..312683a 100644
--- a/core/src/main/java/org/apache/calcite/sql/validate/implicit/TypeCoercionImpl.java
+++ b/core/src/main/java/org/apache/calcite/sql/validate/implicit/TypeCoercionImpl.java
@@ -409,7 +409,9 @@ public class TypeCoercionImpl extends AbstractTypeCoercion {
   }
 
   /**
-   * STRATEGIES
+   * {@inheritDoc}
+   *
+   * <p>STRATEGIES
    *
    * <p>With(Without) sub-query:
    *
@@ -442,9 +444,8 @@ public class TypeCoercionImpl extends AbstractTypeCoercion {
    *                     |                          |
    *                     +-------------type3--------+
    *</pre>
-   *   </li>
    *   <li>For both basic sql types(LHS and RHS),
-   *   find the common type of LHS and RHS nodes.</li>
+   *   find the common type of LHS and RHS nodes.
    * </ul>
    */
   public boolean inOperationCoercion(SqlCallBinding binding) {
diff --git a/core/src/main/java/org/apache/calcite/sql2rel/ReflectiveConvertletTable.java b/core/src/main/java/org/apache/calcite/sql2rel/ReflectiveConvertletTable.java
index b9c571e..d8243c8 100644
--- a/core/src/main/java/org/apache/calcite/sql2rel/ReflectiveConvertletTable.java
+++ b/core/src/main/java/org/apache/calcite/sql2rel/ReflectiveConvertletTable.java
@@ -165,7 +165,7 @@ public class ReflectiveConvertletTable implements SqlRexConvertletTable {
   }
 
   /**
-   * Registers a convertlet for a given operator instance
+   * Registers a convertlet for a given operator instance.
    *
    * @param op         Operator instance, say
    * {@link org.apache.calcite.sql.fun.SqlStdOperatorTable#MINUS}
diff --git a/core/src/main/java/org/apache/calcite/sql2rel/RelDecorrelator.java b/core/src/main/java/org/apache/calcite/sql2rel/RelDecorrelator.java
index ff418bf..161439f 100644
--- a/core/src/main/java/org/apache/calcite/sql2rel/RelDecorrelator.java
+++ b/core/src/main/java/org/apache/calcite/sql2rel/RelDecorrelator.java
@@ -1499,7 +1499,7 @@ public class RelDecorrelator implements ReflectiveVisitor {
   }
 
   /**
-   * Remove correlated variables from the tree at root corRel
+   * Removes correlated variables from the tree at root corRel.
    *
    * @param correlate Correlate
    */
diff --git a/core/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java b/core/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java
index 6982de1..8b696b5 100644
--- a/core/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java
+++ b/core/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java
@@ -335,9 +335,7 @@ public class SqlToRelConverter {
 
   //~ Methods ----------------------------------------------------------------
 
-  /**
-   * @return the RelOptCluster in use.
-   */
+  /** Returns the RelOptCluster in use. */
   public RelOptCluster getCluster() {
     return cluster;
   }
@@ -388,10 +386,8 @@ public class SqlToRelConverter {
     return retVal;
   }
 
-  /**
-   * @return mapping of non-correlated sub-queries that have been converted to
-   * the constants that they evaluate to
-   */
+  /** Returns the mapping of non-correlated sub-queries that have been converted
+   * to the constants that they evaluate to. */
   public Map<SqlNode, RexNode> getMapConvertedNonCorrSubqs() {
     return mapConvertedNonCorrSubqs;
   }
@@ -5132,7 +5128,7 @@ public class SqlToRelConverter {
     private final Map<AggregateCall, RexNode> aggCallMapping =
         new HashMap<>();
 
-    /** Are we directly inside a windowed aggregate? */
+    /** Whether we are directly inside a windowed aggregate. */
     private boolean inOver = false;
 
     /**
diff --git a/core/src/main/java/org/apache/calcite/sql2rel/SubQueryConverter.java b/core/src/main/java/org/apache/calcite/sql2rel/SubQueryConverter.java
index 5a76644..ec3054c 100644
--- a/core/src/main/java/org/apache/calcite/sql2rel/SubQueryConverter.java
+++ b/core/src/main/java/org/apache/calcite/sql2rel/SubQueryConverter.java
@@ -26,9 +26,7 @@ import org.apache.calcite.sql.SqlCall;
 public interface SubQueryConverter {
   //~ Methods ----------------------------------------------------------------
 
-  /**
-   * @return Whether the sub-query can be converted
-   */
+  /** Returns whether the sub-query can be converted. */
   boolean canConvertSubQuery();
 
   /**
diff --git a/core/src/main/java/org/apache/calcite/tools/FrameworkConfig.java b/core/src/main/java/org/apache/calcite/tools/FrameworkConfig.java
index 67b21d6..63db0e8 100644
--- a/core/src/main/java/org/apache/calcite/tools/FrameworkConfig.java
+++ b/core/src/main/java/org/apache/calcite/tools/FrameworkConfig.java
@@ -112,7 +112,7 @@ public interface FrameworkConfig {
 
   /**
    * Returns the convertlet table that should be used when converting from SQL
-   * to row expressions
+   * to row expressions.
    */
   SqlRexConvertletTable getConvertletTable();
 
diff --git a/core/src/main/java/org/apache/calcite/tools/PigRelBuilder.java b/core/src/main/java/org/apache/calcite/tools/PigRelBuilder.java
index eae5822..0c46267 100644
--- a/core/src/main/java/org/apache/calcite/tools/PigRelBuilder.java
+++ b/core/src/main/java/org/apache/calcite/tools/PigRelBuilder.java
@@ -183,11 +183,11 @@ public class PigRelBuilder extends RelBuilder {
     return super.as(alias);
   }
 
-  /** Partitioner for group and join */
+  /** Partitioner for group and join. */
   interface Partitioner {
   }
 
-  /** Option for performing group efficiently if data set is already sorted */
+  /** Option for performing group efficiently if data set is already sorted. */
   public enum GroupOption {
     MERGE,
     COLLECTED
diff --git a/core/src/main/java/org/apache/calcite/tools/Planner.java b/core/src/main/java/org/apache/calcite/tools/Planner.java
index a9b584c..dccd414 100644
--- a/core/src/main/java/org/apache/calcite/tools/Planner.java
+++ b/core/src/main/java/org/apache/calcite/tools/Planner.java
@@ -90,6 +90,7 @@ public interface Planner extends AutoCloseable {
    */
   RelRoot rel(SqlNode sql) throws RelConversionException;
 
+  // CHECKSTYLE: IGNORE 1
   /** @deprecated Use {@link #rel}. */
   @Deprecated // to removed before 2.0
   RelNode convert(SqlNode sql) throws RelConversionException;
diff --git a/core/src/main/java/org/apache/calcite/tools/RelBuilder.java b/core/src/main/java/org/apache/calcite/tools/RelBuilder.java
index f3b8188..9644253 100644
--- a/core/src/main/java/org/apache/calcite/tools/RelBuilder.java
+++ b/core/src/main/java/org/apache/calcite/tools/RelBuilder.java
@@ -728,6 +728,7 @@ public class RelBuilder {
     return groupKey_(nodes, nodeLists);
   }
 
+  // CHECKSTYLE: IGNORE 1
   /** @deprecated Now that indicator is deprecated, use
    * {@link #groupKey(Iterable, Iterable)}, which has the same behavior as
    * calling this method with {@code indicator = false}. */
@@ -779,6 +780,7 @@ public class RelBuilder {
     return groupKey_(groupSet, ImmutableList.copyOf(groupSets));
   }
 
+  // CHECKSTYLE: IGNORE 1
   /** @deprecated Use {@link #groupKey(ImmutableBitSet)}
    * or {@link #groupKey(ImmutableBitSet, Iterable)}. */
   @Deprecated // to be removed before 2.0
@@ -788,6 +790,7 @@ public class RelBuilder {
         ? ImmutableList.of(groupSet) : ImmutableList.copyOf(groupSets));
   }
 
+  // CHECKSTYLE: IGNORE 1
   /** @deprecated Use {@link #groupKey(ImmutableBitSet, Iterable)}. */
   @Deprecated // to be removed before 2.0
   public GroupKey groupKey(ImmutableBitSet groupSet, boolean indicator,
@@ -2045,7 +2048,7 @@ public class RelBuilder {
   }
 
   /**
-   * Auxiliary class to find a certain RelOptTable based on its name
+   * Auxiliary class to find a certain RelOptTable based on its name.
    */
   private static final class RelOptTableFinder extends RelHomogeneousShuttle {
     private RelOptTable relOptTable = null;
diff --git a/core/src/main/java/org/apache/calcite/util/BlackholeMap.java b/core/src/main/java/org/apache/calcite/util/BlackholeMap.java
index 56b8765..cd7b9e0 100644
--- a/core/src/main/java/org/apache/calcite/util/BlackholeMap.java
+++ b/core/src/main/java/org/apache/calcite/util/BlackholeMap.java
@@ -101,7 +101,7 @@ final class BlackholeMap<K, V> extends AbstractMap<K, V> {
   }
 
   /**
-   * Gets an instance of {@code BlackholeMap}
+   * Gets an instance of {@code BlackholeMap}.
    *
    * @param <K> type of the keys for the map
    * @param <V> type of the values for the map
diff --git a/core/src/main/java/org/apache/calcite/util/Bug.java b/core/src/main/java/org/apache/calcite/util/Bug.java
index a1e41ce..a7a502a 100644
--- a/core/src/main/java/org/apache/calcite/util/Bug.java
+++ b/core/src/main/java/org/apache/calcite/util/Bug.java
@@ -168,8 +168,7 @@ public abstract class Bug {
 
   /** Whether
    * <a href="https://issues.apache.org/jira/browse/CALCITE-2401">[CALCITE-2401]
-   * Improve RelMdPredicates performance</a>
-   */
+   * Improve RelMdPredicates performance</a> is fixed. */
   public static final boolean CALCITE_2401_FIXED = false;
 
   /** Whether
diff --git a/core/src/main/java/org/apache/calcite/util/CancelFlag.java b/core/src/main/java/org/apache/calcite/util/CancelFlag.java
index 7a44a34..35a8bbc 100644
--- a/core/src/main/java/org/apache/calcite/util/CancelFlag.java
+++ b/core/src/main/java/org/apache/calcite/util/CancelFlag.java
@@ -40,9 +40,7 @@ public class CancelFlag {
 
   //~ Methods ----------------------------------------------------------------
 
-  /**
-   * @return whether a cancellation has been requested
-   */
+  /** Returns whether a cancellation has been requested. */
   public boolean isCancelRequested() {
     return atomicBoolean.get();
   }
diff --git a/core/src/main/java/org/apache/calcite/util/ConversionUtil.java b/core/src/main/java/org/apache/calcite/util/ConversionUtil.java
index f4d313a..6646e23 100644
--- a/core/src/main/java/org/apache/calcite/util/ConversionUtil.java
+++ b/core/src/main/java/org/apache/calcite/util/ConversionUtil.java
@@ -23,7 +23,7 @@ import java.util.Locale;
 import static org.apache.calcite.util.Static.RESOURCE;
 
 /**
- * Utility functions for converting from one type to another
+ * Utility functions for converting from one type to another.
  */
 public class ConversionUtil {
   private ConversionUtil() {}
@@ -116,7 +116,7 @@ public class ConversionUtil {
   }
 
   /**
-   * Converts a string into a boolean
+   * Converts a string into a BOOLEAN.
    */
   public static Boolean toBoolean(String str) {
     if (str == null) {
diff --git a/core/src/main/java/org/apache/calcite/util/DateTimeStringUtils.java b/core/src/main/java/org/apache/calcite/util/DateTimeStringUtils.java
index 03f9a82..aff1229 100644
--- a/core/src/main/java/org/apache/calcite/util/DateTimeStringUtils.java
+++ b/core/src/main/java/org/apache/calcite/util/DateTimeStringUtils.java
@@ -29,7 +29,8 @@ public class DateTimeStringUtils {
 
   private DateTimeStringUtils() {}
 
-  /** The SimpleDateFormat string for ISO timestamps, "yyyy-MM-dd'T'HH:mm:ss'Z'"*/
+  /** The SimpleDateFormat string for ISO timestamps,
+   * "yyyy-MM-dd'T'HH:mm:ss'Z'". */
   public static final String ISO_DATETIME_FORMAT =
       "yyyy-MM-dd'T'HH:mm:ss'Z'";
 
diff --git a/core/src/main/java/org/apache/calcite/util/ImmutableBeans.java b/core/src/main/java/org/apache/calcite/util/ImmutableBeans.java
index a16a0e1..ea1343f 100644
--- a/core/src/main/java/org/apache/calcite/util/ImmutableBeans.java
+++ b/core/src/main/java/org/apache/calcite/util/ImmutableBeans.java
@@ -363,7 +363,7 @@ public class ImmutableBeans {
     }
   }
 
-  /** Is the method reading or writing? */
+  /** Whether the method is reading or writing. */
   private enum Mode {
     GET, SET, WITH
   }
diff --git a/core/src/main/java/org/apache/calcite/util/NumberUtil.java b/core/src/main/java/org/apache/calcite/util/NumberUtil.java
index 99fe861..b5dade9 100644
--- a/core/src/main/java/org/apache/calcite/util/NumberUtil.java
+++ b/core/src/main/java/org/apache/calcite/util/NumberUtil.java
@@ -114,11 +114,9 @@ public class NumberUtil {
     }
   }
 
-  /**
-   * @return whether a BigDecimal is a valid Farrago decimal. If a
+  /** Returns whether a {@link BigDecimal} is a valid Farrago decimal. If a
    * BigDecimal's unscaled value overflows a long, then it is not a valid
-   * Farrago decimal.
-   */
+   * Farrago decimal. */
   public static boolean isValidDecimal(BigDecimal bd) {
     BigInteger usv = bd.unscaledValue();
     long usvl = usv.longValue();
diff --git a/core/src/main/java/org/apache/calcite/util/Sources.java b/core/src/main/java/org/apache/calcite/util/Sources.java
index b647559..4a8c514de 100644
--- a/core/src/main/java/org/apache/calcite/util/Sources.java
+++ b/core/src/main/java/org/apache/calcite/util/Sources.java
@@ -94,9 +94,7 @@ public abstract class Sources {
     return source.protocol().equals("file");
   }
 
-  /**
-   * Adapter for {@link CharSource}
-   */
+  /** Adapter for {@link CharSource}. */
   private static class GuavaCharSource implements Source {
     private final CharSource charSource;
 
@@ -155,7 +153,8 @@ public abstract class Sources {
     }
   }
 
-  /** Implementation of {@link Source} on the top of a {@link File} or {@link URL} */
+  /** Implementation of {@link Source} on the top of a {@link File} or
+   * {@link URL}. */
   private static class FileSource implements Source {
     private final File file;
     private final URL url;
diff --git a/core/src/main/java/org/apache/calcite/util/StackWriter.java b/core/src/main/java/org/apache/calcite/util/StackWriter.java
index 13f9f67..9c66762 100644
--- a/core/src/main/java/org/apache/calcite/util/StackWriter.java
+++ b/core/src/main/java/org/apache/calcite/util/StackWriter.java
@@ -60,42 +60,42 @@ public class StackWriter extends FilterWriter {
   //~ Static fields/initializers ---------------------------------------------
 
   /**
-   * directive for increasing the indentation level
+   * Directive for increasing the indentation level.
    */
   public static final int INDENT = 0xF0000001;
 
   /**
-   * directive for decreasing the indentation level
+   * Directive for decreasing the indentation level.
    */
   public static final int OUTDENT = 0xF0000002;
 
   /**
-   * directive for beginning an SQL string literal
+   * Directive for beginning an SQL string literal.
    */
   public static final int OPEN_SQL_STRING_LITERAL = 0xF0000003;
 
   /**
-   * directive for ending an SQL string literal
+   * Directive for ending an SQL string literal.
    */
   public static final int CLOSE_SQL_STRING_LITERAL = 0xF0000004;
 
   /**
-   * directive for beginning an SQL identifier
+   * Directive for beginning an SQL identifier.
    */
   public static final int OPEN_SQL_IDENTIFIER = 0xF0000005;
 
   /**
-   * directive for ending an SQL identifier
+   * Directive for ending an SQL identifier.
    */
   public static final int CLOSE_SQL_IDENTIFIER = 0xF0000006;
 
   /**
-   * tab indentation
+   * Tab indentation.
    */
   public static final String INDENT_TAB = "\t";
 
   /**
-   * four-space indentation
+   * Four-space indentation.
    */
   public static final String INDENT_SPACE4 = "    ";
   private static final Character SINGLE_QUOTE = '\'';
diff --git a/core/src/main/java/org/apache/calcite/util/Util.java b/core/src/main/java/org/apache/calcite/util/Util.java
index d5b9198..0469083 100644
--- a/core/src/main/java/org/apache/calcite/util/Util.java
+++ b/core/src/main/java/org/apache/calcite/util/Util.java
@@ -762,7 +762,7 @@ public class Util {
   }
 
   /**
-   * @return true if s==null or if s.length()==0
+   * Returns whether s == null or if s.length() == 0.
    */
   public static boolean isNullOrEmpty(String s) {
     return (null == s) || (s.length() == 0);
@@ -803,7 +803,7 @@ public class Util {
 
   /**
    * Returns the {@link Charset} object representing the value of
-   * {@link CalciteSystemProperty#DEFAULT_CHARSET}
+   * {@link CalciteSystemProperty#DEFAULT_CHARSET}.
    *
    * @throws java.nio.charset.IllegalCharsetNameException If the given charset
    *                                                      name is illegal
@@ -817,18 +817,21 @@ public class Util {
     return DEFAULT_CHARSET;
   }
 
+  // CHECKSTYLE: IGNORE 1
   /** @deprecated Throw new {@link AssertionError} */
   @Deprecated // to be removed before 2.0
   public static Error newInternal() {
     return new AssertionError("(unknown cause)");
   }
 
+  // CHECKSTYLE: IGNORE 1
   /** @deprecated Throw new {@link AssertionError} */
   @Deprecated // to be removed before 2.0
   public static Error newInternal(String s) {
     return new AssertionError(s);
   }
 
+  // CHECKSTYLE: IGNORE 1
   /** @deprecated Throw new {@link RuntimeException} if checked; throw raw
    * exception if unchecked or {@link Error} */
   @Deprecated // to be removed before 2.0
@@ -836,6 +839,7 @@ public class Util {
     return new AssertionError(e);
   }
 
+  // CHECKSTYLE: IGNORE 1
   /** @deprecated Throw new {@link AssertionError} if applicable;
    * or {@link RuntimeException} if e is checked;
    * or raw exception if e is unchecked or {@link Error}. */
@@ -908,6 +912,7 @@ public class Util {
     return sw.toString();
   }
 
+  // CHECKSTYLE: IGNORE 1
   /** @deprecated Use {@link Preconditions#checkArgument}
    * or {@link Objects#requireNonNull(Object)} */
   @Deprecated // to be removed before 2.0
@@ -917,6 +922,7 @@ public class Util {
     }
   }
 
+  // CHECKSTYLE: IGNORE 1
   /** @deprecated Use {@link Preconditions#checkArgument}
    * or {@link Objects#requireNonNull(Object)} */
   @Deprecated // to be removed before 2.0
@@ -926,6 +932,7 @@ public class Util {
     }
   }
 
+  // CHECKSTYLE: IGNORE 1
   /** @deprecated Use {@link Preconditions#checkArgument} */
   @Deprecated // to be removed before 2.0
   public static void permAssert(boolean b, String description) {
diff --git a/core/src/main/java/org/apache/calcite/util/XmlOutput.java b/core/src/main/java/org/apache/calcite/util/XmlOutput.java
index 241070f..debda9d 100644
--- a/core/src/main/java/org/apache/calcite/util/XmlOutput.java
+++ b/core/src/main/java/org/apache/calcite/util/XmlOutput.java
@@ -49,15 +49,14 @@ public class XmlOutput {
   // is used to monitor changes to the output
   private int tagsWritten;
 
-  // This flag is set to true if the output should be compacted.
-  // Compacted output is free of extraneous whitespace and is designed
-  // for easier transport.
+  /** Whehter output should be compacted.  Compacted output is free of
+   * extraneous whitespace and is designed for easier transport. */
   private boolean compact;
 
-  /** @see #setIndentString */
+  /** String to write for each indent level; see {@link #setIndentString}. */
   private String indentString = "\t";
 
-  /** @see #setGlob */
+  /** Whether to detect that tags are empty; see {@link #setGlob}. */
   private boolean glob;
 
   /**
@@ -68,14 +67,17 @@ public class XmlOutput {
    */
   private boolean inTag;
 
-  /** @see #setAlwaysQuoteCData */
+  /** Whether to always quote CDATA segments (even if they don't contain
+   * special characters); see {@link #setAlwaysQuoteCData}. */
   private boolean alwaysQuoteCData;
 
-  /** @see #setIgnorePcdata */
+  /** Whether to ignore unquoted text, such as whitespace; see
+   * {@link #setIgnorePcdata}. */
   private boolean ignorePcdata;
 
   /**
-   * Private helper function to display a degree of indentation
+   * Private helper function to display a degree of indentation.
+   *
    * @param out the PrintWriter to which to display output.
    * @param indent the degree of indentation.
    */
@@ -443,14 +445,15 @@ public class XmlOutput {
   }
 
   /**
-   * Get the total number of tags written
+   * Returns the total number of tags written.
+   *
    * @return the total number of tags written to the XML stream.
    */
   public int numTagsWritten() {
     return tagsWritten;
   }
 
-  /** Print an XML attribute name and value for string val */
+  /** Prints an XML attribute name and value for string {@code val}. */
   private static void printAtt(PrintWriter pw, String name, String val) {
     if (val != null /* && !val.equals("") */) {
       pw.print(" ");
@@ -543,15 +546,13 @@ public class XmlOutput {
     public static final StringEscaper URL_ARG_ESCAPER;
     public static final StringEscaper URL_ESCAPER;
 
-    /**
-     * Identity transform
-     */
+    /** Identity transform. */
     StringEscaper() {
       translationVector = new ArrayList<>();
     }
 
     /**
-     * Map character "from" to escape sequence "to"
+     * Map character "from" to escape sequence "to".
      */
     public void defineEscape(char from, String to) {
       int i = (int) from;
diff --git a/core/src/main/java/org/apache/calcite/util/graph/AttributedDirectedGraph.java b/core/src/main/java/org/apache/calcite/util/graph/AttributedDirectedGraph.java
index 756d973..2bae5b7 100644
--- a/core/src/main/java/org/apache/calcite/util/graph/AttributedDirectedGraph.java
+++ b/core/src/main/java/org/apache/calcite/util/graph/AttributedDirectedGraph.java
@@ -50,6 +50,7 @@ public class AttributedDirectedGraph<V, E extends DefaultEdge>
     return null;
   }
 
+  // CHECKSTYLE: IGNORE 1
   /** @deprecated Use {@link #addEdge(Object, Object, Object...)}. */
   @Deprecated
   public E addEdge(V vertex, V targetVertex) {
diff --git a/core/src/main/java/org/apache/calcite/util/mapping/AbstractSourceMapping.java b/core/src/main/java/org/apache/calcite/util/mapping/AbstractSourceMapping.java
index 928a893..c4329e3 100644
--- a/core/src/main/java/org/apache/calcite/util/mapping/AbstractSourceMapping.java
+++ b/core/src/main/java/org/apache/calcite/util/mapping/AbstractSourceMapping.java
@@ -21,8 +21,8 @@ import java.util.Iterator;
 /**
  * Simple implementation of
  * {@link org.apache.calcite.util.mapping.Mappings.TargetMapping} where the
- * number of sources and targets are specified as constructor parameters and you
- * just need to implement one method,
+ * number of sources and targets are specified as constructor parameters, and you
+ * just need to implement one method.
  */
 public abstract class AbstractSourceMapping
     extends Mappings.AbstractMapping
diff --git a/core/src/main/java/org/apache/calcite/util/mapping/AbstractTargetMapping.java b/core/src/main/java/org/apache/calcite/util/mapping/AbstractTargetMapping.java
index d0099fc..cd4db08 100644
--- a/core/src/main/java/org/apache/calcite/util/mapping/AbstractTargetMapping.java
+++ b/core/src/main/java/org/apache/calcite/util/mapping/AbstractTargetMapping.java
@@ -21,8 +21,8 @@ import java.util.Iterator;
 /**
  * Simple implementation of
  * {@link org.apache.calcite.util.mapping.Mappings.TargetMapping} where the
- * number of sources and targets are specified as constructor parameters and you
- * just need to implement one method,
+ * number of sources and targets are specified as constructor parameters, and you
+ * just need to implement one method.
  */
 public abstract class AbstractTargetMapping
     extends Mappings.AbstractMapping
diff --git a/core/src/main/java/org/apache/calcite/util/trace/CalciteLogger.java b/core/src/main/java/org/apache/calcite/util/trace/CalciteLogger.java
index 1e0b253..8cb1c50 100644
--- a/core/src/main/java/org/apache/calcite/util/trace/CalciteLogger.java
+++ b/core/src/main/java/org/apache/calcite/util/trace/CalciteLogger.java
@@ -60,7 +60,7 @@ public class CalciteLogger {
   // WARN
 
   /**
-   * Logs a WARN message with two Object parameters
+   * Logs a WARN message with two Object parameters.
    */
   public void warn(String format, Object arg1, Object arg2) {
     // slf4j already avoids the array creation for 1 or 2 arg invocations
@@ -68,7 +68,7 @@ public class CalciteLogger {
   }
 
   /**
-   * Conditionally logs a WARN message with three Object parameters
+   * Conditionally logs a WARN message with three Object parameters.
    */
   public void warn(String format, Object arg1, Object arg2, Object arg3) {
     if (logger.isWarnEnabled()) {
@@ -77,7 +77,7 @@ public class CalciteLogger {
   }
 
   /**
-   * Conditionally logs a WARN message with four Object parameters
+   * Conditionally logs a WARN message with four Object parameters.
    */
   public void warn(String format, Object arg1, Object arg2, Object arg3, Object arg4) {
     if (logger.isWarnEnabled()) {
@@ -94,7 +94,7 @@ public class CalciteLogger {
   // INFO
 
   /**
-   * Logs an INFO message with two Object parameters
+   * Logs an INFO message with two Object parameters.
    */
   public void info(String format, Object arg1, Object arg2) {
     // slf4j already avoids the array creation for 1 or 2 arg invocations
@@ -102,7 +102,7 @@ public class CalciteLogger {
   }
 
   /**
-   * Conditionally logs an INFO message with three Object parameters
+   * Conditionally logs an INFO message with three Object parameters.
    */
   public void info(String format, Object arg1, Object arg2, Object arg3) {
     if (logger.isInfoEnabled()) {
@@ -111,7 +111,7 @@ public class CalciteLogger {
   }
 
   /**
-   * Conditionally logs an INFO message with four Object parameters
+   * Conditionally logs an INFO message with four Object parameters.
    */
   public void info(String format, Object arg1, Object arg2, Object arg3, Object arg4) {
     if (logger.isInfoEnabled()) {
@@ -128,7 +128,7 @@ public class CalciteLogger {
   // DEBUG
 
   /**
-   * Logs a DEBUG message with two Object parameters
+   * Logs a DEBUG message with two Object parameters.
    */
   public void debug(String format, Object arg1, Object arg2) {
     // slf4j already avoids the array creation for 1 or 2 arg invocations
@@ -136,7 +136,7 @@ public class CalciteLogger {
   }
 
   /**
-   * Conditionally logs a DEBUG message with three Object parameters
+   * Conditionally logs a DEBUG message with three Object parameters.
    */
   public void debug(String format, Object arg1, Object arg2, Object arg3) {
     if (logger.isDebugEnabled()) {
@@ -145,7 +145,7 @@ public class CalciteLogger {
   }
 
   /**
-   * Conditionally logs a DEBUG message with four Object parameters
+   * Conditionally logs a DEBUG message with four Object parameters.
    */
   public void debug(String format, Object arg1, Object arg2, Object arg3, Object arg4) {
     if (logger.isDebugEnabled()) {
@@ -162,7 +162,7 @@ public class CalciteLogger {
   // TRACE
 
   /**
-   * Logs a TRACE message with two Object parameters
+   * Logs a TRACE message with two Object parameters.
    */
   public void trace(String format, Object arg1, Object arg2) {
     // slf4j already avoids the array creation for 1 or 2 arg invocations
@@ -170,7 +170,7 @@ public class CalciteLogger {
   }
 
   /**
-   * Conditionally logs a TRACE message with three Object parameters
+   * Conditionally logs a TRACE message with three Object parameters.
    */
   public void trace(String format, Object arg1, Object arg2, Object arg3) {
     if (logger.isTraceEnabled()) {
@@ -179,7 +179,7 @@ public class CalciteLogger {
   }
 
   /**
-   * Conditionally logs a TRACE message with four Object parameters
+   * Conditionally logs a TRACE message with four Object parameters.
    */
   public void trace(String format, Object arg1, Object arg2, Object arg3, Object arg4) {
     if (logger.isTraceEnabled()) {
diff --git a/core/src/test/java/org/apache/calcite/adapter/enumerable/TypeFinderTest.java b/core/src/test/java/org/apache/calcite/adapter/enumerable/TypeFinderTest.java
index 179982a..ed91f2c 100644
--- a/core/src/test/java/org/apache/calcite/adapter/enumerable/TypeFinderTest.java
+++ b/core/src/test/java/org/apache/calcite/adapter/enumerable/TypeFinderTest.java
@@ -40,7 +40,8 @@ import static org.hamcrest.CoreMatchers.containsString;
 import static org.hamcrest.MatcherAssert.assertThat;
 
 /**
- * Test for {@link org.apache.calcite.adapter.enumerable.EnumerableRelImplementor.TypeFinder}
+ * Test for
+ * {@link org.apache.calcite.adapter.enumerable.EnumerableRelImplementor.TypeFinder}.
  */
 class TypeFinderTest {
 
diff --git a/core/src/test/java/org/apache/calcite/jdbc/CalciteRemoteDriverTest.java b/core/src/test/java/org/apache/calcite/jdbc/CalciteRemoteDriverTest.java
index 469f7b8..6bba338 100644
--- a/core/src/test/java/org/apache/calcite/jdbc/CalciteRemoteDriverTest.java
+++ b/core/src/test/java/org/apache/calcite/jdbc/CalciteRemoteDriverTest.java
@@ -859,7 +859,7 @@ class CalciteRemoteDriverTest {
   }
 
   /**
-   * Remote PreparedStatement insert WITHOUT bind variables
+   * Remote PreparedStatement insert WITHOUT bind variables.
    */
   @Test void testRemotePreparedStatementInsert() throws Exception {
     final Connection connection = DriverManager.getConnection(
@@ -880,7 +880,7 @@ class CalciteRemoteDriverTest {
   }
 
   /**
-   * Remote PreparedStatement insert WITH bind variables
+   * Remote PreparedStatement insert WITH bind variables.
    */
   @Test void testRemotePreparedStatementInsert2() throws Exception {
   }
diff --git a/core/src/test/java/org/apache/calcite/jdbc/JavaTypeFactoryTest.java b/core/src/test/java/org/apache/calcite/jdbc/JavaTypeFactoryTest.java
index cbb8631..ccda983 100644
--- a/core/src/test/java/org/apache/calcite/jdbc/JavaTypeFactoryTest.java
+++ b/core/src/test/java/org/apache/calcite/jdbc/JavaTypeFactoryTest.java
@@ -95,12 +95,12 @@ public final class JavaTypeFactoryTest {
         () -> "Type {" + actual.getTypeName() + "} is not a subtype of Types.RecordType");
   }
 
-  /***/
+  /** Struct with one field. */
   private static class OneFieldStruct {
     public Integer intField;
   }
 
-  /***/
+  /** Struct with two fields. */
   private static class TwoFieldStruct {
     public Integer intField;
     public String strField;
diff --git a/core/src/test/java/org/apache/calcite/materialize/NormalizationTrimFieldTest.java b/core/src/test/java/org/apache/calcite/materialize/NormalizationTrimFieldTest.java
index 567d952..b625862 100644
--- a/core/src/test/java/org/apache/calcite/materialize/NormalizationTrimFieldTest.java
+++ b/core/src/test/java/org/apache/calcite/materialize/NormalizationTrimFieldTest.java
@@ -49,6 +49,7 @@ import static org.apache.calcite.test.Matchers.isLinux;
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.MatcherAssert.assertThat;
 
+/** Tests trimming unused fields before materialized view matching. */
 public class NormalizationTrimFieldTest extends SqlToRelTestBase {
 
   public static Frameworks.ConfigBuilder config() {
@@ -68,7 +69,7 @@ public class NormalizationTrimFieldTest extends SqlToRelTestBase {
         .traitDefs((List<RelTraitDef>) null);
   }
 
-  @Test public void testMVTrimUnusedFiled() {
+  @Test void testMVTrimUnusedFiled() {
     final RelBuilder relBuilder = RelBuilder.create(config().build());
     final LogicalProject project = (LogicalProject) relBuilder.scan("EMP")
         .project(relBuilder.field("EMPNO"),
@@ -78,21 +79,25 @@ public class NormalizationTrimFieldTest extends SqlToRelTestBase {
             relBuilder.field("DEPTNO")).build();
     final LogicalAggregate aggregate = (LogicalAggregate) relBuilder.push(project)
         .aggregate(
-            relBuilder.groupKey(relBuilder.field(1, 0, "DEPTNO")
-        ), relBuilder.count(relBuilder.field(1, 0, "SAL"))).build();
+            relBuilder.groupKey(relBuilder.field(1, 0, "DEPTNO")),
+            relBuilder.count(relBuilder.field(1, 0, "SAL")))
+        .build();
     final ImmutableBitSet groupSet = ImmutableBitSet.of(4);
     final AggregateCall count = aggregate.getAggCallList().get(0);
-    final AggregateCall call = AggregateCall.create(count.getAggregation(), count.isDistinct(),
-        count.isApproximate(), count.ignoreNulls(), ImmutableList.of(3),
+    final AggregateCall call = AggregateCall.create(count.getAggregation(),
+        count.isDistinct(), count.isApproximate(),
+        count.ignoreNulls(), ImmutableList.of(3),
         count.filterArg, count.collation, count.getType(), count.getName());
     final RelNode query = LogicalAggregate.create(project, aggregate.getHints(),
         groupSet, ImmutableList.of(groupSet), ImmutableList.of(call));
     final RelNode target = aggregate;
     final RelNode replacement = relBuilder.scan("mv0").build();
-    final RelOptMaterialization relOptMaterialization = new RelOptMaterialization(replacement,
-        target, null, Lists.newArrayList("mv0"));
-    final List<Pair<RelNode, List<RelOptMaterialization>>> relOptimized = RelOptMaterializations
-        .useMaterializedViews(query, ImmutableList.of(relOptMaterialization));
+    final RelOptMaterialization relOptMaterialization =
+        new RelOptMaterialization(replacement,
+            target, null, Lists.newArrayList("mv0"));
+    final List<Pair<RelNode, List<RelOptMaterialization>>> relOptimized =
+        RelOptMaterializations.useMaterializedViews(query,
+            ImmutableList.of(relOptMaterialization));
 
     final String optimized = ""
         + "LogicalProject(deptno=[CAST($0):TINYINT], count_sal=[$1])\n"
diff --git a/core/src/test/java/org/apache/calcite/plan/RelOptUtilTest.java b/core/src/test/java/org/apache/calcite/plan/RelOptUtilTest.java
index 63e7e25..58d772d 100644
--- a/core/src/test/java/org/apache/calcite/plan/RelOptUtilTest.java
+++ b/core/src/test/java/org/apache/calcite/plan/RelOptUtilTest.java
@@ -236,8 +236,8 @@ class RelOptUtilTest {
   }
 
   /**
-   * Test {@link RelOptUtil#splitJoinCondition(RelNode, RelNode, RexNode, List, List, List)}
-   * where the join condition contains an expanded version of IS NOT DISTINCT
+   * Tests {@link RelOptUtil#splitJoinCondition(RelNode, RelNode, RexNode, List, List, List)}
+   * where the join condition contains an expanded version of IS NOT DISTINCT.
    */
   @Test void testSplitJoinConditionExpandedIsNotDistinctFrom() {
     int leftJoinIndex = empScan.getRowType().getFieldNames().indexOf("DEPTNO");
@@ -261,8 +261,9 @@ class RelOptUtilTest {
   }
 
   /**
-   * Test {@link RelOptUtil#splitJoinCondition(RelNode, RelNode, RexNode, List, List, List)}
-   * where the join condition contains an expanded version of IS NOT DISTINCT using CASE
+   * Tests {@link RelOptUtil#splitJoinCondition(RelNode, RelNode, RexNode, List, List, List)}
+   * where the join condition contains an expanded version of IS NOT DISTINCT
+   * using CASE.
    */
   @Test void testSplitJoinConditionExpandedIsNotDistinctFromUsingCase() {
     int leftJoinIndex = empScan.getRowType().getFieldNames().indexOf("DEPTNO");
@@ -287,8 +288,9 @@ class RelOptUtilTest {
   }
 
   /**
-   * Test {@link RelOptUtil#splitJoinCondition(RelNode, RelNode, RexNode, List, List, List)}
-   * where the join condition contains an expanded version of IS NOT DISTINCT using CASE
+   * Tests {@link RelOptUtil#splitJoinCondition(RelNode, RelNode, RexNode, List, List, List)}
+   * where the join condition contains an expanded version of IS NOT DISTINCT
+   * using CASE.
    */
   @Test void testSplitJoinConditionExpandedIsNotDistinctFromUsingCase2() {
     int leftJoinIndex = empScan.getRowType().getFieldNames().indexOf("DEPTNO");
@@ -328,8 +330,8 @@ class RelOptUtilTest {
   }
 
   /**
-   * Test {@link RelOptUtil#pushDownJoinConditions(org.apache.calcite.rel.core.Join, RelBuilder)}
-   * where the join condition contains a complex expression
+   * Tests {@link RelOptUtil#pushDownJoinConditions(org.apache.calcite.rel.core.Join, RelBuilder)}
+   * where the join condition contains a complex expression.
    */
   @Test void testPushDownJoinConditions() {
     int leftJoinIndex = empScan.getRowType().getFieldNames().indexOf("DEPTNO");
@@ -373,8 +375,8 @@ class RelOptUtilTest {
   }
 
   /**
-   * Test {@link RelOptUtil#pushDownJoinConditions(org.apache.calcite.rel.core.Join, RelBuilder)}
-   * where the join condition contains a complex expression
+   * Tests {@link RelOptUtil#pushDownJoinConditions(org.apache.calcite.rel.core.Join, RelBuilder)}
+   * where the join condition contains a complex expression.
    */
   @Test void testPushDownJoinConditionsWithIsNotDistinct() {
     int leftJoinIndex = empScan.getRowType().getFieldNames().indexOf("DEPTNO");
@@ -415,12 +417,11 @@ class RelOptUtilTest {
     assertThat(leftInput.getProjects().get(empRow.getFieldCount()).toString(),
         is(relBuilder.call(SqlStdOperatorTable.PLUS, leftKeyInputRef, relBuilder.literal(1))
             .toString()));
-
   }
 
   /**
-   * Test {@link RelOptUtil#pushDownJoinConditions(org.apache.calcite.rel.core.Join, RelBuilder)}
-   * where the join condition contains a complex expression
+   * Tests {@link RelOptUtil#pushDownJoinConditions(org.apache.calcite.rel.core.Join, RelBuilder)}
+   * where the join condition contains a complex expression.
    */
   @Test void testPushDownJoinConditionsWithExpandedIsNotDistinct() {
     int leftJoinIndex = empScan.getRowType().getFieldNames().indexOf("DEPTNO");
@@ -470,8 +471,8 @@ class RelOptUtilTest {
   }
 
   /**
-   * Test {@link RelOptUtil#pushDownJoinConditions(org.apache.calcite.rel.core.Join, RelBuilder)}
-   * where the join condition contains a complex expression
+   * Tests {@link RelOptUtil#pushDownJoinConditions(org.apache.calcite.rel.core.Join, RelBuilder)}
+   * where the join condition contains a complex expression.
    */
   @Test void testPushDownJoinConditionsWithExpandedIsNotDistinctUsingCase() {
     int leftJoinIndex = empScan.getRowType().getFieldNames().indexOf("DEPTNO");
diff --git a/core/src/test/java/org/apache/calcite/plan/RelWriterTest.java b/core/src/test/java/org/apache/calcite/plan/RelWriterTest.java
index 73e9bcd..340eab3 100644
--- a/core/src/test/java/org/apache/calcite/plan/RelWriterTest.java
+++ b/core/src/test/java/org/apache/calcite/plan/RelWriterTest.java
@@ -901,13 +901,18 @@ class RelWriterTest {
   }
 
   /**
-   * Mock a {@link RelNode} for sql:
-   * select count(*) over (partition by {@code partitionKeyNames}
+   * Creates a mock {@link RelNode} that contains OVER. The SQL is as follows:
+   *
+   * <blockquote>
+   * select count(*) over (partition by {@code partitionKeyNames}<br>
    * order by {@code orderKeyNames}) from {@code table}
+   * </blockquote>
+   *
    * @param table Table name
-   * @param partitionKeyNames Partition by column names, may empty, can not be null
+   * @param partitionKeyNames Partition by column names, may empty, can not be
+   * null
    * @param orderKeyNames Order by column names, may empty, can not be null
-   * @return RelNode for the sql
+   * @return RelNode for the SQL
    */
   private RelNode mockCountOver(String table,
       List<String> partitionKeyNames, List<String> orderKeyNames) {
diff --git a/core/src/test/java/org/apache/calcite/plan/volcano/ComboRuleTest.java b/core/src/test/java/org/apache/calcite/plan/volcano/ComboRuleTest.java
index 101d66e..4d13b6f 100644
--- a/core/src/test/java/org/apache/calcite/plan/volcano/ComboRuleTest.java
+++ b/core/src/test/java/org/apache/calcite/plan/volcano/ComboRuleTest.java
@@ -45,7 +45,7 @@ import static org.apache.calcite.plan.volcano.PlannerTests.newCluster;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
 /**
- * Unit test for {@link VolcanoPlanner}
+ * Unit test for {@link VolcanoPlanner}.
  */
 class ComboRuleTest {
 
diff --git a/core/src/test/java/org/apache/calcite/plan/volcano/TraitConversionTest.java b/core/src/test/java/org/apache/calcite/plan/volcano/TraitConversionTest.java
index fe28158..0906a1e 100644
--- a/core/src/test/java/org/apache/calcite/plan/volcano/TraitConversionTest.java
+++ b/core/src/test/java/org/apache/calcite/plan/volcano/TraitConversionTest.java
@@ -240,9 +240,8 @@ class TraitConversionTest {
     @Override public void register(RelOptPlanner planner) {}
   }
 
-  /**
-   * Dummy distribution trait def for test (handles conversion of SimpleDistribution)
-   */
+  /** Dummy distribution trait def for test (handles conversion of
+   * SimpleDistribution). */
   private static class ConvertRelDistributionTraitDef
       extends RelTraitDef<SimpleDistribution> {
 
diff --git a/core/src/test/java/org/apache/calcite/plan/volcano/TraitPropagationTest.java b/core/src/test/java/org/apache/calcite/plan/volcano/TraitPropagationTest.java
index 2f0b3aa..39b3399 100644
--- a/core/src/test/java/org/apache/calcite/plan/volcano/TraitPropagationTest.java
+++ b/core/src/test/java/org/apache/calcite/plan/volcano/TraitPropagationTest.java
@@ -117,7 +117,7 @@ class TraitPropagationTest {
   }
 
   /**
-   * Materialized anonymous class for simplicity
+   * Materialized anonymous class for simplicity.
    */
   private static class PropAction {
     public RelNode apply(RelOptCluster cluster, RelOptSchema relOptSchema,
@@ -282,7 +282,7 @@ class TraitPropagationTest {
     }
   }
 
-  /** Rule for PhysSort */
+  /** Rule for PhysSort. */
   private static class PhysSortRule extends ConverterRule {
     static final PhysSortRule INSTANCE = Config.INSTANCE
         .withConversion(Sort.class, Convention.NONE, PHYSICAL, "PhysSortRule")
@@ -335,10 +335,10 @@ class TraitPropagationTest {
   }
 
   /* RELS */
-  /** Market interface for Phys nodes */
+  /** Market interface for Phys nodes. */
   private interface Phys extends RelNode { }
 
-  /** Physical Aggregate RelNode */
+  /** Physical Aggregate RelNode. */
   private static class PhysAgg extends Aggregate implements Phys {
     PhysAgg(RelOptCluster cluster, RelTraitSet traitSet, RelNode input,
         ImmutableBitSet groupSet,
@@ -359,7 +359,7 @@ class TraitPropagationTest {
     }
   }
 
-  /** Physical Project RelNode */
+  /** Physical Project RelNode. */
   private static class PhysProj extends Project implements Phys {
     PhysProj(RelOptCluster cluster, RelTraitSet traits, RelNode child,
         List<RexNode> exps, RelDataType rowType) {
@@ -389,7 +389,7 @@ class TraitPropagationTest {
     }
   }
 
-  /** Physical Sort RelNode */
+  /** Physical Sort RelNode. */
   private static class PhysSort extends Sort implements Phys {
     PhysSort(RelOptCluster cluster, RelTraitSet traits, RelNode child,
         RelCollation collation, RexNode offset,
@@ -411,7 +411,7 @@ class TraitPropagationTest {
     }
   }
 
-  /** Physical Table RelNode */
+  /** Physical Table RelNode. */
   private static class PhysTable extends AbstractRelNode implements Phys {
     PhysTable(RelOptCluster cluster) {
       super(cluster, cluster.traitSet().replace(PHYSICAL).replace(COLLATION));
diff --git a/core/src/test/java/org/apache/calcite/plan/volcano/VolcanoPlannerTest.java b/core/src/test/java/org/apache/calcite/plan/volcano/VolcanoPlannerTest.java
index 1709322..b45dced 100644
--- a/core/src/test/java/org/apache/calcite/plan/volcano/VolcanoPlannerTest.java
+++ b/core/src/test/java/org/apache/calcite/plan/volcano/VolcanoPlannerTest.java
@@ -220,8 +220,8 @@ class VolcanoPlannerTest {
   }
 
   /**
-   * Tests a rule that is fired once per subset (whereas most rules are fired
-   * once per rel in a set or rel in a subset)
+   * Tests a rule that is fired once per subset. (Whereas most rules are fired
+   * once per rel in a set or rel in a subset.)
    */
   @Test void testSubsetRule() {
     VolcanoPlanner planner = new VolcanoPlanner();
@@ -712,6 +712,7 @@ class VolcanoPlannerTest {
     }
   }
 
+  /** Rule that matches a PhysSingle on a RelSubset. */
   public static class PhysSingleSubsetRule
       extends RelRule<PhysSingleSubsetRule.Config> {
     static Config config(List<String> buf) {
@@ -753,9 +754,7 @@ class VolcanoPlannerTest {
     }
   }
 
-  /**
-   * Create an artificial RelSet merge in the PhysSingleRel's input RelSet
-   */
+  /** Creates an artificial RelSet merge in the PhysSingleRel's input RelSet. */
   public static class PhysSingleInputSetMergeRule
       extends RelRule<PhysSingleInputSetMergeRule.Config> {
     static final PhysSingleInputSetMergeRule INSTANCE =
@@ -989,6 +988,7 @@ class VolcanoPlannerTest {
     }
   }
 
+  /** Rule that converts a physical RelNode to an iterator. */
   private static class PhysToIteratorRule extends ConverterRule {
     static final PhysToIteratorRule INSTANCE = Config.INSTANCE
         .withConversion(RelNode.class, PlannerTests.PHYS_CALLING_CONVENTION,
diff --git a/core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterStructsTest.java b/core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterStructsTest.java
index 8fed7c6..a7f7049 100644
--- a/core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterStructsTest.java
+++ b/core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterStructsTest.java
@@ -101,16 +101,22 @@ class RelToSqlConverterStructsTest {
 
   private static final Table TABLE = new Table() {
     /**
-     * Table schema is as following:
+     * {@inheritDoc}
+     *
+     * <p>Table schema is as follows:
+     *
+     * <blockquote>
+     * <pre>
      *  myTable(
      *          a: BIGINT,
-     *          n1: STRUCT<
-     *                n11: STRUCT<b: BIGINT>,
-     *                n12: STRUCT<c: BIGINT>
-     *              >,
-     *          n2: STRUCT<d: BIGINT>,
-     *          e: BIGINT
-     *  )
+     *          n1: STRUCT&lt;
+     *                n11: STRUCT&lt;b: BIGINT&gt;,
+     *                n12: STRUCT&lt;c: BIGINT&gt;
+     *              &gt;,
+     *          n2: STRUCT&lt;d: BIGINT&gt;,
+     *          e: BIGINT)
+     * </pre>
+     * </blockquote>
      */
     @Override public RelDataType getRowType(RelDataTypeFactory tf) {
       RelDataType bigint = tf.createSqlType(SqlTypeName.BIGINT);
diff --git a/core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java b/core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java
index b1402a2..26cae12 100644
--- a/core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java
+++ b/core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java
@@ -2824,8 +2824,8 @@ class RelToSqlConverterTest {
 
   /** Test case for
    * <a href="https://issues.apache.org/jira/browse/CALCITE-2625">[CALCITE-2625]
-   * Removing Window Boundaries from SqlWindow of Aggregate Function which do not allow Framing</a>
-   * */
+   * Removing Window Boundaries from SqlWindow of Aggregate Function which do
+   * not allow Framing</a>. */
   @Test void testRowNumberFunctionForPrintingOfFrameBoundary() {
     String query = "SELECT row_number() over (order by \"hire_date\") FROM \"employee\"";
     String expected = "SELECT ROW_NUMBER() OVER (ORDER BY \"hire_date\")\n"
@@ -4534,9 +4534,10 @@ class RelToSqlConverterTest {
         .ok(expectedPostgresql);
   }
 
-  /** Test case fo
+  /** Test case for
    * <a href="https://issues.apache.org/jira/browse/CALCITE-3840">[CALCITE-3840]
-   * Re-aliasing of VALUES that has column aliases produces wrong SQL in the JDBC adapter</a>*/
+   * Re-aliasing of VALUES that has column aliases produces wrong SQL in the
+   * JDBC adapter</a>. */
   @Test void testValuesReAlias() {
     final RelBuilder builder = relBuilder();
     final RelNode root = builder
diff --git a/core/src/test/java/org/apache/calcite/rex/RexBuilderTest.java b/core/src/test/java/org/apache/calcite/rex/RexBuilderTest.java
index 8c82755..49b5e6b 100644
--- a/core/src/test/java/org/apache/calcite/rex/RexBuilderTest.java
+++ b/core/src/test/java/org/apache/calcite/rex/RexBuilderTest.java
@@ -604,7 +604,7 @@ class RexBuilderTest {
     checkBigDecimalLiteral(builder, "-73786976294838206464");
   }
 
-  /** Tests {@link RexCopier#visitOver(RexOver)} */
+  /** Tests {@link RexCopier#visitOver(RexOver)}. */
   @Test void testCopyOver() {
     final RelDataTypeFactory sourceTypeFactory =
         new SqlTypeFactoryImpl(RelDataTypeSystem.DEFAULT);
@@ -643,7 +643,7 @@ class RexBuilderTest {
     }
   }
 
-  /** Tests {@link RexCopier#visitCorrelVariable(RexCorrelVariable)} */
+  /** Tests {@link RexCopier#visitCorrelVariable(RexCorrelVariable)}. */
   @Test void testCopyCorrelVariable() {
     final RelDataTypeFactory sourceTypeFactory =
         new SqlTypeFactoryImpl(RelDataTypeSystem.DEFAULT);
@@ -664,7 +664,7 @@ class RexBuilderTest {
     assertThat(result.getType().getPrecision(), is(PRECISION));
   }
 
-  /** Tests {@link RexCopier#visitLocalRef(RexLocalRef)} */
+  /** Tests {@link RexCopier#visitLocalRef(RexLocalRef)}. */
   @Test void testCopyLocalRef() {
     final RelDataTypeFactory sourceTypeFactory =
         new SqlTypeFactoryImpl(RelDataTypeSystem.DEFAULT);
@@ -684,7 +684,7 @@ class RexBuilderTest {
     assertThat(result.getType().getPrecision(), is(PRECISION));
   }
 
-  /** Tests {@link RexCopier#visitDynamicParam(RexDynamicParam)} */
+  /** Tests {@link RexCopier#visitDynamicParam(RexDynamicParam)}. */
   @Test void testCopyDynamicParam() {
     final RelDataTypeFactory sourceTypeFactory =
         new SqlTypeFactoryImpl(RelDataTypeSystem.DEFAULT);
@@ -704,7 +704,7 @@ class RexBuilderTest {
     assertThat(result.getType().getPrecision(), is(PRECISION));
   }
 
-  /** Tests {@link RexCopier#visitRangeRef(RexRangeRef)} */
+  /** Tests {@link RexCopier#visitRangeRef(RexRangeRef)}. */
   @Test void testCopyRangeRef() {
     final RelDataTypeFactory sourceTypeFactory =
         new SqlTypeFactoryImpl(RelDataTypeSystem.DEFAULT);
diff --git a/core/src/test/java/org/apache/calcite/rex/RexProgramTest.java b/core/src/test/java/org/apache/calcite/rex/RexProgramTest.java
index 0c56498..1fdd8d1 100644
--- a/core/src/test/java/org/apache/calcite/rex/RexProgramTest.java
+++ b/core/src/test/java/org/apache/calcite/rex/RexProgramTest.java
@@ -192,7 +192,8 @@ class RexProgramTest extends RexProgramTestBase {
   }
 
   /**
-   * Creates a program, depending on variant:
+   * Creates one of several programs. The program generated depends on the
+   * {@code variant} parameter, as follows:
    *
    * <ol>
    * <li><code>select (x + y) + (x + 1) as a, (x + x) as b from t(x, y)</code>
@@ -1707,7 +1708,7 @@ class RexProgramTest extends RexProgramTestBase {
     checkSimplifyUnchanged(caseNode);
   }
 
-  /** Tests a CASE condition that contains division, */
+  /** Tests a CASE condition that contains division. */
   @Test void testSimplifyCaseDiv2() {
     // FIXME: RexInterpreter currently evaluates children beforehand.
     simplify = simplify.withParanoid(false);
@@ -2672,6 +2673,8 @@ class RexProgramTest extends RexProgramTestBase {
     checkSimplifyUnchanged(expr);
   }
 
+  /** An operator that overrides the {@link #getStrongPolicyInference}
+   * method. */
   private static class SqlSpecialOperatorWithPolicy extends SqlSpecialOperator {
     private final Strong.Policy policy;
     private SqlSpecialOperatorWithPolicy(String name, SqlKind kind, int prec, boolean leftAssoc,
diff --git a/core/src/test/java/org/apache/calcite/rex/RexProgramTestBase.java b/core/src/test/java/org/apache/calcite/rex/RexProgramTestBase.java
index c3a634c..0680b45 100644
--- a/core/src/test/java/org/apache/calcite/rex/RexProgramTestBase.java
+++ b/core/src/test/java/org/apache/calcite/rex/RexProgramTestBase.java
@@ -27,6 +27,7 @@ import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 
+/** Base class for tests of {@link RexProgram}. */
 class RexProgramTestBase extends RexProgramBuilderBase {
 
   protected void checkDigest(RexNode node, String expected) {
@@ -55,7 +56,9 @@ class RexProgramTestBase extends RexProgramBuilderBase {
   }
 
   /**
-   * Asserts that given node has expected string representation with account of node type
+   * Asserts that a given node has expected string representation with account
+   * of node type.
+   *
    * @param message extra message that clarifies where the node came from
    * @param expected expected string representation of the node
    * @param node node to check
diff --git a/core/src/test/java/org/apache/calcite/runtime/DeterministicAutomatonTest.java b/core/src/test/java/org/apache/calcite/runtime/DeterministicAutomatonTest.java
index d74929f..ab1f5d1 100644
--- a/core/src/test/java/org/apache/calcite/runtime/DeterministicAutomatonTest.java
+++ b/core/src/test/java/org/apache/calcite/runtime/DeterministicAutomatonTest.java
@@ -21,7 +21,7 @@ import org.junit.jupiter.api.Test;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.core.Is.is;
 
-/** Tests for the {@link DeterministicAutomaton} */
+/** Tests for the {@link DeterministicAutomaton}. */
 class DeterministicAutomatonTest {
   @Test void convertAutomaton() {
     final Pattern.PatternBuilder builder = Pattern.builder();
diff --git a/core/src/test/java/org/apache/calcite/sql/parser/SqlParserTest.java b/core/src/test/java/org/apache/calcite/sql/parser/SqlParserTest.java
index badb4ce..603beec 100644
--- a/core/src/test/java/org/apache/calcite/sql/parser/SqlParserTest.java
+++ b/core/src/test/java/org/apache/calcite/sql/parser/SqlParserTest.java
@@ -1287,14 +1287,14 @@ public class SqlParserTest {
     sqlList(sql).ok(expected, expected1, expected2);
   }
 
-  /** Should fail since the first statement lacks semicolon */
+  /** Should fail since the first statement lacks semicolon. */
   @Test void testStmtListWithoutSemiColon1() {
     sqlList("select * from emp where name like 'toto' "
         + "^delete^ from emp")
         .fails("(?s).*Encountered \"delete\" at .*");
   }
 
-  /** Should fail since the third statement lacks semicolon */
+  /** Should fail since the third statement lacks semicolon. */
   @Test void testStmtListWithoutSemiColon2() {
     sqlList("select * from emp where name like 'toto'; "
         + "delete from emp; "
@@ -7424,9 +7424,8 @@ public class SqlParserTest {
         .fails("(?s).*Encountered \"from\" at .*");
   }
 
-  /**
-   * Tests that applying member function of a specific type as a suffix function
-   */
+  /** Tests applying a member function of a specific type as a suffix
+   * function. */
   @Test void testMemberFunction() {
     sql("SELECT myColumn.func(a, b) FROM tbl")
         .ok("SELECT `MYCOLUMN`.`FUNC`(`A`, `B`)\n"
diff --git a/core/src/test/java/org/apache/calcite/sql/test/SqlTests.java b/core/src/test/java/org/apache/calcite/sql/test/SqlTests.java
index d7f0ef6..47b5c34 100644
--- a/core/src/test/java/org/apache/calcite/sql/test/SqlTests.java
+++ b/core/src/test/java/org/apache/calcite/sql/test/SqlTests.java
@@ -89,7 +89,7 @@ public abstract class SqlTests {
 
   /**
    * Helper function to get the string representation of a RelDataType
-   * (include precision/scale but no charset or collation)
+   * (include precision/scale but no charset or collation).
    *
    * @param sqlType Type
    * @return String representation of type
@@ -505,7 +505,7 @@ public abstract class SqlTests {
     }
   }
 
-  /** Stage of query processing */
+  /** Stage of query processing. */
   public enum Stage {
     PARSE("Parser"),
     VALIDATE("Validator"),
diff --git a/core/src/test/java/org/apache/calcite/sql/type/RelDataTypeSystemTest.java b/core/src/test/java/org/apache/calcite/sql/type/RelDataTypeSystemTest.java
index 62550f9..8eec8e8 100644
--- a/core/src/test/java/org/apache/calcite/sql/type/RelDataTypeSystemTest.java
+++ b/core/src/test/java/org/apache/calcite/sql/type/RelDataTypeSystemTest.java
@@ -28,7 +28,7 @@ import org.junit.jupiter.api.Test;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 
 /**
- * Tests return type inference using {@code RelDataTypeSystem}
+ * Tests the inference of return types using {@code RelDataTypeSystem}.
  */
 class RelDataTypeSystemTest {
 
diff --git a/core/src/test/java/org/apache/calcite/sql2rel/RelFieldTrimmerTest.java b/core/src/test/java/org/apache/calcite/sql2rel/RelFieldTrimmerTest.java
index 94f555e..d04fc94 100644
--- a/core/src/test/java/org/apache/calcite/sql2rel/RelFieldTrimmerTest.java
+++ b/core/src/test/java/org/apache/calcite/sql2rel/RelFieldTrimmerTest.java
@@ -51,6 +51,7 @@ import static org.apache.calcite.test.Matchers.hasTree;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
+/** Test for {@link RelFieldTrimmer}. */
 class RelFieldTrimmerTest {
   public static Frameworks.ConfigBuilder config() {
     final SchemaPlus rootSchema = Frameworks.createRootSchema(true);
diff --git a/core/src/test/java/org/apache/calcite/test/BookstoreSchema.java b/core/src/test/java/org/apache/calcite/test/BookstoreSchema.java
index 5d4e7a7..a000b56 100644
--- a/core/src/test/java/org/apache/calcite/test/BookstoreSchema.java
+++ b/core/src/test/java/org/apache/calcite/test/BookstoreSchema.java
@@ -70,8 +70,7 @@ public final class BookstoreSchema {
           Collections.emptyList())
   };
 
-  /**
-   */
+  /** Author. */
   public static class Author {
     public final int aid;
     public final String name;
@@ -87,8 +86,7 @@ public final class BookstoreSchema {
     }
   }
 
-  /**
-   */
+  /** Place. */
   public static class Place {
     public final Coordinate coords;
     public final String city;
@@ -102,8 +100,7 @@ public final class BookstoreSchema {
 
   }
 
-  /**
-   */
+  /** Coordinate. */
   public static class Coordinate {
     public final BigDecimal latitude;
     public final BigDecimal longtitude;
@@ -114,8 +111,7 @@ public final class BookstoreSchema {
     }
   }
 
-  /**
-   */
+  /** Book. */
   public static class Book {
     public final String title;
     public final int publishYear;
@@ -129,8 +125,7 @@ public final class BookstoreSchema {
     }
   }
 
-  /**
-   */
+  /** Page. */
   public static class Page {
     public final int pageNo;
     public final String contentType;
diff --git a/core/src/test/java/org/apache/calcite/test/CalciteAssert.java b/core/src/test/java/org/apache/calcite/test/CalciteAssert.java
index 6d4965d..26e96f6 100644
--- a/core/src/test/java/org/apache/calcite/test/CalciteAssert.java
+++ b/core/src/test/java/org/apache/calcite/test/CalciteAssert.java
@@ -385,12 +385,18 @@ public class CalciteAssert {
     return buf.toString();
   }
 
-  /** @see Matchers#returnsUnordered(String...) */
+  /** Checks that the {@link ResultSet} returns the given set of lines, in no
+   * particular order.
+   *
+   * @see Matchers#returnsUnordered(String...) */
   static Consumer<ResultSet> checkResultUnordered(final String... lines) {
     return checkResult(true, false, lines);
   }
 
-  /** @see Matchers#returnsUnordered(String...) */
+  /** Checks that the {@link ResultSet} returns the given set of lines,
+   * optionally sorting.
+   *
+   * @see Matchers#returnsUnordered(String...) */
   static Consumer<ResultSet> checkResult(final boolean sort,
       final boolean head, final String... lines) {
     return resultSet -> {
@@ -1042,7 +1048,7 @@ public class CalciteAssert {
       }
     }
 
-    /** Creates a copy of this AssertThat, adding more schemas */
+    /** Creates a copy of this AssertThat, adding more schemas. */
     public AssertThat with(SchemaSpec... specs) {
       AssertThat next = this;
       for (SchemaSpec spec : specs) {
@@ -1075,7 +1081,7 @@ public class CalciteAssert {
       return new AssertThat(connectionFactory.with(property, value));
     }
 
-    /** Sets Lex property **/
+    /** Sets the Lex property. **/
     public AssertThat with(Lex lex) {
       return with(CalciteConnectionProperty.LEX, lex);
     }
@@ -1269,7 +1275,7 @@ public class CalciteAssert {
     }
   }
 
-  /** Connection post processor */
+  /** Connection post-processor. */
   @FunctionalInterface
   public interface ConnectionPostProcessor {
     Connection apply(Connection connection) throws SQLException;
@@ -1542,10 +1548,8 @@ public class CalciteAssert {
             hooks, null, null, checkValidationException(optionalMessage)));
     }
 
-    /**
-     * Utility method so that one doesn't have to call
-     * {@link #failsAtValidation} with {@code null}
-     * */
+    /** Utility method so that one doesn't have to call
+     * {@link #failsAtValidation} with {@code null}. */
     public AssertQuery failsAtValidation() {
       return failsAtValidation(null);
     }
@@ -1764,6 +1768,7 @@ public class CalciteAssert {
       });
     }
 
+    // CHECKSTYLE: IGNORE 1
     /** @deprecated Use {@link #queryContains(Consumer)}. */
     @SuppressWarnings("Guava")
     @Deprecated // to be removed before 2.0
@@ -2114,9 +2119,7 @@ public class CalciteAssert {
     }
   }
 
-  /**
-   * We want a consumer which can throw SqlException
-   */
+  /** We want a consumer that can throw SqlException. */
   public interface PreparedStatementConsumer {
     void accept(PreparedStatement statement) throws SQLException;
   }
diff --git a/core/src/test/java/org/apache/calcite/test/DiffTestCase.java b/core/src/test/java/org/apache/calcite/test/DiffTestCase.java
index 4b4551e..24ddbbc 100644
--- a/core/src/test/java/org/apache/calcite/test/DiffTestCase.java
+++ b/core/src/test/java/org/apache/calcite/test/DiffTestCase.java
@@ -69,10 +69,7 @@ public abstract class DiffTestCase {
    */
   protected OutputStream logOutputStream;
 
-  /**
-   * Diff masks defined so far
-   */
-  // private List diffMasks;
+  /** Diff masks defined so far. */
   private String diffMasks;
   Pattern compiledDiffPattern;
   Matcher compiledDiffMatcher;
@@ -149,9 +146,7 @@ public abstract class DiffTestCase {
         openTestLogOutputStream(testLogFile), StandardCharsets.UTF_8);
   }
 
-  /**
-   * @return the root under which testlogs should be written
-   */
+  /** Returns the root directory under which testlogs should be written. */
   protected abstract File getTestlogRoot() throws Exception;
 
   /**
diff --git a/core/src/test/java/org/apache/calcite/test/HierarchySchema.java b/core/src/test/java/org/apache/calcite/test/HierarchySchema.java
index 868edd7..3721f02 100644
--- a/core/src/test/java/org/apache/calcite/test/HierarchySchema.java
+++ b/core/src/test/java/org/apache/calcite/test/HierarchySchema.java
@@ -59,9 +59,7 @@ public class HierarchySchema {
       new Hierarchy(1, 4),
   };
 
-  /**
-   * Hierarchy representing manager - subordinate
-   */
+  /** Hierarchy representing manager - subordinate. */
   public static class Hierarchy {
     public final int managerid;
     public final int subordinateid;
diff --git a/core/src/test/java/org/apache/calcite/test/JdbcAdapterTest.java b/core/src/test/java/org/apache/calcite/test/JdbcAdapterTest.java
index 67b3938..8502c33 100644
--- a/core/src/test/java/org/apache/calcite/test/JdbcAdapterTest.java
+++ b/core/src/test/java/org/apache/calcite/test/JdbcAdapterTest.java
@@ -85,11 +85,10 @@ class JdbcAdapterTest {
             + "FROM \"foodmart\".\"sales_fact_1998\"");
   }
 
-  /**
-   * Test case for
+  /** Test case for
    * <a href="https://issues.apache.org/jira/browse/CALCITE-3115">[CALCITE-3115]
    * Cannot add JdbcRules which have different JdbcConvention
-   * to same VolcanoPlanner's RuleSet.</a>*/
+   * to same VolcanoPlanner's RuleSet</a>. */
   @Test void testUnionPlan2() {
     CalciteAssert.model(JdbcTest.FOODMART_SCOTT_MODEL)
         .query("select \"store_name\" from \"foodmart\".\"store\" where \"store_id\" < 10\n"
diff --git a/core/src/test/java/org/apache/calcite/test/JdbcFrontLinqBackTest.java b/core/src/test/java/org/apache/calcite/test/JdbcFrontLinqBackTest.java
index ff8dce3..90d1352 100644
--- a/core/src/test/java/org/apache/calcite/test/JdbcFrontLinqBackTest.java
+++ b/core/src/test/java/org/apache/calcite/test/JdbcFrontLinqBackTest.java
@@ -394,9 +394,7 @@ public class JdbcFrontLinqBackTest {
         .returns("C=6\n");
   }
 
-  /**
-   * Local Statement insert
-   */
+  /** Local Statement insert. */
   @Test void testInsert3() throws Exception {
     Connection connection = makeConnection(new ArrayList<JdbcTest.Employee>());
     String sql = "insert into \"foo\".\"bar\" values (1, 1, 'second', 2, 2)";
@@ -410,9 +408,7 @@ public class JdbcFrontLinqBackTest {
     assertTrue(updateCount == 1);
   }
 
-  /**
-   * Local PreparedStatement insert WITHOUT bind variables
-   */
+  /** Local PreparedStatement insert WITHOUT bind variables. */
   @Test void testPreparedStatementInsert() throws Exception {
     Connection connection = makeConnection(new ArrayList<JdbcTest.Employee>());
     assertFalse(connection.isClosed());
@@ -429,9 +425,7 @@ public class JdbcFrontLinqBackTest {
     assertTrue(updateCount == 1);
   }
 
-  /**
-   * Local PreparedStatement insert WITH bind variables
-   */
+  /** Local PreparedStatement insert WITH bind variables. */
   @Test void testPreparedStatementInsert2() throws Exception {
   }
 
diff --git a/core/src/test/java/org/apache/calcite/test/JdbcTest.java b/core/src/test/java/org/apache/calcite/test/JdbcTest.java
index dc87f16..2322d89 100644
--- a/core/src/test/java/org/apache/calcite/test/JdbcTest.java
+++ b/core/src/test/java/org/apache/calcite/test/JdbcTest.java
@@ -933,7 +933,7 @@ public class JdbcTest {
    * and also
    * <a href="https://issues.apache.org/jira/browse/CALCITE-1222">[CALCITE-1222]
    * DatabaseMetaData.getColumnLabel returns null when query has ORDER
-   * BY</a>, */
+   * BY</a>. */
   @Test void testResultSetMetaData()
       throws ClassNotFoundException, SQLException {
     try (Connection connection =
@@ -1115,6 +1115,25 @@ public class JdbcTest {
             + "c0=1998\n");
   }
 
+  /** Test case for
+   * <a href="https://issues.apache.org/jira/browse/CALCITE-2894">[CALCITE-2894]
+   * NullPointerException thrown by RelMdPercentageOriginalRows when explaining
+   * plan with all attributes</a>. */
+  @Test void testExplainAllAttributesSemiJoinUnionCorrelate() {
+    final String sql = "select deptno, name from depts where deptno in (\n"
+        + "  select e.deptno from emps e where exists (\n"
+        + "     select 1 from depts d where d.deptno = e.deptno)\n"
+        + "   union\n"
+        + "   select e.deptno from emps e where e.salary > 10000)";
+    CalciteAssert.that()
+        .with(CalciteConnectionProperty.LEX, Lex.JAVA)
+        .with(CalciteConnectionProperty.FORCE_DECORRELATE, false)
+        .withSchema("s", new ReflectiveSchema(new JdbcTest.HrSchema()))
+        .query(sql)
+        .explainMatches("including all attributes ",
+            CalciteAssert.checkResultContains("EnumerableCorrelate"));
+  }
+
   /** Just short of bushy. */
   @Test void testAlmostBushy() {
     CalciteAssert.that()
@@ -3858,7 +3877,7 @@ public class JdbcTest {
             "deptno=20; empid=200; commission=500; RCNF=1; RCNL=1; R=1; RD=1");
   }
 
-  /** Tests for RANK with same values */
+  /** Tests for RANK with same values. */
   @Test void testWinAggRankValues() {
     CalciteAssert.hr()
         .query("select  \"deptno\",\n"
@@ -3873,7 +3892,7 @@ public class JdbcTest {
             "deptno=20; R=4"); // 4 for rank and 2 for dense_rank
   }
 
-  /** Tests for RANK with same values */
+  /** Tests for RANK with same values. */
   @Test void testWinAggRankValuesDesc() {
     CalciteAssert.hr()
         .query("select  \"deptno\",\n"
@@ -3888,7 +3907,7 @@ public class JdbcTest {
             "deptno=20; R=1");
   }
 
-  /** Tests for DENSE_RANK with same values */
+  /** Tests for DENSE_RANK with same values. */
   @Test void testWinAggDenseRankValues() {
     CalciteAssert.hr()
         .query("select  \"deptno\",\n"
@@ -3903,7 +3922,7 @@ public class JdbcTest {
             "deptno=20; R=2");
   }
 
-  /** Tests for DENSE_RANK with same values */
+  /** Tests for DENSE_RANK with same values. */
   @Test void testWinAggDenseRankValuesDesc() {
     CalciteAssert.hr()
         .query("select  \"deptno\",\n"
@@ -3918,7 +3937,7 @@ public class JdbcTest {
             "deptno=20; R=1");
   }
 
-  /** Tests for DATE +- INTERVAL window frame */
+  /** Tests for DATE +- INTERVAL window frame. */
   @Test void testWinIntervalFrame() {
     CalciteAssert.hr()
         .query("select  \"deptno\",\n"
@@ -4296,7 +4315,7 @@ public class JdbcTest {
             "Cannot apply 'NTILE' to arguments of type 'NTILE(<DECIMAL(10, 9)>)'");
   }
 
-  /** Tests for FIRST_VALUE */
+  /** Tests for FIRST_VALUE. */
   @Test void testWinAggFirstValue() {
     CalciteAssert.hr()
         .query("select  \"deptno\",\n"
@@ -4313,7 +4332,7 @@ public class JdbcTest {
             "deptno=20; empid=200; commission=500; R=500");
   }
 
-  /** Tests for FIRST_VALUE desc */
+  /** Tests for FIRST_VALUE desc. */
   @Test void testWinAggFirstValueDesc() {
     CalciteAssert.hr()
         .query("select  \"deptno\",\n"
@@ -4330,7 +4349,7 @@ public class JdbcTest {
             "deptno=20; empid=200; commission=500; R=500");
   }
 
-  /** Tests for FIRST_VALUE empty window */
+  /** Tests for FIRST_VALUE empty window. */
   @Test void testWinAggFirstValueEmptyWindow() {
     CalciteAssert.hr()
         .query("select \"deptno\",\n"
@@ -4347,7 +4366,7 @@ public class JdbcTest {
             "deptno=20; empid=200; commission=500; R=null");
   }
 
-  /** Tests for ROW_NUMBER */
+  /** Tests for ROW_NUMBER. */
   @Test void testWinRowNumber() {
     CalciteAssert.hr()
         .query("select \"deptno\",\n"
@@ -4637,7 +4656,9 @@ public class JdbcTest {
             "DEPTNO=null; G=2; C=14");
   }
 
-  /** Tests CALCITE-980: Not (C='a' or C='b') causes NPE */
+  /** Tests
+   * <a href="https://issues.apache.org/jira/browse/CALCITE-980">[CALCITE-980]
+   * Not (C='a' or C='b') causes NPE</a>. */
   @Test void testWhereOrAndNullable() {
     /* Generates the following code:
        public boolean moveNext() {
diff --git a/core/src/test/java/org/apache/calcite/test/LogicalProjectDigestTest.java b/core/src/test/java/org/apache/calcite/test/LogicalProjectDigestTest.java
index 043271d..78c1920 100644
--- a/core/src/test/java/org/apache/calcite/test/LogicalProjectDigestTest.java
+++ b/core/src/test/java/org/apache/calcite/test/LogicalProjectDigestTest.java
@@ -34,9 +34,7 @@ import static org.hamcrest.MatcherAssert.assertThat;
  * Verifies digest for {@link LogicalProject}.
  */
 class LogicalProjectDigestTest {
-  /**
-   * Planner does not compare
-   */
+  /** Planner does not compare. */
   @Test void fieldNamesDoNotInfluenceDigest() {
     final RelBuilder rb = RelBuilder.create(Frameworks.newConfigBuilder().build());
     final RelNode xAsEmpid = rb.values(new String[]{"x", "y", "z"}, 1, 2, 3)
diff --git a/core/src/test/java/org/apache/calcite/test/Matchers.java b/core/src/test/java/org/apache/calcite/test/Matchers.java
index 48ca5e3..5566cf4 100644
--- a/core/src/test/java/org/apache/calcite/test/Matchers.java
+++ b/core/src/test/java/org/apache/calcite/test/Matchers.java
@@ -278,8 +278,8 @@ public class Matchers {
     };
   }
 
-  /**
-   * Is the numeric value within a given difference another value?
+  /** Matcher that tests whether the numeric value is within a given difference
+   * another value.
    *
    * @param <T> Value type
    */
diff --git a/core/src/test/java/org/apache/calcite/test/MutableRelTest.java b/core/src/test/java/org/apache/calcite/test/MutableRelTest.java
index 90e90b2..27f6fa8 100644
--- a/core/src/test/java/org/apache/calcite/test/MutableRelTest.java
+++ b/core/src/test/java/org/apache/calcite/test/MutableRelTest.java
@@ -219,7 +219,7 @@ class MutableRelTest {
     assertEquals(mutableRel1, mutableRel2);
   }
 
-  /** Verifies equivalence of {@link MutableScan} */
+  /** Verifies equivalence of {@link MutableScan}. */
   @Test public void testMutableScanEquivalence() {
     final FrameworkConfig config = RelBuilderTest.config().build();
     final RelBuilder builder = RelBuilder.create(config);
diff --git a/core/src/test/java/org/apache/calcite/test/ReflectiveSchemaTest.java b/core/src/test/java/org/apache/calcite/test/ReflectiveSchemaTest.java
index 812060a..859d2fb 100644
--- a/core/src/test/java/org/apache/calcite/test/ReflectiveSchemaTest.java
+++ b/core/src/test/java/org/apache/calcite/test/ReflectiveSchemaTest.java
@@ -296,8 +296,8 @@ public class ReflectiveSchemaTest {
             + "primitiveBoolean=true; primitiveByte=127; primitiveChar=\uffff; primitiveShort=32767; primitiveInt=2147483647; primitiveLong=9223372036854775807; primitiveFloat=3.4028235E38; primitiveDouble=1.7976931348623157E308; wrapperBoolean=null; wrapperByte=null; wrapperCharacter=null; wrapperShort=null; wrapperInteger=null; wrapperLong=null; wrapperFloat=null; wrapperDouble=null; sqlDate=null; sqlTime=null; sqlTimestamp=null; utilDate=null; string=null; bigDecimal=null\n");
   }
 
-  /**
-   * Tests NOT for nullable columns
+  /** Tests NOT for nullable columns.
+   *
    * @see CatchallSchema#everyTypes */
   @Test void testWhereNOT() throws Exception {
     final CalciteAssert.AssertThat with =
@@ -307,8 +307,8 @@ public class ReflectiveSchemaTest {
         .returnsUnordered("wrapperByte=0");
   }
 
-  /**
-   * Tests NOT for nullable columns
+  /** Tests NOT for nullable columns.
+   *
    * @see CatchallSchema#everyTypes */
   @Test void testSelectNOT() throws Exception {
     final CalciteAssert.AssertThat with =
@@ -761,7 +761,7 @@ public class ReflectiveSchemaTest {
                 + "empid=4; deptno=10; name=Abd; salary=0.0; commission=null\n");
   }
 
-  /** Table with single field as Integer[] */
+  /** Table with single field as Integer[]. */
   @Disabled(
       "java.lang.AssertionError RelDataTypeImpl.getFieldList(RelDataTypeImpl.java:99)")
   @Test void testArrayOfBoxedPrimitives() {
@@ -771,7 +771,7 @@ public class ReflectiveSchemaTest {
         .returnsUnordered("value=1", "value=3", "value=7");
   }
 
-  /** Table with single field as int[] */
+  /** Table with single field as int[]. */
   @Disabled(
       "java.lang.AssertionError RelDataTypeImpl.getFieldList(RelDataTypeImpl.java:99)")
   @Test void testArrayOfPrimitives() {
@@ -977,7 +977,7 @@ public class ReflectiveSchemaTest {
     public final BitSet bitSet = new BitSet(0);
   }
 
-  /** Table that has integer and string fields */
+  /** Table that has integer and string fields. */
   public static class IntAndString {
     public final int id;
     public final String value;
@@ -1062,7 +1062,9 @@ public class ReflectiveSchemaTest {
     };
   }
 
-  /** CALCITE-2611 unknown on one side of an or may lead to uncompilable code */
+  /** Tests
+   * <a href="https://issues.apache.org/jira/browse/CALCITE-2611">[CALCITE-2611]
+   * UNKNOWN on one side of an OR may lead to uncompilable code</a>. */
   @Test void testUnknownInOr() {
     CalciteAssert.that()
         .withSchema("s", CATCHALL)
diff --git a/core/src/test/java/org/apache/calcite/test/RelBuilderTest.java b/core/src/test/java/org/apache/calcite/test/RelBuilderTest.java
index 8c213f7..fa80fd6 100644
--- a/core/src/test/java/org/apache/calcite/test/RelBuilderTest.java
+++ b/core/src/test/java/org/apache/calcite/test/RelBuilderTest.java
@@ -3177,7 +3177,7 @@ public class RelBuilderTest {
     assertThat(root, hasTree(expected));
   }
 
-  /** Tests filter builder with correlation variables */
+  /** Tests filter builder with correlation variables. */
   @Test void testFilterWithCorrelationVariables() {
     final RelBuilder builder = RelBuilder.create(config().build());
     final Holder<RexCorrelVariable> v = Holder.of(null);
@@ -3225,7 +3225,9 @@ public class RelBuilderTest {
     assertThat(root, hasTree("LogicalTableScan(table=[[scott, EMP]])\n"));
   }
 
-  /** Checks if simplification is run in {@link org.apache.calcite.rex.RexUnknownAs#FALSE} mode for filter conditions */
+  /** Checks if simplification is run in
+   * {@link org.apache.calcite.rex.RexUnknownAs#FALSE} mode for filter
+   * conditions. */
   @Test void testFilterSimplification() {
     final RelBuilder builder = RelBuilder.create(config().build());
     final RelNode root =
diff --git a/core/src/test/java/org/apache/calcite/test/RelMdPercentageOriginalRowsTest.java b/core/src/test/java/org/apache/calcite/test/RelMdPercentageOriginalRowsTest.java
deleted file mode 100644
index c3afeb9..0000000
--- a/core/src/test/java/org/apache/calcite/test/RelMdPercentageOriginalRowsTest.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.
- */
-package org.apache.calcite.test;
-
-import org.apache.calcite.adapter.java.ReflectiveSchema;
-import org.apache.calcite.config.CalciteConnectionProperty;
-import org.apache.calcite.config.Lex;
-
-import org.junit.jupiter.api.Test;
-
-/** Test case for CALCITE-2894 */
-class RelMdPercentageOriginalRowsTest {
-  /** Test case for
-   * <a href="https://issues.apache.org/jira/browse/CALCITE-2894">[CALCITE-2894]
-   * NullPointerException thrown by RelMdPercentageOriginalRows when explaining
-   * plan with all attributes</a>. */
-  @Test void testExplainAllAttributesSemiJoinUnionCorrelate() {
-    CalciteAssert.that()
-            .with(CalciteConnectionProperty.LEX, Lex.JAVA)
-            .with(CalciteConnectionProperty.FORCE_DECORRELATE, false)
-            .withSchema("s", new ReflectiveSchema(new JdbcTest.HrSchema()))
-            .query(
-                    "select deptno, name from depts where deptno in (\n"
-                            + " select e.deptno from emps e where exists (select 1 from depts d where d.deptno=e.deptno)\n"
-                            + " union select e.deptno from emps e where e.salary > 10000) ")
-            .explainMatches("including all attributes ",
-                    CalciteAssert.checkResultContains("EnumerableCorrelate"));
-  }
-}
diff --git a/core/src/test/java/org/apache/calcite/test/RelOptRulesTest.java b/core/src/test/java/org/apache/calcite/test/RelOptRulesTest.java
index 4040570..5c6b99a 100644
--- a/core/src/test/java/org/apache/calcite/test/RelOptRulesTest.java
+++ b/core/src/test/java/org/apache/calcite/test/RelOptRulesTest.java
@@ -2158,7 +2158,7 @@ class RelOptRulesTest extends RelOptTestBase {
     sql(sql).with(program).check();
   }
 
-  /** Tests to see if the final branch of union is missed */
+  /** Tests to see if the final branch of union is missed. */
   @Test void testUnionMergeRule() {
     HepProgram program = new HepProgramBuilder()
         .addRuleInstance(CoreRules.PROJECT_SET_OP_TRANSPOSE)
@@ -4357,8 +4357,7 @@ class RelOptRulesTest extends RelOptTestBase {
 
   /** Test case for
    * <a href="https://issues.apache.org/jira/browse/CALCITE-3111">[CALCITE-3111]
-   * Allow custom implementations of Correlate in RelDecorrelator </a>
-   */
+   * Allow custom implementations of Correlate in RelDecorrelator</a>. */
   @Test void testCustomDecorrelate() {
     final String sql = "SELECT e1.empno\n"
         + "FROM emp e1, dept d1 where e1.deptno = d1.deptno\n"
@@ -4510,9 +4509,9 @@ class RelOptRulesTest extends RelOptTestBase {
         .check();
   }
 
-  /** Test case for DX-11490
+  /** Test case for DX-11490:
    * Make sure the planner doesn't fail over wrong push down
-   * of is null */
+   * of is null. */
   @Test void testIsNullPushDown() {
     HepProgramBuilder preBuilder = new HepProgramBuilder();
     preBuilder.addRuleInstance(CoreRules.PROJECT_TO_LOGICAL_PROJECT_AND_WINDOW);
@@ -4591,8 +4590,8 @@ class RelOptRulesTest extends RelOptTestBase {
         .check();
   }
 
-  /** Test case for
-   * outer join, group by on non-join keys, group by on non-null generating side only */
+  /** Test case for outer join, group by on non-join keys, group by on
+   * non-null generating side only. */
   @Test void testPushAggregateThroughOuterJoin1() {
     final HepProgram preProgram = new HepProgramBuilder()
         .addRuleInstance(CoreRules.AGGREGATE_PROJECT_MERGE)
@@ -4606,8 +4605,8 @@ class RelOptRulesTest extends RelOptTestBase {
         .check();
   }
 
-  /** Test case for
-   * outer join, group by on non-join keys, on null generating side only */
+  /** Test case for outer join, group by on non-join keys, on null
+   * generating side only. */
   @Test void testPushAggregateThroughOuterJoin2() {
     final HepProgram preProgram = new HepProgramBuilder()
         .addRuleInstance(CoreRules.AGGREGATE_PROJECT_MERGE)
@@ -4621,8 +4620,8 @@ class RelOptRulesTest extends RelOptTestBase {
         .check();
   }
 
-  /** Test case for
-   * outer join, group by on both side on non-join keys */
+  /** Test case for outer join, group by on both side on non-join
+   * keys. */
   @Test void testPushAggregateThroughOuterJoin3() {
     final HepProgram preProgram = new HepProgramBuilder()
         .addRuleInstance(CoreRules.AGGREGATE_PROJECT_MERGE)
@@ -4636,8 +4635,8 @@ class RelOptRulesTest extends RelOptTestBase {
         .check();
   }
 
-  /** Test case for
-   * outer join, group by on key same as join key, group by on non-null generating side */
+  /** Test case for outer join, group by on key same as join key,
+   * group by on non-null generating side. */
   @Test void testPushAggregateThroughOuterJoin4() {
     final HepProgram preProgram = new HepProgramBuilder()
         .addRuleInstance(CoreRules.AGGREGATE_PROJECT_MERGE)
@@ -4651,8 +4650,8 @@ class RelOptRulesTest extends RelOptTestBase {
         .check();
   }
 
-  /** Test case for
-   * outer join, group by on key same as join key, group by on null generating side */
+  /** Test case for outer join, group by on key same as join key,
+   * group by on null generating side. */
   @Test void testPushAggregateThroughOuterJoin5() {
     final HepProgram preProgram = new HepProgramBuilder()
         .addRuleInstance(CoreRules.AGGREGATE_PROJECT_MERGE)
@@ -4666,8 +4665,8 @@ class RelOptRulesTest extends RelOptTestBase {
         .check();
   }
 
-  /** Test case for
-   * outer join, group by on key same as join key, group by on both side */
+  /** Test case for outer join, group by on key same as join key,
+   * group by on both side. */
   @Test void testPushAggregateThroughOuterJoin6() {
     final HepProgram preProgram = new HepProgramBuilder()
         .addRuleInstance(CoreRules.AGGREGATE_PROJECT_MERGE)
@@ -4681,8 +4680,8 @@ class RelOptRulesTest extends RelOptTestBase {
         .check();
   }
 
-  /** Test case for
-   * outer join, group by key is susbset of join keys, group by on non-null generating side */
+  /** Test case for outer join, group by key is susbset of join keys,
+   * group by on non-null generating side. */
   @Test void testPushAggregateThroughOuterJoin7() {
     final HepProgram preProgram = new HepProgramBuilder()
         .addRuleInstance(CoreRules.AGGREGATE_PROJECT_MERGE)
@@ -4697,8 +4696,8 @@ class RelOptRulesTest extends RelOptTestBase {
         .check();
   }
 
-  /** Test case for
-   * outer join, group by key is susbset of join keys, group by on null generating side */
+  /** Test case for outer join, group by key is susbset of join keys,
+   * group by on null generating side. */
   @Test void testPushAggregateThroughOuterJoin8() {
     final HepProgram preProgram = new HepProgramBuilder()
         .addRuleInstance(CoreRules.AGGREGATE_PROJECT_MERGE)
@@ -4713,8 +4712,8 @@ class RelOptRulesTest extends RelOptTestBase {
         .check();
   }
 
-  /** Test case for
-   * outer join, group by key is susbset of join keys, group by on both sides */
+  /** Test case for outer join, group by key is susbset of join keys,
+   * group by on both sides. */
   @Test void testPushAggregateThroughOuterJoin9() {
     final HepProgram preProgram = new HepProgramBuilder()
         .addRuleInstance(CoreRules.AGGREGATE_PROJECT_MERGE)
@@ -4729,8 +4728,7 @@ class RelOptRulesTest extends RelOptTestBase {
         .check();
   }
 
-  /** Test case for
-   * outer join, with aggregate functions */
+  /** Test case for outer join, with aggregate functions. */
   @Test void testPushAggregateThroughOuterJoin10() {
     final HepProgram preProgram = new HepProgramBuilder()
         .addRuleInstance(CoreRules.AGGREGATE_PROJECT_MERGE)
@@ -4744,8 +4742,7 @@ class RelOptRulesTest extends RelOptTestBase {
         .checkUnchanged();
   }
 
-  /** Test case for
-   * non-equi outer join */
+  /** Test case for non-equi outer join. */
   @Test void testPushAggregateThroughOuterJoin11() {
     final HepProgram preProgram = new HepProgramBuilder()
         .addRuleInstance(CoreRules.AGGREGATE_PROJECT_MERGE)
@@ -4759,8 +4756,8 @@ class RelOptRulesTest extends RelOptTestBase {
         .checkUnchanged();
   }
 
-  /** Test case for
-   * right outer join, group by on key same as join key, group by on (left)null generating side */
+  /** Test case for right outer join, group by on key same as join
+   * key, group by on (left)null generating side. */
   @Test void testPushAggregateThroughOuterJoin12() {
     final HepProgram preProgram = new HepProgramBuilder()
         .addRuleInstance(CoreRules.AGGREGATE_PROJECT_MERGE)
@@ -4774,8 +4771,8 @@ class RelOptRulesTest extends RelOptTestBase {
         .check();
   }
 
-  /** Test case for
-   * full outer join, group by on key same as join key, group by on one side */
+  /** Test case for full outer join, group by on key same as join key,
+   * group by on one side. */
   @Test void testPushAggregateThroughOuterJoin13() {
     final HepProgram preProgram = new HepProgramBuilder()
         .addRuleInstance(CoreRules.AGGREGATE_PROJECT_MERGE)
@@ -4789,8 +4786,8 @@ class RelOptRulesTest extends RelOptTestBase {
         .check();
   }
 
-  /** Test case for
-   * full outer join, group by on key same as join key, group by on both side */
+  /** Test case for full outer join, group by on key same as join key,
+   * group by on both side. */
   @Test void testPushAggregateThroughOuterJoin14() {
     final HepProgram preProgram = new HepProgramBuilder()
         .addRuleInstance(CoreRules.AGGREGATE_PROJECT_MERGE)
@@ -4804,8 +4801,8 @@ class RelOptRulesTest extends RelOptTestBase {
         .check();
   }
 
-  /** Test case for
-   * full outer join, group by on both side on non-join keys */
+  /** Test case for full outer join, group by on both side on non-join
+   * keys. */
   @Test void testPushAggregateThroughOuterJoin15() {
     final HepProgram preProgram = new HepProgramBuilder()
         .addRuleInstance(CoreRules.AGGREGATE_PROJECT_MERGE)
@@ -4819,8 +4816,8 @@ class RelOptRulesTest extends RelOptTestBase {
         .check();
   }
 
-  /** Test case for
-   * full outer join, group by key is susbset of join keys */
+  /** Test case for full outer join, group by key is susbset of join
+   * keys. */
   @Test void testPushAggregateThroughOuterJoin16() {
     final HepProgram preProgram = new HepProgramBuilder()
         .addRuleInstance(CoreRules.AGGREGATE_PROJECT_MERGE)
@@ -5377,10 +5374,8 @@ class RelOptRulesTest extends RelOptTestBase {
         .checkUnchanged();
   }
 
-  /**
-   * The top Aggregate should be removed -- given "deptno=100",
-   * the input of top Aggregate must be already distinct by "mgr"
-   */
+  /** Tests that top Aggregate is removed. Given "deptno=100", the
+   * input of top Aggregate must be already distinct by "mgr". */
   @Test void testAggregateRemove7() {
     final HepProgram program = new HepProgramBuilder()
         .addRuleInstance(CoreRules.AGGREGATE_REMOVE)
@@ -6705,8 +6700,8 @@ class RelOptRulesTest extends RelOptTestBase {
 
   /** Test case for
    * <a href="https://issues.apache.org/jira/browse/CALCITE-3151">[CALCITE-3151]
-   * RexCall's Monotonicity is not considered in determining a Calc's collation</a>
-   */
+   * RexCall's Monotonicity is not considered in determining a Calc's
+   * collation</a>. */
   @Test void testMonotonicityUDF() {
     final SqlFunction monotonicityFun =
         new SqlFunction("MONOFUN", SqlKind.OTHER_FUNCTION, ReturnTypes.BIGINT, null,
@@ -6761,8 +6756,8 @@ class RelOptRulesTest extends RelOptTestBase {
 
   /** Test case for
    * <a href="https://issues.apache.org/jira/browse/CALCITE-3997">[CALCITE-3997]
-   * Logical rules applied on physical operator but failed handle traits</a>
-   */
+   * Logical rules applied on physical operator but failed handle
+   * traits</a>. */
   @Test void testMergeJoinCollation() {
     final String sql = "select r.ename, s.sal from\n"
         + "sales.emp r join sales.bonus s\n"
@@ -6790,7 +6785,7 @@ class RelOptRulesTest extends RelOptTestBase {
    * Custom implementation of {@link Filter} for use
    * in test case to verify that {@link FilterMultiJoinMergeRule}
    * can be created with any {@link Filter} and not limited to
-   * {@link org.apache.calcite.rel.logical.LogicalFilter}
+   * {@link org.apache.calcite.rel.logical.LogicalFilter}.
    */
   private static class MyFilter extends Filter {
 
@@ -6844,7 +6839,7 @@ class RelOptRulesTest extends RelOptTestBase {
    * Custom implementation of {@link Project} for use
    * in test case to verify that {@link ProjectMultiJoinMergeRule}
    * can be created with any {@link Project} and not limited to
-   * {@link org.apache.calcite.rel.logical.LogicalProject}
+   * {@link org.apache.calcite.rel.logical.LogicalProject}.
    */
   private static class MyProject extends Project {
     MyProject(
@@ -6967,8 +6962,8 @@ class RelOptRulesTest extends RelOptTestBase {
 
   /** Test case for
    * <a href="https://issues.apache.org/jira/browse/CALCITE-3296">[CALCITE-3296]
-   * Decorrelator gives empty result
-   * after decorrelating sort rel with null offset and fetch </a>
+   * Decorrelator gives empty result after decorrelating sort rel with
+   * null offset and fetch</a>.
    */
   @Test void testDecorrelationWithSort() {
     final String sql = "SELECT e1.empno\n"
@@ -6985,8 +6980,7 @@ class RelOptRulesTest extends RelOptTestBase {
   /**
    * Test case for
    * <a href="https://issues.apache.org/jira/browse/CALCITE-3319">[CALCITE-3319]
-   * AssertionError for ReduceDecimalsRule </a>
-   */
+   * AssertionError for ReduceDecimalsRule</a>. */
   @Test void testReduceDecimal() {
     final HepProgram program = new HepProgramBuilder()
         .addRuleInstance(CoreRules.FILTER_TO_CALC)
@@ -7033,10 +7027,9 @@ class RelOptRulesTest extends RelOptTestBase {
   /**
    * Test case for
    * <a href="https://issues.apache.org/jira/browse/CALCITE-3404">[CALCITE-3404]
-   * Treat agg expressions that can ignore distinct constraint as distinct
-   * in AggregateExpandDistinctAggregatesRule
-   * when all the other agg expressions are distinct and have same arguments</a>
-   */
+   * Treat agg expressions that can ignore distinct constraint as
+   * distinct in AggregateExpandDistinctAggregatesRule when all the
+   * other agg expressions are distinct and have same arguments</a>. */
   @Test void testMaxReuseDistinctAttrWithMixedOptionality() {
     final String sql = "select sum(distinct deptno), count(distinct deptno), "
         + "max(deptno) from emp";
diff --git a/core/src/test/java/org/apache/calcite/test/RelOptTestBase.java b/core/src/test/java/org/apache/calcite/test/RelOptTestBase.java
index 6f3ee5c..beb3a9c 100644
--- a/core/src/test/java/org/apache/calcite/test/RelOptTestBase.java
+++ b/core/src/test/java/org/apache/calcite/test/RelOptTestBase.java
@@ -203,6 +203,7 @@ abstract class RelOptTestBase extends SqlToRelTestBase {
           FlatLists.append(hooks, hook, handler), transforms);
     }
 
+    // CHECKSTYLE: IGNORE 1
     /** @deprecated Use {@link #withHook(Hook, Consumer)}. */
     @SuppressWarnings("Guava")
     @Deprecated // to be removed before 2.0
diff --git a/core/src/test/java/org/apache/calcite/test/RexShuttleTest.java b/core/src/test/java/org/apache/calcite/test/RexShuttleTest.java
index 0399cb8..aed5304 100644
--- a/core/src/test/java/org/apache/calcite/test/RexShuttleTest.java
+++ b/core/src/test/java/org/apache/calcite/test/RexShuttleTest.java
@@ -38,7 +38,7 @@ import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.MatcherAssert.assertThat;
 
 /**
- * Unit tests for {@link RexShuttle}
+ * Unit tests for {@link RexShuttle}.
  */
 class RexShuttleTest {
 
diff --git a/core/src/test/java/org/apache/calcite/test/SqlToRelConverterTest.java b/core/src/test/java/org/apache/calcite/test/SqlToRelConverterTest.java
index b0d2396..e05ef07 100644
--- a/core/src/test/java/org/apache/calcite/test/SqlToRelConverterTest.java
+++ b/core/src/test/java/org/apache/calcite/test/SqlToRelConverterTest.java
@@ -1319,7 +1319,7 @@ class SqlToRelConverterTest extends SqlToRelTestBase {
    * <a href="https://issues.apache.org/jira/browse/CALCITE-3789">[CALCITE-3789]
    * Support validation of UNNEST multiple array columns like Presto</a>.
    */
-  @Test public void testAliasUnnestArrayPlanWithSingleColumn() {
+  @Test void testAliasUnnestArrayPlanWithSingleColumn() {
     final String sql = "select d.deptno, employee.empno\n"
         + "from dept_nested_expanded as d,\n"
         + " UNNEST(d.employees) as t(employee)";
@@ -1331,7 +1331,7 @@ class SqlToRelConverterTest extends SqlToRelTestBase {
    * <a href="https://issues.apache.org/jira/browse/CALCITE-3789">[CALCITE-3789]
    * Support validation of UNNEST multiple array columns like Presto</a>.
    */
-  @Test public void testAliasUnnestArrayPlanWithDoubleColumn() {
+  @Test void testAliasUnnestArrayPlanWithDoubleColumn() {
     final String sql = "select d.deptno, e, k.empno\n"
         + "from dept_nested_expanded as d CROSS JOIN\n"
         + " UNNEST(d.admins, d.employees) as t(e, k)";
@@ -1828,21 +1828,21 @@ class SqlToRelConverterTest extends SqlToRelTestBase {
     sql(sql).ok();
   }
 
-  @Test public void testTableFunctionHop() {
+  @Test void testTableFunctionHop() {
     final String sql = "select *\n"
         + "from table(hop(table Shipments, descriptor(rowtime), "
         + "INTERVAL '1' MINUTE, INTERVAL '2' MINUTE))";
     sql(sql).ok();
   }
 
-  @Test public void testTableFunctionHopWithOffset() {
+  @Test void testTableFunctionHopWithOffset() {
     final String sql = "select *\n"
         + "from table(hop(table Shipments, descriptor(rowtime), "
         + "INTERVAL '1' MINUTE, INTERVAL '5' MINUTE, INTERVAL '3' MINUTE))";
     sql(sql).ok();
   }
 
-  @Test public void testTableFunctionSession() {
+  @Test void testTableFunctionSession() {
     final String sql = "select *\n"
         + "from table(session(table Shipments, descriptor(rowtime), "
         + "descriptor(orderId), INTERVAL '10' MINUTE))";
@@ -1855,21 +1855,21 @@ class SqlToRelConverterTest extends SqlToRelTestBase {
     sql(sql).ok();
   }
 
-  @Test public void testTableFunctionHopWithSubQueryParam() {
+  @Test void testTableFunctionHopWithSubQueryParam() {
     final String sql = "select *\n"
         + "from table(hop((select * from Shipments), descriptor(rowtime), "
         + "INTERVAL '1' MINUTE, INTERVAL '2' MINUTE))";
     sql(sql).ok();
   }
 
-  @Test public void testTableFunctionSessionWithSubQueryParam() {
+  @Test void testTableFunctionSessionWithSubQueryParam() {
     final String sql = "select *\n"
         + "from table(session((select * from Shipments), descriptor(rowtime), "
         + "descriptor(orderId), INTERVAL '10' MINUTE))";
     sql(sql).ok();
   }
 
-  @Test public void testTableFunctionSessionCompoundSessionKey() {
+  @Test void testTableFunctionSessionCompoundSessionKey() {
     final String sql = "select *\n"
         + "from table(session(table Orders, descriptor(rowtime), "
         + "descriptor(orderId, productId), INTERVAL '10' MINUTE))";
@@ -2151,7 +2151,7 @@ class SqlToRelConverterTest extends SqlToRelTestBase {
       @Override public RelOptPlanner createPlanner() {
         return new MockRelOptPlanner(Contexts.empty()) {
           @Override public List<RelTraitDef> getRelTraitDefs() {
-            return ImmutableList.<RelTraitDef>of(RelCollationTraitDef.INSTANCE);
+            return ImmutableList.of(RelCollationTraitDef.INSTANCE);
           }
           @Override public RelTraitSet emptyTraitSet() {
             return RelTraitSet.createEmpty().plus(
@@ -2232,9 +2232,7 @@ class SqlToRelConverterTest extends SqlToRelTestBase {
     sql(sql).ok();
   }
 
-  /**
-   * Test group-by CASE expression involving a non-query IN
-   */
+  /** Tests group-by CASE expression involving a non-query IN. */
   @Test void testGroupByCaseSubQuery() {
     final String sql = "SELECT CASE WHEN emp.empno IN (3) THEN 0 ELSE 1 END\n"
         + "FROM emp\n"
@@ -2242,9 +2240,8 @@ class SqlToRelConverterTest extends SqlToRelTestBase {
     sql(sql).ok();
   }
 
-  /**
-   * Test aggregate function on a CASE expression involving a non-query IN
-   */
+  /** Tests an aggregate function on a CASE expression involving a non-query
+   * IN. */
   @Test void testAggCaseSubQuery() {
     final String sql =
         "SELECT SUM(CASE WHEN empno IN (3) THEN 0 ELSE 1 END) FROM emp";
@@ -2965,21 +2962,16 @@ class SqlToRelConverterTest extends SqlToRelTestBase {
     sql(sql).ok();
   }
 
-  /**
-   * Test case for
+  /** Test case for
    * <a href="https://issues.apache.org/jira/browse/CALCITE-1150">[CALCITE-1150]
-   * Dynamic Table / Dynamic Star support</a>
-   */
-  @Test void testSelectFromDynamicTable() throws Exception {
+   * Dynamic Table / Dynamic Star support</a>. */
+  @Test void testSelectFromDynamicTable() {
     final String sql = "select n_nationkey, n_name from SALES.NATION";
     sql(sql).with(getTesterWithDynamicTable()).ok();
   }
 
-  /**
-   * Test case for Dynamic Table / Dynamic Star support
-   * <a href="https://issues.apache.org/jira/browse/CALCITE-1150">[CALCITE-1150]</a>
-   */
-  @Test void testSelectStarFromDynamicTable() throws Exception {
+  /** As {@link #testSelectFromDynamicTable} but "SELECT *". */
+  @Test void testSelectStarFromDynamicTable() {
     final String sql = "select * from SALES.NATION";
     sql(sql).with(getTesterWithDynamicTable()).ok();
   }
@@ -2997,22 +2989,16 @@ class SqlToRelConverterTest extends SqlToRelTestBase {
     sql(sql).with(getTesterWithDynamicTable()).ok();
   }
 
-  /**
-   * Test case for Dynamic Table / Dynamic Star support
-   * <a href="https://issues.apache.org/jira/browse/CALCITE-1150">[CALCITE-1150]</a>
-   */
-  @Test void testReferDynamicStarInSelectOB() throws Exception {
+  /** As {@link #testSelectFromDynamicTable} but with ORDER BY. */
+  @Test void testReferDynamicStarInSelectOB() {
     final String sql = "select n_nationkey, n_name\n"
         + "from (select * from SALES.NATION)\n"
         + "order by n_regionkey";
     sql(sql).with(getTesterWithDynamicTable()).ok();
   }
 
-  /**
-   * Test case for Dynamic Table / Dynamic Star support
-   * <a href="https://issues.apache.org/jira/browse/CALCITE-1150">[CALCITE-1150]</a>
-   */
-  @Test void testDynamicStarInTableJoin() throws Exception {
+  /** As {@link #testSelectFromDynamicTable} but with join. */
+  @Test void testDynamicStarInTableJoin() {
     final String sql = "select * from "
         + " (select * from SALES.NATION) T1, "
         + " (SELECT * from SALES.CUSTOMER) T2 "
@@ -3028,13 +3014,13 @@ class SqlToRelConverterTest extends SqlToRelTestBase {
     sql(sql).with(getTesterWithDynamicTable()).ok();
   }
 
-  /**
-   * Test case for <a href="https://issues.apache.org/jira/browse/CALCITE-2900">[CALCITE-2900]
-   * RelStructuredTypeFlattener generates wrong types on nested columns</a>.
-   */
+  /** Test case for
+   * <a href="https://issues.apache.org/jira/browse/CALCITE-2900">[CALCITE-2900]
+   * RelStructuredTypeFlattener generates wrong types on nested columns</a>. */
   @Test void testNestedColumnType() {
-    final String sql =
-        "select empa.home_address.zip from sales.emp_address empa where empa.home_address.city = 'abc'";
+    final String sql = "select empa.home_address.zip\n"
+        + "from sales.emp_address empa\n"
+        + "where empa.home_address.city = 'abc'";
     sql(sql).ok();
   }
 
@@ -3220,54 +3206,34 @@ class SqlToRelConverterTest extends SqlToRelTestBase {
     sql(sql3).with(getTesterWithDynamicTable()).ok();
   }
 
-  /**
-   * Test case for Dynamic Table / Dynamic Star support
-   * <a href="https://issues.apache.org/jira/browse/CALCITE-1150">[CALCITE-1150]</a>
-   */
-  @Test void testReferDynamicStarInSelectWhereGB() throws Exception {
+  @Test void testReferDynamicStarInSelectWhereGB() {
     final String sql = "select n_regionkey, count(*) as cnt from "
         + "(select * from SALES.NATION) where n_nationkey > 5 "
         + "group by n_regionkey";
     sql(sql).with(getTesterWithDynamicTable()).ok();
   }
 
-  /**
-   * Test case for Dynamic Table / Dynamic Star support
-   * <a href="https://issues.apache.org/jira/browse/CALCITE-1150">[CALCITE-1150]</a>
-   */
-  @Test void testDynamicStarInJoinAndSubQ() throws Exception {
+  @Test void testDynamicStarInJoinAndSubQ() {
     final String sql = "select * from "
         + " (select * from SALES.NATION T1, "
         + " SALES.CUSTOMER T2 where T1.n_nationkey = T2.c_nationkey)";
     sql(sql).with(getTesterWithDynamicTable()).ok();
   }
 
-  /**
-   * Test case for Dynamic Table / Dynamic Star support
-   * <a href="https://issues.apache.org/jira/browse/CALCITE-1150">[CALCITE-1150]</a>
-   */
-  @Test void testStarJoinStaticDynTable() throws Exception {
+  @Test void testStarJoinStaticDynTable() {
     final String sql = "select * from SALES.NATION N, SALES.REGION as R "
         + "where N.n_regionkey = R.r_regionkey";
     sql(sql).with(getTesterWithDynamicTable()).ok();
   }
 
-  /**
-   * Test case for Dynamic Table / Dynamic Star support
-   * <a href="https://issues.apache.org/jira/browse/CALCITE-1150">[CALCITE-1150]</a>
-   */
-  @Test void testGrpByColFromStarInSubQuery() throws Exception {
+  @Test void testGrpByColFromStarInSubQuery() {
     final String sql = "SELECT n.n_nationkey AS col "
         + " from (SELECT * FROM SALES.NATION) as n "
         + " group by n.n_nationkey";
     sql(sql).with(getTesterWithDynamicTable()).ok();
   }
 
-  /**
-   * Test case for Dynamic Table / Dynamic Star support
-   * <a href="https://issues.apache.org/jira/browse/CALCITE-1150">[CALCITE-1150]</a>
-   */
-  @Test void testDynStarInExistSubQ() throws Exception {
+  @Test void testDynStarInExistSubQ() {
     final String sql = "select *\n"
         + "from SALES.REGION where exists (select * from SALES.NATION)";
     sql(sql).with(getTesterWithDynamicTable()).ok();
@@ -3277,7 +3243,7 @@ class SqlToRelConverterTest extends SqlToRelTestBase {
    * <a href="https://issues.apache.org/jira/browse/CALCITE-1150">[CALCITE-1150]
    * Create the a new DynamicRecordType, avoiding star expansion when working
    * with this type</a>. */
-  @Test void testSelectDynamicStarOrderBy() throws Exception {
+  @Test void testSelectDynamicStarOrderBy() {
     final String sql = "SELECT * from SALES.NATION order by n_nationkey";
     sql(sql).with(getTesterWithDynamicTable()).ok();
   }
@@ -3301,7 +3267,7 @@ class SqlToRelConverterTest extends SqlToRelTestBase {
    * <a href="https://issues.apache.org/jira/browse/CALCITE-1944">[CALCITE-1944]
    * Window function applied to sub-query with dynamic star gets wrong
    * plan</a>. */
-  @Test void testWindowOnDynamicStar() throws Exception {
+  @Test void testWindowOnDynamicStar() {
     final String sql = "SELECT SUM(n_nationkey) OVER w\n"
         + "FROM (SELECT * FROM SALES.NATION) subQry\n"
         + "WINDOW w AS (PARTITION BY REGION ORDER BY n_nationkey)";
@@ -3325,17 +3291,17 @@ class SqlToRelConverterTest extends SqlToRelTestBase {
   /** Test case for
    * <a href="https://issues.apache.org/jira/browse/CALCITE-2366">[CALCITE-2366]
    * Add support for ANY_VALUE aggregate function</a>. */
-  @Test void testAnyValueAggregateFunctionNoGroupBy() throws Exception {
+  @Test void testAnyValueAggregateFunctionNoGroupBy() {
     final String sql = "SELECT any_value(empno) as anyempno FROM emp AS e";
     sql(sql).ok();
   }
 
-  @Test void testAnyValueAggregateFunctionGroupBy() throws Exception {
+  @Test void testAnyValueAggregateFunctionGroupBy() {
     final String sql = "SELECT any_value(empno) as anyempno FROM emp AS e group by e.sal";
     sql(sql).ok();
   }
 
-  @Test void testSomeAndEveryAggregateFunctions() throws Exception {
+  @Test void testSomeAndEveryAggregateFunctions() {
     final String sql = "SELECT some(empno = 130) as someempnoexists,\n"
         + " every(empno > 0) as everyempnogtzero\n"
         + " FROM emp AS e group by e.sal";
@@ -3712,9 +3678,7 @@ class SqlToRelConverterTest extends SqlToRelTestBase {
     sql(sql).ok();
   }
 
-  /**
-   * Tests left join lateral with using
-   */
+  /** Tests LEFT JOIN LATERAL with USING. */
   @Test void testLeftJoinLateral1() {
     final String sql = "select * from (values 4) as t(c)\n"
         + " left join lateral\n"
@@ -3723,9 +3687,7 @@ class SqlToRelConverterTest extends SqlToRelTestBase {
     sql(sql).ok();
   }
 
-  /**
-   * Tests left join lateral with natural join
-   */
+  /** Tests LEFT JOIN LATERAL with NATURAL JOIN. */
   @Test void testLeftJoinLateral2() {
     final String sql = "select * from (values 4) as t(c)\n"
         + " natural left join lateral\n"
@@ -3733,9 +3695,7 @@ class SqlToRelConverterTest extends SqlToRelTestBase {
     sql(sql).ok();
   }
 
-  /**
-   * Tests left join lateral with on condition
-   */
+  /** Tests LEFT JOIN LATERAL with ON condition. */
   @Test void testLeftJoinLateral3() {
     final String sql = "select * from (values 4) as t(c)\n"
         + " left join lateral\n"
@@ -3744,9 +3704,7 @@ class SqlToRelConverterTest extends SqlToRelTestBase {
     sql(sql).ok();
   }
 
-  /**
-   * Tests left join lateral with multiple columns from outer
-   */
+  /** Tests LEFT JOIN LATERAL with multiple columns from outer. */
   @Test void testLeftJoinLateral4() {
     final String sql = "select * from (values (4,5)) as t(c,d)\n"
         + " left join lateral\n"
@@ -3755,10 +3713,8 @@ class SqlToRelConverterTest extends SqlToRelTestBase {
     sql(sql).ok();
   }
 
-  /**
-   * Tests left join lateral with correlate variable coming
-   * from one level up join scope
-   */
+  /** Tests LEFT JOIN LATERAL with correlating variable coming
+   * from one level up join scope. */
   @Test void testLeftJoinLateral5() {
     final String sql = "select * from (values 4) as t (c)\n"
         + "left join lateral\n"
@@ -3770,9 +3726,7 @@ class SqlToRelConverterTest extends SqlToRelTestBase {
     sql(sql).ok();
   }
 
-  /**
-   * Tests cross join lateral with multiple columns from outer
-   */
+  /** Tests CROSS JOIN LATERAL with multiple columns from outer. */
   @Test void testCrossJoinLateral1() {
     final String sql = "select * from (values (4,5)) as t(c,d)\n"
         + " cross join lateral\n"
@@ -3781,10 +3735,8 @@ class SqlToRelConverterTest extends SqlToRelTestBase {
     sql(sql).ok();
   }
 
-  /**
-   * Tests cross join lateral with correlate variable coming
-   * from one level up join scope
-   */
+  /** Tests CROSS JOIN LATERAL with correlating variable coming
+   * from one level up join scope. */
   @Test void testCrossJoinLateral2() {
     final String sql = "select * from (values 4) as t (c)\n"
         + "cross join lateral\n"
diff --git a/core/src/test/java/org/apache/calcite/test/SqlValidatorTest.java b/core/src/test/java/org/apache/calcite/test/SqlValidatorTest.java
index 57a4ec3..48c2958 100644
--- a/core/src/test/java/org/apache/calcite/test/SqlValidatorTest.java
+++ b/core/src/test/java/org/apache/calcite/test/SqlValidatorTest.java
@@ -95,6 +95,7 @@ import static org.junit.jupiter.api.Assumptions.assumeTrue;
 class SqlValidatorTest extends SqlValidatorTestCase {
   //~ Static fields/initializers ---------------------------------------------
 
+  // CHECKSTYLE: IGNORE 1
   /**
    * @deprecated Deprecated so that usages of this constant will show up in
    * yellow in Intellij and maybe someone will fix them.
diff --git a/core/src/test/java/org/apache/calcite/test/TypeCoercionTest.java b/core/src/test/java/org/apache/calcite/test/TypeCoercionTest.java
index ddd0a47..d70a5dc 100644
--- a/core/src/test/java/org/apache/calcite/test/TypeCoercionTest.java
+++ b/core/src/test/java/org/apache/calcite/test/TypeCoercionTest.java
@@ -650,7 +650,7 @@ class TypeCoercionTest extends SqlValidatorTestCase {
         .type("RecordType(TIMESTAMP(0) NOT NULL EXPR$0) NOT NULL");
   }
 
-  /** Test case for {@link AbstractTypeCoercion#implicitCast} */
+  /** Test for {@link AbstractTypeCoercion#implicitCast}. */
   @Test void testImplicitCasts() {
     // TINYINT
     RelDataType checkedType1 = dataTypeFactory.createSqlType(SqlTypeName.TINYINT);
diff --git a/core/src/test/java/org/apache/calcite/test/catalog/Fixture.java b/core/src/test/java/org/apache/calcite/test/catalog/Fixture.java
index 7968d7c..2cf7cd8 100644
--- a/core/src/test/java/org/apache/calcite/test/catalog/Fixture.java
+++ b/core/src/test/java/org/apache/calcite/test/catalog/Fixture.java
@@ -157,7 +157,7 @@ final class Fixture extends AbstractFixture {
 }
 
 /**
- * Just a little trick to store factory ref before field init in fixture
+ * Just a little trick to store factory ref before field init in fixture.
  */
 abstract class AbstractFixture {
   final RelDataTypeFactory typeFactory;
diff --git a/core/src/test/java/org/apache/calcite/test/catalog/MockCatalogReader.java b/core/src/test/java/org/apache/calcite/test/catalog/MockCatalogReader.java
index fcad4d1..8c764c7 100644
--- a/core/src/test/java/org/apache/calcite/test/catalog/MockCatalogReader.java
+++ b/core/src/test/java/org/apache/calcite/test/catalog/MockCatalogReader.java
@@ -261,7 +261,7 @@ public abstract class MockCatalogReader extends CalciteCatalogReader {
 
   //~ Inner Classes ----------------------------------------------------------
 
-  /** Column resolver*/
+  /** Column resolver. */
   public interface ColumnResolver {
     List<Pair<RelDataTypeField, List<String>>> resolveColumn(
         RelDataType rowType, RelDataTypeFactory typeFactory, List<String> names);
diff --git a/core/src/test/java/org/apache/calcite/test/concurrent/ConcurrentTestCommand.java b/core/src/test/java/org/apache/calcite/test/concurrent/ConcurrentTestCommand.java
index 1f1598b..d3b898d 100644
--- a/core/src/test/java/org/apache/calcite/test/concurrent/ConcurrentTestCommand.java
+++ b/core/src/test/java/org/apache/calcite/test/concurrent/ConcurrentTestCommand.java
@@ -76,7 +76,7 @@ public interface ConcurrentTestCommand {
 
   /**
    * Indicates that a command should have failed, but instead succeeded, which
-   * is a test error
+   * is a test error.
    */
   class ShouldHaveFailedException extends RuntimeException {
     private final String description;
diff --git a/core/src/test/java/org/apache/calcite/test/concurrent/ConcurrentTestCommandExecutor.java b/core/src/test/java/org/apache/calcite/test/concurrent/ConcurrentTestCommandExecutor.java
index 0b523e9..7da70aa 100644
--- a/core/src/test/java/org/apache/calcite/test/concurrent/ConcurrentTestCommandExecutor.java
+++ b/core/src/test/java/org/apache/calcite/test/concurrent/ConcurrentTestCommandExecutor.java
@@ -80,7 +80,7 @@ class ConcurrentTestCommandExecutor extends Thread {
   private final PrintStream debugPrintStream;
 
   /**
-   * Command throwing error *
+   * Command throwing error.
    */
   private ConcurrentTestCommand errorCommand;
 
diff --git a/core/src/test/java/org/apache/calcite/test/concurrent/ConcurrentTestCommandGenerator.java b/core/src/test/java/org/apache/calcite/test/concurrent/ConcurrentTestCommandGenerator.java
index da25588..01b63bf 100644
--- a/core/src/test/java/org/apache/calcite/test/concurrent/ConcurrentTestCommandGenerator.java
+++ b/core/src/test/java/org/apache/calcite/test/concurrent/ConcurrentTestCommandGenerator.java
@@ -83,7 +83,7 @@ public class ConcurrentTestCommandGenerator {
   private TreeMap<Integer, String> threadNameMap;
 
   /**
-   * Describes a thread that failed
+   * Describes a thread that failed.
    */
   static class FailedThread {
     public final String name;
@@ -466,9 +466,7 @@ public class ConcurrentTestCommandGenerator {
     return !failedThreads.isEmpty();
   }
 
-  /**
-   * @return the list of failed threads (unmodifiable)
-   */
+  /** Returns the list of failed threads (unmodifiable). */
   public List<FailedThread> getFailedThreads() {
     return ImmutableList.copyOf(failedThreads);
   }
@@ -627,9 +625,7 @@ public class ConcurrentTestCommandGenerator {
 
   //~ Inner Classes ----------------------------------------------------------
 
-  /**
-   * abstract base to handle SQLExceptions
-   */
+  /** Abstract base to handle {@link SQLException}s. */
   protected abstract static class AbstractCommand
       implements ConcurrentTestCommand {
     private boolean shouldFail = false;
diff --git a/core/src/test/java/org/apache/calcite/test/concurrent/ConcurrentTestCommandScript.java b/core/src/test/java/org/apache/calcite/test/concurrent/ConcurrentTestCommandScript.java
index c684ad7..76ff9fc 100644
--- a/core/src/test/java/org/apache/calcite/test/concurrent/ConcurrentTestCommandScript.java
+++ b/core/src/test/java/org/apache/calcite/test/concurrent/ConcurrentTestCommandScript.java
@@ -343,7 +343,7 @@ public class ConcurrentTestCommandScript
 
   /**
    * Gets ready to execute: loads script FILENAME applying external variable
-   * BINDINGS
+   * BINDINGS.
    */
   private void prepare(String filename, List<String> bindings)
       throws IOException {
@@ -367,7 +367,7 @@ public class ConcurrentTestCommandScript
   }
 
   /**
-   * Executes the script
+   * Executes the script.
    */
   public void execute() throws Exception {
     scriptStartTime = System.currentTimeMillis();
@@ -497,7 +497,7 @@ public class ConcurrentTestCommandScript
   }
 
   /**
-   * Identifies the start of a comment line; same rules as sqlline
+   * Identifies the start of a comment line; same rules as sqlline.
    */
   private boolean isComment(String line) {
     return line.startsWith("--") || line.startsWith("#");
diff --git a/core/src/test/java/org/apache/calcite/test/concurrent/ConcurrentTestPlugin.java b/core/src/test/java/org/apache/calcite/test/concurrent/ConcurrentTestPlugin.java
index 62e9bd6..83fc7d3 100644
--- a/core/src/test/java/org/apache/calcite/test/concurrent/ConcurrentTestPlugin.java
+++ b/core/src/test/java/org/apache/calcite/test/concurrent/ConcurrentTestPlugin.java
@@ -24,7 +24,7 @@ import java.util.ArrayList;
 public abstract class ConcurrentTestPlugin {
 
   /**
-   * Should containing test be disabled?
+   * Returns whether the containing test should be disabled.
    *
    * @return true if containing test should be disabled
    */
diff --git a/core/src/test/java/org/apache/calcite/test/enumerable/EnumerableBatchNestedLoopJoinTest.java b/core/src/test/java/org/apache/calcite/test/enumerable/EnumerableBatchNestedLoopJoinTest.java
index 120a43e..3c6095e 100644
--- a/core/src/test/java/org/apache/calcite/test/enumerable/EnumerableBatchNestedLoopJoinTest.java
+++ b/core/src/test/java/org/apache/calcite/test/enumerable/EnumerableBatchNestedLoopJoinTest.java
@@ -33,7 +33,7 @@ import java.util.function.Consumer;
 
 /**
  * Unit test for
- * {@link org.apache.calcite.adapter.enumerable.EnumerableBatchNestedLoopJoin}
+ * {@link org.apache.calcite.adapter.enumerable.EnumerableBatchNestedLoopJoin}.
  */
 class EnumerableBatchNestedLoopJoinTest {
 
diff --git a/core/src/test/java/org/apache/calcite/test/enumerable/EnumerableCalcTest.java b/core/src/test/java/org/apache/calcite/test/enumerable/EnumerableCalcTest.java
index de35291..ce4feab 100644
--- a/core/src/test/java/org/apache/calcite/test/enumerable/EnumerableCalcTest.java
+++ b/core/src/test/java/org/apache/calcite/test/enumerable/EnumerableCalcTest.java
@@ -25,7 +25,7 @@ import org.junit.jupiter.api.Test;
 
 /**
  * Unit test for
- * {@link org.apache.calcite.adapter.enumerable.EnumerableCalc}
+ * {@link org.apache.calcite.adapter.enumerable.EnumerableCalc}.
  */
 class EnumerableCalcTest {
 
diff --git a/core/src/test/java/org/apache/calcite/test/enumerable/EnumerableCorrelateTest.java b/core/src/test/java/org/apache/calcite/test/enumerable/EnumerableCorrelateTest.java
index 1432d0e..f326e9e 100644
--- a/core/src/test/java/org/apache/calcite/test/enumerable/EnumerableCorrelateTest.java
+++ b/core/src/test/java/org/apache/calcite/test/enumerable/EnumerableCorrelateTest.java
@@ -39,7 +39,8 @@ import java.util.function.Consumer;
 class EnumerableCorrelateTest {
   /** Test case for
    * <a href="https://issues.apache.org/jira/browse/CALCITE-2605">[CALCITE-2605]
-   * NullPointerException when left outer join implemented with EnumerableCorrelate</a> */
+   * NullPointerException when left outer join implemented with
+   * EnumerableCorrelate</a>. */
   @Test void leftOuterJoinCorrelate() {
     tester(false, new JdbcTest.HrSchema())
         .query(
@@ -82,7 +83,7 @@ class EnumerableCorrelateTest {
 
   /** Test case for
    * <a href="https://issues.apache.org/jira/browse/CALCITE-2621">[CALCITE-2621]
-   * Add rule to execute semi joins with correlation</a> */
+   * Add rule to execute semi joins with correlation</a>. */
   @Test void semiJoinCorrelate() {
     tester(false, new JdbcTest.HrSchema())
         .query(
@@ -109,8 +110,8 @@ class EnumerableCorrelateTest {
 
   /** Test case for
    * <a href="https://issues.apache.org/jira/browse/CALCITE-2930">[CALCITE-2930]
-   * FilterCorrelateRule on a Correlate with SemiJoinType SEMI (or ANTI)
-   * throws IllegalStateException</a> */
+   * FilterCorrelateRule on a Correlate with SemiJoinType SEMI (or ANTI) throws
+   * IllegalStateException</a>. */
   @Test void semiJoinCorrelateWithFilterCorrelateRule() {
     tester(false, new JdbcTest.HrSchema())
         .query(
@@ -236,7 +237,7 @@ class EnumerableCorrelateTest {
 
   /** Test case for
    * <a href="https://issues.apache.org/jira/browse/CALCITE-2920">[CALCITE-2920]
-   * RelBuilder: new method to create an antijoin</a> */
+   * RelBuilder: new method to create an antijoin</a>. */
   @Test void antiJoinCorrelateWithNullValues() {
     final Integer salesDeptNo = 10;
     tester(false, new JdbcTest.HrSchema())
diff --git a/core/src/test/java/org/apache/calcite/test/enumerable/EnumerableSortedAggregateTest.java b/core/src/test/java/org/apache/calcite/test/enumerable/EnumerableSortedAggregateTest.java
index 225aa28..f39696b 100644
--- a/core/src/test/java/org/apache/calcite/test/enumerable/EnumerableSortedAggregateTest.java
+++ b/core/src/test/java/org/apache/calcite/test/enumerable/EnumerableSortedAggregateTest.java
@@ -29,11 +29,12 @@ import org.junit.jupiter.api.Test;
 
 import java.util.function.Consumer;
 
+/** Test for
+ * {@link org.apache.calcite.adapter.enumerable.EnumerableSortedAggregate}. */
 public class EnumerableSortedAggregateTest {
   @Test void sortedAgg() {
     tester(false, new JdbcTest.HrSchema())
-        .query(
-            "select deptno, "
+        .query("select deptno, "
             + "max(salary) as max_salary, count(name) as num_employee "
             + "from emps group by deptno")
         .withHook(Hook.PLANNER, (Consumer<RelOptPlanner>) planner -> {
diff --git a/core/src/test/java/org/apache/calcite/test/enumerable/EnumerableUncollectTest.java b/core/src/test/java/org/apache/calcite/test/enumerable/EnumerableUncollectTest.java
index d898575..92508c9 100644
--- a/core/src/test/java/org/apache/calcite/test/enumerable/EnumerableUncollectTest.java
+++ b/core/src/test/java/org/apache/calcite/test/enumerable/EnumerableUncollectTest.java
@@ -23,6 +23,7 @@ import org.apache.calcite.test.CalciteAssert;
 import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
 
+/** Test for {@link EnumerableUncollect}. */
 class EnumerableUncollectTest {
 
   @Test void simpleUnnestArray() {
diff --git a/core/src/test/java/org/apache/calcite/test/fuzzer/RexProgramFuzzyTest.java b/core/src/test/java/org/apache/calcite/test/fuzzer/RexProgramFuzzyTest.java
index f380327..41f95f0 100644
--- a/core/src/test/java/org/apache/calcite/test/fuzzer/RexProgramFuzzyTest.java
+++ b/core/src/test/java/org/apache/calcite/test/fuzzer/RexProgramFuzzyTest.java
@@ -91,7 +91,7 @@ class RexProgramFuzzyTest extends RexProgramBuilderBase {
   private static final Strong STRONG = Strong.of(ImmutableBitSet.of());
 
   /**
-   * A bounded variation of {@link PriorityQueue}
+   * A bounded variation of {@link PriorityQueue}.
    *
    * @param <E> the type of elements held in this collection
    */
diff --git a/core/src/test/java/org/apache/calcite/tools/PlannerTest.java b/core/src/test/java/org/apache/calcite/tools/PlannerTest.java
index 5d787e4..b3ddf40 100644
--- a/core/src/test/java/org/apache/calcite/tools/PlannerTest.java
+++ b/core/src/test/java/org/apache/calcite/tools/PlannerTest.java
@@ -542,7 +542,7 @@ class PlannerTest {
   }
 
   /** Unit test that parses, validates, converts and
-   * plans for query using order by */
+   * plans for query using ORDER BY. */
   @Test void testSortPlan() throws Exception {
     RuleSet ruleSet =
         RuleSets.ofList(
@@ -647,7 +647,7 @@ class PlannerTest {
   }
 
   /** Tests that outer order by is not removed since window function
-   * might reorder the rows in-between */
+   * might reorder the rows in-between. */
   @Test void testDuplicateSortPlanWithOver() throws Exception {
     runDuplicateSortCheck("select emp_cnt, empid+deptno from ( "
         + "select empid, deptno, count(*) over (partition by deptno) emp_cnt from ( "
@@ -796,7 +796,7 @@ class PlannerTest {
   }
 
   /** Unit test that calls {@link Planner#transform} twice with
-   * rule name conflicts */
+   * rule name conflicts. */
   @Test void testPlanTransformWithRuleNameConflicts() throws Exception {
     // Create two dummy rules with identical rules.
     RelOptRule rule1 = MyProjectFilterRule.config("MYRULE").toRule();
@@ -1166,6 +1166,7 @@ class PlannerTest {
     assertThat(toString(transform), containsString(expected));
   }
 
+  /** Rule that matches a Project on a Filter. */
   public static class MyProjectFilterRule
       extends RelRule<MyProjectFilterRule.Config> {
     static Config config(String description) {
@@ -1197,6 +1198,7 @@ class PlannerTest {
     }
   }
 
+  /** Rule that matches a Filter on a Project. */
   public static class MyFilterProjectRule
       extends RelRule<MyFilterProjectRule.Config> {
     static Config config(String description) {
diff --git a/core/src/test/java/org/apache/calcite/util/BitSetsTest.java b/core/src/test/java/org/apache/calcite/util/BitSetsTest.java
index d4bad57..a372f8d 100644
--- a/core/src/test/java/org/apache/calcite/util/BitSetsTest.java
+++ b/core/src/test/java/org/apache/calcite/util/BitSetsTest.java
@@ -187,9 +187,7 @@ class BitSetsTest {
     assertThat(BitSets.previousClearBit(BitSets.of(1, 3, 4), 1), equalTo(0));
   }
 
-  /**
-   * Tests the method {@link BitSets#closure(java.util.SortedMap)}
-   */
+  /** Tests the method {@link BitSets#closure(java.util.SortedMap)}. */
   @Test void testClosure() {
     final SortedMap<Integer, BitSet> empty = new TreeMap<>();
     assertThat(BitSets.closure(empty), equalTo(empty));
diff --git a/core/src/test/java/org/apache/calcite/util/Smalls.java b/core/src/test/java/org/apache/calcite/util/Smalls.java
index 19c434d..77859e1 100644
--- a/core/src/test/java/org/apache/calcite/util/Smalls.java
+++ b/core/src/test/java/org/apache/calcite/util/Smalls.java
@@ -297,9 +297,7 @@ public class Smalls {
     };
   }
 
-  /**
-   * A function that adds a number to the first column of input cursor
-   */
+  /** Table function that adds a number to the first column of input cursor. */
   public static QueryableTable processCursor(final int offset,
       final Enumerable<Object[]> a) {
     return new AbstractQueryableTable(Object[].class) {
@@ -606,9 +604,9 @@ public class Smalls {
     public static java.sql.Time toTimeFun(Long v) {
       return v == null ? null : SqlFunctions.internalToTime(v.intValue());
     }
-    /** for Overloaded user-defined functions that have Double and BigDecimal
-     * arguments will goes wrong
-     * */
+
+    /** For overloaded user-defined functions that have {@code double} and
+     * {@code BigDecimal} arguments will go wrong. */
     public static double toDouble(BigDecimal var) {
       return var == null ? null : var.doubleValue();
     }
@@ -661,7 +659,7 @@ public class Smalls {
     }
   }
 
-  /** A generic interface for defining user defined aggregate functions
+  /** A generic interface for defining user-defined aggregate functions.
    *
    * @param <A> accumulator type
    * @param <V> value type
diff --git a/core/src/test/java/org/apache/calcite/util/SourceTest.java b/core/src/test/java/org/apache/calcite/util/SourceTest.java
index 1be1b31..6546dcb 100644
--- a/core/src/test/java/org/apache/calcite/util/SourceTest.java
+++ b/core/src/test/java/org/apache/calcite/util/SourceTest.java
@@ -63,7 +63,7 @@ class SourceTest {
   }
 
   /**
-   * Read lines from {@link CharSource}
+   * Read lines from {@link CharSource}.
    */
   @Test void charSource() throws IOException {
     Source source = Sources.fromCharSource(CharSource.wrap("a\nb"));
diff --git a/core/src/test/java/org/apache/calcite/util/TestUtilTest.java b/core/src/test/java/org/apache/calcite/util/TestUtilTest.java
index 43c96c4..2708d96 100644
--- a/core/src/test/java/org/apache/calcite/util/TestUtilTest.java
+++ b/core/src/test/java/org/apache/calcite/util/TestUtilTest.java
@@ -22,7 +22,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
 /**
- * Tests for TestUtil
+ * Tests for TestUtil.
  */
 class TestUtilTest {
 
diff --git a/druid/src/main/java/org/apache/calcite/adapter/druid/BinaryOperatorConversion.java b/druid/src/main/java/org/apache/calcite/adapter/druid/BinaryOperatorConversion.java
index f8260b9..64a0d1b 100644
--- a/druid/src/main/java/org/apache/calcite/adapter/druid/BinaryOperatorConversion.java
+++ b/druid/src/main/java/org/apache/calcite/adapter/druid/BinaryOperatorConversion.java
@@ -24,7 +24,8 @@ import org.apache.calcite.sql.SqlOperator;
 import java.util.List;
 
 /**
- * Binary operator conversion utility class used to convert expression like exp1 Operator exp2
+ * Binary operator conversion utility class; used to convert expressions like
+ * {@code exp1 Operator exp2}.
  */
 public class BinaryOperatorConversion implements DruidSqlOperatorConverter {
   private final SqlOperator operator;
diff --git a/druid/src/main/java/org/apache/calcite/adapter/druid/CeilOperatorConversion.java b/druid/src/main/java/org/apache/calcite/adapter/druid/CeilOperatorConversion.java
index df840e4..3207759 100644
--- a/druid/src/main/java/org/apache/calcite/adapter/druid/CeilOperatorConversion.java
+++ b/druid/src/main/java/org/apache/calcite/adapter/druid/CeilOperatorConversion.java
@@ -30,7 +30,8 @@ import java.util.TimeZone;
 import javax.annotation.Nullable;
 
 /**
- * DruidSqlOperatorConverter implementation that handles Ceil operations conversions
+ * DruidSqlOperatorConverter implementation that handles Ceil operations
+ * conversions.
  */
 public class CeilOperatorConversion implements DruidSqlOperatorConverter {
   @Override public SqlOperator calciteOperator() {
diff --git a/druid/src/main/java/org/apache/calcite/adapter/druid/ComplexMetric.java b/druid/src/main/java/org/apache/calcite/adapter/druid/ComplexMetric.java
index 0b5577b..27a58f4 100644
--- a/druid/src/main/java/org/apache/calcite/adapter/druid/ComplexMetric.java
+++ b/druid/src/main/java/org/apache/calcite/adapter/druid/ComplexMetric.java
@@ -20,18 +20,14 @@ import org.apache.calcite.rel.core.AggregateCall;
 import org.apache.calcite.sql.SqlKind;
 
 /**
- * Used to store information about available complex metrics in the Druid Adapter
- * */
+ * Stores information about available complex metrics in the Druid Adapter.
+ */
 public class ComplexMetric {
 
-  /**
-   * The underlying metric column this complex metric represents
-   * */
+  /** The underlying metric column that this complex metric represents. */
   private final String metricName;
 
-  /**
-   * The type of this metric
-   * */
+  /** The type of this metric. */
   private final DruidType type;
 
   public ComplexMetric(String metricName, DruidType type) {
diff --git a/druid/src/main/java/org/apache/calcite/adapter/druid/DruidDateTimeUtils.java b/druid/src/main/java/org/apache/calcite/adapter/druid/DruidDateTimeUtils.java
index 30a77d7..db7997f 100644
--- a/druid/src/main/java/org/apache/calcite/adapter/druid/DruidDateTimeUtils.java
+++ b/druid/src/main/java/org/apache/calcite/adapter/druid/DruidDateTimeUtils.java
@@ -330,9 +330,12 @@ public class DruidDateTimeUtils {
   }
 
   /**
+   * Converts a granularity to ISO period format.
+   *
    * @param type Druid Granularity  to translate as period of time
    *
-   * @return String representing the granularity as ISO8601 Period of Time, null for unknown case.
+   * @return String representing the granularity as ISO8601 Period of Time; null
+   * for unknown case
    */
   @Nullable
   public static String toISOPeriodFormat(Granularity.Type type) {
@@ -359,7 +362,8 @@ public class DruidDateTimeUtils {
   }
 
   /**
-   * Translates Calcite TimeUnitRange to Druid {@link Granularity}
+   * Translates a Calcite {@link TimeUnitRange} to a Druid {@link Granularity}.
+   *
    * @param timeUnit Calcite Time unit to convert
    *
    * @return Druid Granularity or null
diff --git a/druid/src/main/java/org/apache/calcite/adapter/druid/DruidExpressions.java b/druid/src/main/java/org/apache/calcite/adapter/druid/DruidExpressions.java
index ff2805f..5bd22c9 100644
--- a/druid/src/main/java/org/apache/calcite/adapter/druid/DruidExpressions.java
+++ b/druid/src/main/java/org/apache/calcite/adapter/druid/DruidExpressions.java
@@ -44,10 +44,10 @@ import javax.annotation.Nullable;
  */
 public class DruidExpressions {
 
-  /**
-   * Type mapping between Calcite SQL family types and native Druid expression types
-   */
+  /** Type mapping between Calcite SQL family types and native Druid expression
+   * types. */
   static final Map<SqlTypeName, DruidType> EXPRESSION_TYPES;
+
   /**
    * Druid expression safe chars, must be sorted.
    */
@@ -88,12 +88,14 @@ public class DruidExpressions {
 
 
   /**
-   * Translates Calcite rexNode to Druid Expression when possible
-   * @param rexNode rexNode to convert to a Druid Expression
-   * @param inputRowType input row type of the rexNode to translate
+   * Translates a Calcite {@link RexNode} to a Druid expression, if possible;
+   * returns null if not possible.
+   *
+   * @param rexNode RexNode to convert to a Druid Expression
+   * @param inputRowType Input row type of the rexNode to translate
    * @param druidRel Druid query
    *
-   * @return Druid Expression or null when can not convert the RexNode
+   * @return Druid Expression, or null when can not convert the RexNode
    */
   @Nullable
   public static String toDruidExpression(
diff --git a/druid/src/main/java/org/apache/calcite/adapter/druid/DruidJsonFilter.java b/druid/src/main/java/org/apache/calcite/adapter/druid/DruidJsonFilter.java
index 10ef5ca..669d745 100644
--- a/druid/src/main/java/org/apache/calcite/adapter/druid/DruidJsonFilter.java
+++ b/druid/src/main/java/org/apache/calcite/adapter/druid/DruidJsonFilter.java
@@ -50,16 +50,19 @@ abstract class DruidJsonFilter implements DruidJson {
       getDateFormatter(ISO_DATETIME_FRACTIONAL_SECOND_FORMAT);
 
   /**
-   * @param rexNode    rexNode to translate to Druid Json Filter
-   * @param rowType    rowType associated to rexNode
-   * @param druidQuery druid query
+   * Converts a {@link RexNode} to a Druid JSON filter.
    *
-   * @return Druid Json filter or null if it can not translate
+   * @param rexNode    RexNode to translate to Druid Json Filter
+   * @param rowType    Row type associated to rexNode
+   * @param druidQuery Druid query
+   *
+   * @return Druid JSON filter, or null if it cannot translate
    */
   @Nullable
-  private static DruidJsonFilter toEqualityKindDruidFilter(RexNode rexNode, RelDataType rowType,
-      DruidQuery druidQuery) {
-    if (rexNode.getKind() != SqlKind.EQUALS && rexNode.getKind() != SqlKind.NOT_EQUALS) {
+  private static DruidJsonFilter toEqualityKindDruidFilter(RexNode rexNode,
+      RelDataType rowType, DruidQuery druidQuery) {
+    if (rexNode.getKind() != SqlKind.EQUALS
+        && rexNode.getKind() != SqlKind.NOT_EQUALS) {
       throw new AssertionError(
           DruidQuery.format("Expecting EQUALS or NOT_EQUALS but got [%s]", rexNode.getKind()));
     }
@@ -88,7 +91,7 @@ abstract class DruidJsonFilter implements DruidJson {
     }
     final String literalValue = toDruidLiteral(rexLiteral, rowType, druidQuery);
     if (literalValue == null) {
-      // can not translate literal better bail out
+      // cannot translate literal; better bail out
       return null;
     }
     final boolean isNumeric = refNode.getType().getFamily() == SqlTypeFamily.NUMERIC
@@ -118,11 +121,14 @@ abstract class DruidJsonFilter implements DruidJson {
 
 
   /**
-   * @param rexNode    rexNode to translate
-   * @param rowType    row type associated to Filter
-   * @param druidQuery druid query
+   * Converts a {@link RexNode} to a Druid JSON bound filter.
+   *
+   * @param rexNode    RexNode to translate
+   * @param rowType    Row type associated to Filter
+   * @param druidQuery Druid query
    *
-   * @return valid Druid Json Bound Filter or null if it can not translate the rexNode.
+   * @return valid Druid JSON Bound Filter, or null if it cannot translate the
+   * RexNode
    */
   @Nullable
   private static DruidJsonFilter toBoundDruidFilter(RexNode rexNode, RelDataType rowType,
@@ -150,18 +156,20 @@ abstract class DruidJsonFilter implements DruidJson {
     }
 
     if (RexLiteral.isNullLiteral(rexLiteral)) {
-      // we are not handling is NULL filter here thus we bail out if Literal is null
+      // we are not handling is NULL filter here; thus we bail out if Literal is
+      // null
       return null;
     }
-    final String literalValue = DruidJsonFilter.toDruidLiteral(rexLiteral, rowType, druidQuery);
+    final String literalValue =
+        DruidJsonFilter.toDruidLiteral(rexLiteral, rowType, druidQuery);
     if (literalValue == null) {
-      // can not translate literal better bail out
+      // cannot translate literal; better bail out
       return null;
     }
     final boolean isNumeric = refNode.getType().getFamily() == SqlTypeFamily.NUMERIC
         || rexLiteral.getType().getFamily() == SqlTypeFamily.NUMERIC;
-    final Pair<String, ExtractionFunction> druidColumn = DruidQuery.toDruidColumn(refNode, rowType,
-        druidQuery);
+    final Pair<String, ExtractionFunction> druidColumn =
+        DruidQuery.toDruidColumn(refNode, rowType, druidQuery);
     final String columnName = druidColumn.left;
     final ExtractionFunction extractionFunction = druidColumn.right;
     if (columnName == null) {
@@ -199,11 +207,14 @@ abstract class DruidJsonFilter implements DruidJson {
   }
 
   /**
-   * @param rexNode    rexNode to translate to Druid literal equivalante
-   * @param rowType    rowType associated to rexNode
-   * @param druidQuery druid Query
+   * Converts a {@link RexNode} to a Druid literal.
    *
-   * @return non null string or null if it can not translate to valid Druid equivalent
+   * @param rexNode    RexNode to translate to Druid literal equivalant
+   * @param rowType    Row type associated to rexNode
+   * @param druidQuery Druid query
+   *
+   * @return non null string, or null if it cannot translate to valid Druid
+   * equivalent
    */
   @Nullable
   private static String toDruidLiteral(RexNode rexNode, RelDataType rowType,
@@ -356,11 +367,14 @@ abstract class DruidJsonFilter implements DruidJson {
   }
 
   /**
-   * @param rexNode    rexNode to translate to Druid Filter
-   * @param rowType    rowType of filter input
+   * Converts a {@link RexNode} to a Druid filter.
+   *
+   * @param rexNode    RexNode to translate to Druid Filter
+   * @param rowType    Row type of filter input
    * @param druidQuery Druid query
    *
-   * @return Druid Json Filters or null when can not translate to valid Druid Filters.
+   * @return Druid Json filters, or null when cannot translate to valid Druid
+   * filters
    */
   @Nullable
   static DruidJsonFilter toDruidFilters(final RexNode rexNode, RelDataType rowType,
@@ -411,9 +425,7 @@ abstract class DruidJsonFilter implements DruidJson {
     return expression == null ? null : new JsonExpressionFilter(expression);
   }
 
-  /**
-   * Supported filter types
-   */
+  /** Supported filter types. */
   protected enum Type {
     AND,
     OR,
@@ -613,9 +625,7 @@ abstract class DruidJsonFilter implements DruidJson {
     return new JsonSelector(column, value, extractionFunction);
   }
 
-  /**
-   * Druid Having Filter spec
-   */
+  /** Druid Having Filter spec. */
   protected static class JsonDimHavingFilter implements DruidJson {
 
     private final DruidJsonFilter filter;
diff --git a/druid/src/main/java/org/apache/calcite/adapter/druid/DruidQuery.java b/druid/src/main/java/org/apache/calcite/adapter/druid/DruidQuery.java
index 2fa2e49..509d9e7 100644
--- a/druid/src/main/java/org/apache/calcite/adapter/druid/DruidQuery.java
+++ b/druid/src/main/java/org/apache/calcite/adapter/druid/DruidQuery.java
@@ -186,7 +186,7 @@ public class DruidQuery extends AbstractRelNode implements BindableRel {
     this.intervals = ImmutableList.copyOf(intervals);
     this.rels = ImmutableList.copyOf(rels);
     this.converterOperatorMap = Objects.requireNonNull(converterOperatorMap,
-        "Operator map can not be null");
+        "Operator map cannot be null");
     assert isValid(Litmus.THROW, null);
   }
 
@@ -250,12 +250,15 @@ public class DruidQuery extends AbstractRelNode implements BindableRel {
   }
 
   /**
+   * Converts a {@link RexNode} to a Druid column.
+   *
    * @param rexNode    leaf Input Ref to Druid Column
    * @param rowType    row type
-   * @param druidQuery druid query
+   * @param druidQuery Druid query
    *
-   * @return {@link Pair} of Column name and Extraction Function on the top of the input ref or
-   * {@link Pair of(null, null)} when can not translate to valid Druid column
+   * @return {@link Pair} of Column name and Extraction Function on the top of
+   * the input ref, or {@code Pair.of(null, null)} when cannot translate to a
+   * valid Druid column
    */
   protected static Pair<String, ExtractionFunction> toDruidColumn(RexNode rexNode,
       RelDataType rowType, DruidQuery druidQuery) {
@@ -350,9 +353,12 @@ public class DruidQuery extends AbstractRelNode implements BindableRel {
   }
 
   /**
-   * @param rexNode rexNode
+   * Returns whether a {@link RexNode} is a valid Druid cast operation.
    *
-   * @return true if the operand is an inputRef and it is a valid Druid Cast operation
+   * @param rexNode RexNode
+   *
+   * @return whether the operand is an inputRef and it is a valid Druid Cast
+   * operation
    */
   private static boolean isValidLeafCast(RexNode rexNode) {
     assert rexNode.isA(SqlKind.CAST);
@@ -385,11 +391,11 @@ public class DruidQuery extends AbstractRelNode implements BindableRel {
   }
 
   /**
-   * @param rexNode Druid input ref node
-   * @param rowType rowType
-   * @param query Druid Query
+   * Returns Druid column name or null when it is not possible to translate.
    *
-   * @return Druid column name or null when not possible to translate.
+   * @param rexNode Druid input ref node
+   * @param rowType Row type
+   * @param query Druid query
    */
   @Nullable
   protected static String extractColumnName(RexNode rexNode, RelDataType rowType,
@@ -720,7 +726,7 @@ public class DruidQuery extends AbstractRelNode implements BindableRel {
    * @param filterRel input filter rel
    * @param druidQuery Druid query
    *
-   * @return DruidJson Filter or null if can not translate one of filters
+   * @return DruidJson Filter or null if cannot translate one of filters
    */
   @Nullable
   private static DruidJsonFilter computeFilter(@Nullable Filter filterRel,
@@ -737,15 +743,18 @@ public class DruidQuery extends AbstractRelNode implements BindableRel {
   }
 
   /**
-   * Translates list of projects to Druid Column names and Virtual Columns if any
-   * We can not use {@link Pair#zip(Object[], Object[])}, since size can be different
+   * Translates a list of projects to Druid Column names and Virtual Columns if
+   * any.
+   *
+   * <p>We cannot use {@link Pair#zip(Object[], Object[])}, since size may be
+   * different.
    *
-   * @param projectRel       Project Rel
+   * @param projectRel Project
    *
    * @param druidQuery Druid query
    *
-   * @return Pair of list of Druid Columns and Expression Virtual Columns or null when can not
-   * translate one of the projects.
+   * @return Pair of list of Druid Columns and Expression Virtual Columns, or
+   * null when cannot translate one of the projects
    */
   @Nullable
   protected static Pair<List<String>, List<VirtualColumn>> computeProjectAsScan(
@@ -806,7 +815,7 @@ public class DruidQuery extends AbstractRelNode implements BindableRel {
    * @param projectNode Project under the Aggregates if any
    * @param groupSet Ids of grouping keys as they are listed in {@code projects} list
    * @param inputRowType Input row type under the project
-   * @param druidQuery Druid Query
+   * @param druidQuery Druid query
    *
    * @return A list of {@link DimensionSpec} containing the group by dimensions,
    * and a list of {@link VirtualColumn} containing Druid virtual column
@@ -894,7 +903,7 @@ public class DruidQuery extends AbstractRelNode implements BindableRel {
    * @param project Input project under the aggregate calls,
    *               or null if we have {@link TableScan} immediately under the
    *               {@link Aggregate}
-   * @param druidQuery Druid Query Rel
+   * @param druidQuery Druid query
    *
    * @return List of valid Druid {@link JsonAggregation}s, or null if any of the
    * aggregates is not supported
@@ -1110,22 +1119,23 @@ public class DruidQuery extends AbstractRelNode implements BindableRel {
         virtualColumnList, aggregations, postAggs, limit, havingJsonFilter);
 
     if (groupByQuery == null) {
-      throw new IllegalStateException("Can not plan Druid Query");
+      throw new IllegalStateException("Cannot plan Druid Query");
     }
     return new QuerySpec(QueryType.GROUP_BY, groupByQuery, queryOutputFieldNames);
   }
 
   /**
+   * Converts a sort specification to a {@link JsonLimit} (never null).
+   *
    * @param fetch limit to fetch
    * @param collationIndexes index of fields as listed in query row output
    * @param collationDirections direction of sort
    * @param numericCollationIndexes flag of to determine sort comparator
    * @param queryOutputFieldNames query output fields
-   *
-   * @return always an non null Json Limit object
    */
-  private JsonLimit computeSort(@Nullable Integer fetch, List<Integer> collationIndexes,
-      List<Direction> collationDirections, ImmutableBitSet numericCollationIndexes,
+  private @Nonnull JsonLimit computeSort(@Nullable Integer fetch,
+      List<Integer> collationIndexes, List<Direction> collationDirections,
+      ImmutableBitSet numericCollationIndexes,
       List<String> queryOutputFieldNames) {
     final List<JsonCollation> collations;
     if (collationIndexes != null) {
@@ -1180,7 +1190,8 @@ public class DruidQuery extends AbstractRelNode implements BindableRel {
     if (groupByKeyDims.size() == 1) {
       DimensionSpec dimensionSpec = Iterables.getOnlyElement(groupByKeyDims);
       Granularity granularity = ExtractionDimensionSpec.toQueryGranularity(dimensionSpec);
-      // case we have project expression on the top of the time extract then can not use timeseries
+      // case we have project expression on the top of the time extract then
+      // cannot use timeseries
       boolean hasExpressionOnTopOfTimeExtract = false;
       for (JsonExpressionPostAgg postAgg : postAggregations) {
         if (postAgg instanceof JsonExpressionPostAgg) {
@@ -1191,7 +1202,7 @@ public class DruidQuery extends AbstractRelNode implements BindableRel {
       }
       timeseriesGranularity = hasExpressionOnTopOfTimeExtract ? null : granularity;
       if (timeseriesGranularity == null) {
-        // can not extract granularity bailout
+        // cannot extract granularity bailout
         return null;
       }
     } else {
@@ -1309,9 +1320,7 @@ public class DruidQuery extends AbstractRelNode implements BindableRel {
     return sw.toString();
   }
 
-  /**
-   * Druid Scan Query Body
-   */
+  /** Druid Scan Query body. */
   private static class ScanQuery {
 
     private String dataSource;
@@ -1455,7 +1464,7 @@ public class DruidQuery extends AbstractRelNode implements BindableRel {
       DruidJsonFilter druidFilter = DruidJsonFilter
           .toDruidFilters(filterNode, druidQuery.table.getRowType(), druidQuery);
       if (druidFilter == null) {
-        // can not translate filter
+        // cannot translate filter
         return null;
       }
       return new JsonFilteredAggregation(druidFilter, aggregation);
@@ -1739,7 +1748,7 @@ public class DruidQuery extends AbstractRelNode implements BindableRel {
     }
   }
 
-  /** Aggregation element that contains a filter */
+  /** Aggregation element that contains a filter. */
   private static class JsonFilteredAggregation extends JsonAggregation {
     final DruidJsonFilter filter;
     final JsonAggregation aggregation;
@@ -1761,7 +1770,7 @@ public class DruidQuery extends AbstractRelNode implements BindableRel {
     }
   }
 
-  /** Post-Aggregator Post aggregator abstract writer */
+  /** Post-aggregator abstract writer. */
   protected abstract static class JsonPostAggregation implements DruidJson {
     final String type;
     String name;
@@ -1784,9 +1793,7 @@ public class DruidQuery extends AbstractRelNode implements BindableRel {
 
   }
 
-  /**
-   * @return index of the timestamp ref or -1 if not present
-   */
+  /** Returns the index of the timestamp ref, or -1 if not present. */
   protected int getTimestampFieldIndex() {
     return Iterables.indexOf(this.getRowType().getFieldList(),
         input -> druidTable.timestampFieldName.equals(input.getName()));
diff --git a/druid/src/main/java/org/apache/calcite/adapter/druid/DruidRules.java b/druid/src/main/java/org/apache/calcite/adapter/druid/DruidRules.java
index 1b8fffe..bb7a271 100644
--- a/druid/src/main/java/org/apache/calcite/adapter/druid/DruidRules.java
+++ b/druid/src/main/java/org/apache/calcite/adapter/druid/DruidRules.java
@@ -313,9 +313,7 @@ public class DruidRules {
     }
   }
 
-  /**
-   * Rule to Push a Having {@link Filter} into a {@link DruidQuery}
-   */
+  /** Rule to Push a Having {@link Filter} into a {@link DruidQuery}. */
   public static class DruidHavingFilterRule
       extends RelRule<DruidHavingFilterRule.Config> {
 
@@ -596,10 +594,8 @@ public class DruidRules {
       call.transformTo(query2);
     }
 
-    /**
-     * Returns an array of unique filter references from
-     * the given list of {@link org.apache.calcite.rel.core.AggregateCall}
-     * */
+    /** Returns an array of unique filter references from the given list of
+     * {@link org.apache.calcite.rel.core.AggregateCall}s. */
     private Set<Integer> getUniqueFilterRefs(List<AggregateCall> calls) {
       Set<Integer> refs = new HashSet<>();
       for (AggregateCall call : calls) {
diff --git a/druid/src/main/java/org/apache/calcite/adapter/druid/DruidSqlCastConverter.java b/druid/src/main/java/org/apache/calcite/adapter/druid/DruidSqlCastConverter.java
index fda03e9..b38ead5 100644
--- a/druid/src/main/java/org/apache/calcite/adapter/druid/DruidSqlCastConverter.java
+++ b/druid/src/main/java/org/apache/calcite/adapter/druid/DruidSqlCastConverter.java
@@ -31,7 +31,8 @@ import org.joda.time.Period;
 import java.util.TimeZone;
 
 /**
- * Druid cast converter operator used to translates calcite casts to Druid expression cast
+ * Druid cast converter operator; used to translates Calcite casts to Druid
+ * expression casts.
  */
 public class DruidSqlCastConverter implements DruidSqlOperatorConverter {
 
diff --git a/druid/src/main/java/org/apache/calcite/adapter/druid/DruidSqlOperatorConverter.java b/druid/src/main/java/org/apache/calcite/adapter/druid/DruidSqlOperatorConverter.java
index 71396e5..18c9048 100644
--- a/druid/src/main/java/org/apache/calcite/adapter/druid/DruidSqlOperatorConverter.java
+++ b/druid/src/main/java/org/apache/calcite/adapter/druid/DruidSqlOperatorConverter.java
@@ -23,7 +23,8 @@ import org.apache.calcite.sql.SqlOperator;
 import javax.annotation.Nullable;
 
 /**
- * Defines how to convert RexNode with a given calcite SQL operator to Druid expressions
+ * Defines how to convert a {@link RexNode} with a given Calcite SQL operator to
+ * a Druid expression.
  */
 public interface DruidSqlOperatorConverter {
 
diff --git a/druid/src/main/java/org/apache/calcite/adapter/druid/DruidTable.java b/druid/src/main/java/org/apache/calcite/adapter/druid/DruidTable.java
index 9c9f43c..307d154 100644
--- a/druid/src/main/java/org/apache/calcite/adapter/druid/DruidTable.java
+++ b/druid/src/main/java/org/apache/calcite/adapter/druid/DruidTable.java
@@ -213,20 +213,17 @@ public class DruidTable extends AbstractTable implements TranslatableTable {
             || kind == SqlKind.TIMES;
   }
 
-  /**
-   * Returns the list of {@link ComplexMetric} that match the given <code>alias</code> if it exists,
-   * otherwise returns an empty list, never <code>null</code>
-   * */
+  /** Returns the list of {@link ComplexMetric} that match the given
+   * <code>alias</code> if it exists, otherwise returns an empty list, never
+   * <code>null</code>. */
   public List<ComplexMetric> getComplexMetricsFrom(String alias) {
     return complexMetrics.containsKey(alias)
             ? complexMetrics.get(alias)
             : new ArrayList<>();
   }
 
-  /**
-   * Returns true if and only if the given <code>alias</code> is a reference to a registered
-   * {@link ComplexMetric}
-   * */
+  /** Returns whether the given <code>alias</code> is a reference to a
+   * registered {@link ComplexMetric}. */
   public boolean isComplexMetric(String alias) {
     return complexMetrics.get(alias) != null;
   }
diff --git a/druid/src/main/java/org/apache/calcite/adapter/druid/DruidType.java b/druid/src/main/java/org/apache/calcite/adapter/druid/DruidType.java
index d866381..2e178c9 100644
--- a/druid/src/main/java/org/apache/calcite/adapter/druid/DruidType.java
+++ b/druid/src/main/java/org/apache/calcite/adapter/druid/DruidType.java
@@ -35,16 +35,13 @@ public enum DruidType {
     this.sqlType = sqlType;
   }
 
-  /**
-   * Returns true if and only if this enum should be used inside of a {@link ComplexMetric}
-   * */
+  /** Returns whether this type should be used inside a
+   * {@link ComplexMetric}. */
   public boolean isComplex() {
     return this == THETA_SKETCH || this == HYPER_UNIQUE || this == COMPLEX;
   }
 
-  /**
-   * Returns a DruidType matching the given String type from a Druid metric
-   * */
+  /** Returns a DruidType matching the given String type from a Druid metric. */
   protected static DruidType getTypeFromMetric(String type) {
     assert type != null;
     if (type.equals("hyperUnique")) {
@@ -61,9 +58,7 @@ public enum DruidType {
     throw new AssertionError("Unknown type: " + type);
   }
 
-  /**
-   * Returns a DruidType matching the String from a meta data query
-   * */
+  /** Returns a DruidType matching the String from a meta data query. */
   protected static DruidType getTypeFromMetaData(String type) {
     assert type != null;
     switch (type) {
diff --git a/druid/src/main/java/org/apache/calcite/adapter/druid/ExtractOperatorConversion.java b/druid/src/main/java/org/apache/calcite/adapter/druid/ExtractOperatorConversion.java
index d6b7074..c0750a2 100644
--- a/druid/src/main/java/org/apache/calcite/adapter/druid/ExtractOperatorConversion.java
+++ b/druid/src/main/java/org/apache/calcite/adapter/druid/ExtractOperatorConversion.java
@@ -32,11 +32,13 @@ import java.util.Map;
 import java.util.TimeZone;
 
 /**
- * Time extract operator conversion for expressions like EXTRACT(timeUnit FROM arg)
- * Unit can be SECOND, MINUTE, HOUR, DAY (day of month),
- * DOW (day of week), DOY (day of year), WEEK (week of week year),
- * MONTH (1 through 12), QUARTER (1 through 4), or YEAR
- **/
+ * Time extract operator conversion for expressions like
+ * {@code EXTRACT(timeUnit FROM arg)}.
+ *
+ * <p>Unit can be SECOND, MINUTE, HOUR, DAY (day of month), DOW (day of week),
+ * DOY (day of year), WEEK (week of week year), MONTH (1 through 12), QUARTER (1
+ * through 4), or YEAR.
+ */
 public class ExtractOperatorConversion implements DruidSqlOperatorConverter {
   private static final Map<TimeUnitRange, String> EXTRACT_UNIT_MAP =
       ImmutableMap.<TimeUnitRange, String>builder()
diff --git a/druid/src/main/java/org/apache/calcite/adapter/druid/ExtractionDimensionSpec.java b/druid/src/main/java/org/apache/calcite/adapter/druid/ExtractionDimensionSpec.java
index 778c12d..e5f2e51 100644
--- a/druid/src/main/java/org/apache/calcite/adapter/druid/ExtractionDimensionSpec.java
+++ b/druid/src/main/java/org/apache/calcite/adapter/druid/ExtractionDimensionSpec.java
@@ -76,10 +76,10 @@ public class ExtractionDimensionSpec implements DimensionSpec {
     generator.writeEndObject();
   }
 
-  /**
-   * @param dimensionSpec Druid Dimesion spec object
+  /** Returns a valid {@link Granularity} of floor extract, or null when not
+   * possible.
    *
-   * @return valid {@link Granularity} of floor extract or null when not possible.
... 2530 lines suppressed ...