नोट
इस पेज तक पहुँच के लिए प्रमाणन की आवश्यकता होती है. आप साइन इन करने या निर्देशिकाओं को बदलने का प्रयास कर सकते हैं.
इस पेज तक पहुँच के लिए प्रमाणन की आवश्यकता होती है. आप निर्देशिकाओं को बदलने का प्रयास कर सकते हैं.
Applies to:
Databricks Runtime 18.1 and above
Computes the set intersection of exactly two TupleSketch binary representations with integer summaries.
Syntax
tuple_intersection_integer ( first, second [, mode ] )
Arguments
- first: A TupleSketch in binary format with integer summaries.
- second: A TupleSketch in binary format with integer summaries.
- mode: An optional
STRINGliteral specifying the aggregation mode. Valid values:'sum','min','max','alwaysone'. The default is'sum'.
Returns
A BINARY value containing the TupleSketch representing the intersection.
Notes
- The result contains only keys that appear in both input sketches.
- For intersecting more than two sketches, use tuple_intersection_agg_integer.
Error messages
Examples
> SELECT tuple_sketch_estimate_integer(
tuple_intersection_integer(
tuple_sketch_agg_integer(col1, val1),
tuple_sketch_agg_integer(col2, val2)
)
) FROM VALUES (1, 1, 1, 4), (2, 2, 2, 5), (3, 3, 4, 6) tab(col1, val1, col2, val2);
2.0