2019-06-20 14:06:52 -04:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!--
|
|
|
|
~ 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.
|
|
|
|
-->
|
|
|
|
|
|
|
|
<!--
|
|
|
|
To enforce Spotbugs into the codebase, first, all the errors are
|
|
|
|
ignored, so we can add them one by one.
|
|
|
|
|
|
|
|
Some of the bugs will only occur once or twice on the codebase,
|
|
|
|
while others will occur potentially a lot.
|
|
|
|
|
2020-01-03 12:33:19 -05:00
|
|
|
Reference: https://github.com/apache/druid/pull/7894/files
|
2019-06-20 14:06:52 -04:00
|
|
|
-->
|
|
|
|
<FindBugsFilter>
|
2022-02-08 05:53:15 -05:00
|
|
|
<Match>
|
|
|
|
<Or>
|
|
|
|
<Class name="org.apache.druid.sql.calcite.parser.SimpleCharStream"/>
|
|
|
|
<Class name="org.apache.druid.sql.calcite.parser.TokenMgrError"/>
|
|
|
|
<Class name="org.apache.druid.sql.calcite.parser.Token"/>
|
|
|
|
<Class name="org.apache.druid.sql.calcite.parser.DruidSqlParserImplTokenManager"/>
|
|
|
|
<Class name="org.apache.druid.sql.calcite.parser.DruidSqlParserImplConstants"/>
|
|
|
|
<Class name="org.apache.druid.sql.calcite.parser.DruidSqlParserImpl"/>
|
|
|
|
<Class name="org.apache.druid.sql.calcite.parser.DruidSqlParserImpl$JJCalls"/>
|
|
|
|
</Or>
|
|
|
|
</Match>
|
2020-08-05 18:39:58 -04:00
|
|
|
<!-- Ignore "equals" bugs for JsonInclude filter classes. They rely on strange-looking "equals" methods. -->
|
|
|
|
<Match>
|
|
|
|
<And>
|
|
|
|
<Bug pattern="EQ_CHECK_FOR_OPERAND_NOT_COMPATIBLE_WITH_THIS"/>
|
|
|
|
<Or>
|
Always return sketches from DS_HLL, DS_THETA, DS_QUANTILES_SKETCH. (#13247)
* Always return sketches from DS_HLL, DS_THETA, DS_QUANTILES_SKETCH.
These aggregation functions are documented as creating sketches. However,
they are planned into native aggregators that include finalization logic
to convert the sketch to a number of some sort. This creates an
inconsistency: the functions sometimes return sketches, and sometimes
return numbers, depending on where they lie in the native query plan.
This patch changes these SQL aggregators to _never_ finalize, by using
the "shouldFinalize" feature of the native aggregators. It already
existed for theta sketches. This patch adds the feature for hll and
quantiles sketches.
As to impact, Druid finalizes aggregators in two cases:
- When they appear in the outer level of a query (not a subquery).
- When they are used as input to an expression or finalizing-field-access
post-aggregator (not any other kind of post-aggregator).
With this patch, the functions will no longer be finalized in these cases.
The second item is not likely to matter much. The SQL functions all declare
return type OTHER, which would be usable as an input to any other function
that makes sense and that would be planned into an expression.
So, the main effect of this patch is the first item. To provide backwards
compatibility with anyone that was depending on the old behavior, the
patch adds a "sqlFinalizeOuterSketches" query context parameter that
restores the old behavior.
Other changes:
1) Move various argument-checking logic from runtime to planning time in
DoublesSketchListArgBaseOperatorConversion, by adding an OperandTypeChecker.
2) Add various JsonIgnores to the sketches to simplify their JSON representations.
3) Allow chaining of ExpressionPostAggregators and other PostAggregators
in the SQL layer.
4) Avoid unnecessary FieldAccessPostAggregator wrapping in the SQL layer,
now that expressions can operate on complex inputs.
5) Adjust return type to thetaSketch (instead of OTHER) in
ThetaSketchSetBaseOperatorConversion.
* Fix benchmark class.
* Fix compilation error.
* Fix ThetaSketchSqlAggregatorTest.
* Hopefully fix ITAutoCompactionTest.
* Adjustment to ITAutoCompactionTest.
2022-11-03 12:43:00 -04:00
|
|
|
<Class name="org.apache.druid.jackson.DefaultTrueJsonIncludeFilter"/>
|
2023-06-30 15:45:55 -04:00
|
|
|
<Class name="org.apache.druid.java.util.common.StringEncodingDefaultUTF16LEJsonIncludeFilter"/>
|
2024-09-03 12:05:29 -04:00
|
|
|
<Class name="org.apache.druid.msq.kernel.LimitHintJsonIncludeFilter"/>
|
2020-08-13 17:56:24 -04:00
|
|
|
<Class name="org.apache.druid.query.scan.ScanQuery$ScanRowsLimitJsonIncludeFilter"/>
|
2021-11-19 11:19:12 -05:00
|
|
|
<Class name="org.apache.druid.query.scan.ScanQuery$ScanTimeOrderJsonIncludeFilter"/>
|
2022-06-16 17:07:25 -04:00
|
|
|
<Class name="org.apache.druid.query.scan.ScanQuery$BatchSizeJsonIncludeFilter"/>
|
2020-08-05 18:39:58 -04:00
|
|
|
<Class name="org.apache.druid.query.groupby.orderby.DefaultLimitSpec$LimitJsonIncludeFilter"/>
|
2022-06-16 17:07:25 -04:00
|
|
|
<Class name="org.apache.druid.segment.VirtualColumns$JsonIncludeFilter"/>
|
2020-08-05 18:39:58 -04:00
|
|
|
</Or>
|
|
|
|
</And>
|
|
|
|
</Match>
|
2021-03-31 15:46:25 -04:00
|
|
|
<Match>
|
|
|
|
<And>
|
|
|
|
<Bug pattern="SE_BAD_FIELD_STORE" />
|
|
|
|
<Class name="org.apache.druid.server.AsyncQueryForwardingServlet" />
|
|
|
|
</And>
|
|
|
|
</Match>
|
2022-06-16 17:07:25 -04:00
|
|
|
<Match>
|
|
|
|
<And>
|
|
|
|
<Bug pattern="URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD" />
|
|
|
|
<Class name="org.apache.druid.sql.calcite.planner.CapturedState" />
|
|
|
|
</And>
|
|
|
|
</Match>
|
Frame processing and channels. (#12848)
* Frame processing and channels.
Follow-up to #12745. This patch adds three new concepts:
1) Frame channels are interfaces for doing nonblocking reads and writes
of frames.
2) Frame processors are interfaces for doing nonblocking processing of
frames received from input channels and sent to output channels.
3) Cluster-by keys, which can be used for sorting or partitioning.
The patch also adds SuperSorter, a user of these concepts, both to
illustrate how they are used, and also because it is going to be useful
in future work.
Central classes:
- ReadableFrameChannel. Implementations include
BlockingQueueFrameChannel (in-memory channel that implements both interfaces),
ReadableFileFrameChannel (file-based channel),
ReadableByteChunksFrameChannel (byte-stream-based channel), and others.
- WritableFrameChannel. Implementations include BlockingQueueFrameChannel
and WritableStreamFrameChannel (byte-stream-based channel).
- ClusterBy, a sorting or partitioning key.
- FrameProcessor, nonblocking processor of frames. Implementations include
FrameChannelBatcher, FrameChannelMerger, and FrameChannelMuxer.
- FrameProcessorExecutor, an executor service that runs FrameProcessors.
- SuperSorter, a class that uses frame channels and processors to
do parallel external merge sort of any amount of data (as long as there
is enough disk space).
* Additional tests, fixes.
* Changes from review.
* Better implementation for ReadableInputStreamFrameChannel.
* Rename getFrameFileReference -> newFrameFileReference.
* Add InterruptedException to runIncrementally; add more tests.
* Cancellation adjustments.
* Review adjustments.
* Refactor BlockingQueueFrameChannel, rename doneReading and doneWriting to close.
* Additional changes from review.
* Additional changes.
* Fix test.
* Adjustments.
* Adjustments.
2022-08-05 00:29:04 -04:00
|
|
|
<Match>
|
|
|
|
<!-- Spotbugs doesn't like the MAGIC array -->
|
|
|
|
<And>
|
|
|
|
<Bug pattern="MS_MUTABLE_ARRAY" />
|
|
|
|
<Class name="org.apache.druid.frame.file.FrameFileWriter" />
|
|
|
|
</And>
|
|
|
|
</Match>
|
2022-08-23 21:44:01 -04:00
|
|
|
<Match>
|
|
|
|
<!-- Spotbugs doesn't like awaiting a latch without checking return value -->
|
|
|
|
<And>
|
|
|
|
<Bug pattern="RV_RETURN_VALUE_IGNORED" />
|
|
|
|
<Class name="org.apache.druid.msq.indexing.MSQWorkerTaskLauncher" />
|
|
|
|
</And>
|
|
|
|
</Match>
|
2020-08-05 18:39:58 -04:00
|
|
|
|
2019-06-20 14:06:52 -04:00
|
|
|
<Bug pattern="AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION"/>
|
|
|
|
<Bug pattern="BC_UNCONFIRMED_CAST"/>
|
|
|
|
<Bug pattern="BIT_SIGNED_CHECK_HIGH_BIT"/>
|
|
|
|
<Bug pattern="BX_UNBOXING_IMMEDIATELY_REBOXED"/>
|
|
|
|
<Bug pattern="CN_IDIOM_NO_SUPER_CALL"/>
|
|
|
|
<Bug pattern="CN_IMPLEMENTS_CLONE_BUT_NOT_CLONEABLE"/>
|
|
|
|
<Bug pattern="DC_DOUBLECHECK"/>
|
|
|
|
<Bug pattern="DM_BOXED_PRIMITIVE_FOR_PARSING"/>
|
|
|
|
<Bug pattern="DM_EXIT"/>
|
|
|
|
<Bug pattern="DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED"/>
|
|
|
|
<Bug pattern="EI_EXPOSE_REP"/>
|
|
|
|
<Bug pattern="EI_EXPOSE_REP2"/>
|
|
|
|
<Bug pattern="EQ_COMPARETO_USE_OBJECT_EQUALS"/>
|
|
|
|
<Bug pattern="EQ_DOESNT_OVERRIDE_EQUALS"/>
|
|
|
|
<Bug pattern="EQ_UNUSUAL"/>
|
|
|
|
<Bug pattern="ES_COMPARING_PARAMETER_STRING_WITH_EQ"/>
|
|
|
|
<Bug pattern="FE_FLOATING_POINT_EQUALITY"/>
|
|
|
|
<Bug pattern="HE_EQUALS_USE_HASHCODE"/>
|
|
|
|
<Bug pattern="IA_AMBIGUOUS_INVOCATION_OF_INHERITED_OR_OUTER_METHOD"/>
|
|
|
|
<Bug pattern="ICAST_IDIV_CAST_TO_DOUBLE"/>
|
|
|
|
<Bug pattern="ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL"/>
|
|
|
|
<Bug pattern="ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT"/>
|
|
|
|
<Bug pattern="IS2_INCONSISTENT_SYNC"/>
|
|
|
|
<Bug pattern="JLM_JSR166_UTILCONCURRENT_MONITORENTER"/>
|
|
|
|
<Bug pattern="JLM_JSR166_UTILCONCURRENT_MONITORENTER"/>
|
|
|
|
<Bug pattern="MS_FINAL_PKGPROTECT"/>
|
|
|
|
<Bug pattern="MS_PKGPROTECT"/>
|
|
|
|
<Bug pattern="NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT"/>
|
|
|
|
<Bug pattern="NP_GUARANTEED_DEREF"/>
|
|
|
|
<Bug pattern="NP_LOAD_OF_KNOWN_NULL_VALUE"/>
|
|
|
|
<Bug pattern="NP_METHOD_PARAMETER_TIGHTENS_ANNOTATION"/>
|
|
|
|
<Bug pattern="NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR"/>
|
|
|
|
<Bug pattern="NP_NULL_ON_SOME_PATH"/>
|
|
|
|
<Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"/>
|
|
|
|
<Bug pattern="NP_NULL_ON_SOME_PATH_MIGHT_BE_INFEASIBLE"/>
|
|
|
|
<Bug pattern="NP_NULL_PARAM_DEREF"/>
|
|
|
|
<Bug pattern="NP_NULL_PARAM_DEREF_NONVIRTUAL"/>
|
|
|
|
<Bug pattern="NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE"/>
|
|
|
|
<Bug pattern="NS_DANGEROUS_NON_SHORT_CIRCUIT"/>
|
|
|
|
<Bug pattern="OBL_UNSATISFIED_OBLIGATION"/>
|
|
|
|
<Bug pattern="OS_OPEN_STREAM"/>
|
|
|
|
<Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE"/>
|
|
|
|
<Bug pattern="RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE"/>
|
|
|
|
<Bug pattern="REC_CATCH_EXCEPTION"/>
|
|
|
|
<Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE"/>
|
|
|
|
<Bug pattern="RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT"/>
|
|
|
|
<Bug pattern="SBSC_USE_STRINGBUFFER_CONCATENATION"/>
|
|
|
|
<Bug pattern="SE_BAD_FIELD"/>
|
|
|
|
<Bug pattern="SE_COMPARATOR_SHOULD_BE_SERIALIZABLE"/>
|
|
|
|
<Bug pattern="SF_SWITCH_FALLTHROUGH"/>
|
|
|
|
<Bug pattern="SF_SWITCH_NO_DEFAULT"/>
|
|
|
|
<Bug pattern="SR_NOT_CHECKED"/>
|
|
|
|
<Bug pattern="SWL_SLEEP_WITH_LOCK_HELD"/>
|
|
|
|
<Bug pattern="UL_UNRELEASED_LOCK_EXCEPTION_PATH"/>
|
|
|
|
<Bug pattern="URF_UNREAD_FIELD"/>
|
|
|
|
</FindBugsFilter>
|