This is an automated email from the ASF dual-hosted git repository.
github-bot pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/datafusion.git
The following commit(s) were added to refs/heads/asf-site by this push:
new 4bda7e5d29 Publish built docs triggered by
d84d75a23eb4fa8373fba8184844cc0f8f9103a8
4bda7e5d29 is described below
commit 4bda7e5d295d32d992c15fec6d4660bf9ba2f9b6
Author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Jun 11 18:35:23 2024 +0000
Publish built docs triggered by d84d75a23eb4fa8373fba8184844cc0f8f9103a8
---
.../aggregate_function.rs | 31 +---
_sources/user-guide/sql/scalar_functions.md.txt | 71 +++++++
searchindex.js | 2 +-
user-guide/sql/scalar_functions.html | 203 ++++++++++++++++-----
4 files changed, 239 insertions(+), 68 deletions(-)
diff --git a/_downloads/f9718f9b04809de030b1693c73858f19/aggregate_function.rs
b/_downloads/f9718f9b04809de030b1693c73858f19/aggregate_function.rs
index edefd0f3ed..e3d2e6555d 100644
--- a/_downloads/f9718f9b04809de030b1693c73858f19/aggregate_function.rs
+++ b/_downloads/f9718f9b04809de030b1693c73858f19/aggregate_function.rs
@@ -41,14 +41,10 @@ pub enum AggregateFunction {
Max,
/// Average
Avg,
- /// Approximate distinct function
- ApproxDistinct,
/// Aggregation into an array
ArrayAgg,
/// N'th value in a group according to some ordering
NthValue,
- /// Variance (Population)
- VariancePop,
/// Correlation
Correlation,
/// Slope from linear regression
@@ -73,8 +69,6 @@ pub enum AggregateFunction {
ApproxPercentileCont,
/// Approximate continuous percentile function with weight
ApproxPercentileContWithWeight,
- /// ApproxMedian
- ApproxMedian,
/// Grouping
Grouping,
/// Bit And
@@ -99,10 +93,8 @@ impl AggregateFunction {
Min => "MIN",
Max => "MAX",
Avg => "AVG",
- ApproxDistinct => "APPROX_DISTINCT",
ArrayAgg => "ARRAY_AGG",
NthValue => "NTH_VALUE",
- VariancePop => "VAR_POP",
Correlation => "CORR",
RegrSlope => "REGR_SLOPE",
RegrIntercept => "REGR_INTERCEPT",
@@ -115,7 +107,6 @@ impl AggregateFunction {
RegrSXY => "REGR_SXY",
ApproxPercentileCont => "APPROX_PERCENTILE_CONT",
ApproxPercentileContWithWeight =>
"APPROX_PERCENTILE_CONT_WITH_WEIGHT",
- ApproxMedian => "APPROX_MEDIAN",
Grouping => "GROUPING",
BitAnd => "BIT_AND",
BitOr => "BIT_OR",
@@ -153,7 +144,6 @@ impl FromStr for AggregateFunction {
"string_agg" => AggregateFunction::StringAgg,
// statistical
"corr" => AggregateFunction::Correlation,
- "var_pop" => AggregateFunction::VariancePop,
"regr_slope" => AggregateFunction::RegrSlope,
"regr_intercept" => AggregateFunction::RegrIntercept,
"regr_count" => AggregateFunction::RegrCount,
@@ -164,8 +154,6 @@ impl FromStr for AggregateFunction {
"regr_syy" => AggregateFunction::RegrSYY,
"regr_sxy" => AggregateFunction::RegrSXY,
// approximate
- "approx_distinct" => AggregateFunction::ApproxDistinct,
- "approx_median" => AggregateFunction::ApproxMedian,
"approx_percentile_cont" =>
AggregateFunction::ApproxPercentileCont,
"approx_percentile_cont_with_weight" => {
AggregateFunction::ApproxPercentileContWithWeight
@@ -202,9 +190,7 @@ impl AggregateFunction {
})?;
match self {
- AggregateFunction::Count | AggregateFunction::ApproxDistinct => {
- Ok(DataType::Int64)
- }
+ AggregateFunction::Count => Ok(DataType::Int64),
AggregateFunction::Max | AggregateFunction::Min => {
// For min and max agg function, the returned type is same as
input type.
// The coerced_data_types is same with input_types.
@@ -216,9 +202,6 @@ impl AggregateFunction {
AggregateFunction::BoolAnd | AggregateFunction::BoolOr => {
Ok(DataType::Boolean)
}
- AggregateFunction::VariancePop => {
- variance_return_type(&coerced_data_types[0])
- }
AggregateFunction::Correlation => {
correlation_return_type(&coerced_data_types[0])
}
@@ -241,7 +224,6 @@ impl AggregateFunction {
AggregateFunction::ApproxPercentileContWithWeight => {
Ok(coerced_data_types[0].clone())
}
- AggregateFunction::ApproxMedian =>
Ok(coerced_data_types[0].clone()),
AggregateFunction::Grouping => Ok(DataType::Int32),
AggregateFunction::NthValue => Ok(coerced_data_types[0].clone()),
AggregateFunction::StringAgg => Ok(DataType::LargeUtf8),
@@ -268,9 +250,9 @@ impl AggregateFunction {
// note: the physical expression must accept the type returned by this
function or the execution panics.
match self {
AggregateFunction::Count =>
Signature::variadic_any(Volatility::Immutable),
- AggregateFunction::ApproxDistinct
- | AggregateFunction::Grouping
- | AggregateFunction::ArrayAgg => Signature::any(1,
Volatility::Immutable),
+ AggregateFunction::Grouping | AggregateFunction::ArrayAgg => {
+ Signature::any(1, Volatility::Immutable)
+ }
AggregateFunction::Min | AggregateFunction::Max => {
let valid = STRINGS
.iter()
@@ -291,9 +273,8 @@ impl AggregateFunction {
AggregateFunction::BoolAnd | AggregateFunction::BoolOr => {
Signature::uniform(1, vec![DataType::Boolean],
Volatility::Immutable)
}
- AggregateFunction::Avg
- | AggregateFunction::VariancePop
- | AggregateFunction::ApproxMedian => {
+
+ AggregateFunction::Avg => {
Signature::uniform(1, NUMERICS.to_vec(), Volatility::Immutable)
}
AggregateFunction::NthValue => Signature::any(2,
Volatility::Immutable),
diff --git a/_sources/user-guide/sql/scalar_functions.md.txt
b/_sources/user-guide/sql/scalar_functions.md.txt
index 625e0d95b5..10c52bc5de 100644
--- a/_sources/user-guide/sql/scalar_functions.md.txt
+++ b/_sources/user-guide/sql/scalar_functions.md.txt
@@ -2085,6 +2085,7 @@ to_unixtime(expression[, ..., format_n])
- [string_to_array](#string_to_array)
- [string_to_list](#string_to_list)
- [trim_array](#trim_array)
+- [unnest](#unnest)
- [range](#range)
### `array_append`
@@ -3346,6 +3347,48 @@ trim_array(array, n)
Can be a constant, column, or function, and any combination of array
operators.
- **n**: Element to trim the array.
+### `unnest`
+
+Transforms an array into rows.
+
+#### Arguments
+
+- **array**: Array expression to unnest.
+ Can be a constant, column, or function, and any combination of array
operators.
+
+#### Examples
+
+```
+> select unnest(make_array(1, 2, 3, 4, 5));
++------------------------------------------------------------------+
+| unnest(make_array(Int64(1),Int64(2),Int64(3),Int64(4),Int64(5))) |
++------------------------------------------------------------------+
+| 1 |
+| 2 |
+| 3 |
+| 4 |
+| 5 |
++------------------------------------------------------------------+
+```
+
+```
+> select unnest(range(0, 10));
++-----------------------------------+
+| unnest(range(Int64(0),Int64(10))) |
++-----------------------------------+
+| 0 |
+| 1 |
+| 2 |
+| 3 |
+| 4 |
+| 5 |
+| 6 |
+| 7 |
+| 8 |
+| 9 |
++-----------------------------------+
+```
+
### `range`
Returns an Arrow array between start and stop with step. `SELECT range(2, 10,
3) -> [2, 5, 8]` or `SELECT range(DATE '1992-09-01', DATE '1993-03-01',
INTERVAL '1' MONTH);`
@@ -3395,6 +3438,7 @@ are not allowed
- [struct](#struct)
- [named_struct](#named_struct)
+- [unnest](#unnest-struct)
### `struct`
@@ -3480,6 +3524,33 @@ select named_struct('field_a', a, 'field_b', b) from t;
Can be a constant, column, or function, and any combination of arithmetic or
string operators.
+### `unnest (struct)`
+
+Unwraps struct fields into columns.
+
+#### Arguments
+
+- **struct**: Object expression to unnest.
+ Can be a constant, column, or function, and any combination of object
operators.
+
+#### Examples
+
+```
+> select * from foo;
++---------------------+
+| column1 |
++---------------------+
+| {a: 5, b: a string} |
++---------------------+
+
+> select unnest(column1) from foo;
++-----------------------+-----------------------+
+| unnest(foo.column1).a | unnest(foo.column1).b |
++-----------------------+-----------------------+
+| 5 | a string |
++-----------------------+-----------------------+
+```
+
## Hashing Functions
- [digest](#digest)
diff --git a/searchindex.js b/searchindex.js
index 4d364e5dd2..81e3b432df 100644
--- a/searchindex.js
+++ b/searchindex.js
@@ -1 +1 @@
-Search.setIndex({"alltitles": {"!=": [[43, "op-neq"]], "!~": [[43,
"op-re-not-match"]], "!~*": [[43, "op-re-not-match-i"]], "!~~": [[43, "id18"]],
"!~~*": [[43, "id19"]], "#": [[43, "op-bit-xor"]], "%": [[43, "op-modulo"]],
"&": [[43, "op-bit-and"]], "(relation, name) tuples in logical fields and
logical columns are unique": [[10,
"relation-name-tuples-in-logical-fields-and-logical-columns-are-unique"]], "*":
[[43, "op-multiply"]], "+": [[43, "op-plus"]], "-": [[43, "op-minus"]], "/": [[
[...]
\ No newline at end of file
+Search.setIndex({"alltitles": {"!=": [[43, "op-neq"]], "!~": [[43,
"op-re-not-match"]], "!~*": [[43, "op-re-not-match-i"]], "!~~": [[43, "id18"]],
"!~~*": [[43, "id19"]], "#": [[43, "op-bit-xor"]], "%": [[43, "op-modulo"]],
"&": [[43, "op-bit-and"]], "(relation, name) tuples in logical fields and
logical columns are unique": [[10,
"relation-name-tuples-in-logical-fields-and-logical-columns-are-unique"]], "*":
[[43, "op-multiply"]], "+": [[43, "op-plus"]], "-": [[43, "op-minus"]], "/": [[
[...]
\ No newline at end of file
diff --git a/user-guide/sql/scalar_functions.html
b/user-guide/sql/scalar_functions.html
index 3c6ff66303..04dd708e3c 100644
--- a/user-guide/sql/scalar_functions.html
+++ b/user-guide/sql/scalar_functions.html
@@ -3535,10 +3535,10 @@
</ul>
</li>
<li class="toc-h3 nav-item toc-entry">
- <a class="reference internal nav-link" href="#range">
+ <a class="reference internal nav-link" href="#unnest">
<code class="docutils literal notranslate">
<span class="pre">
- range
+ unnest
</span>
</code>
</a>
@@ -3548,8 +3548,29 @@
Arguments
</a>
</li>
+ <li class="toc-h4 nav-item toc-entry">
+ <a class="reference internal nav-link" href="#examples">
+ Examples
+ </a>
+ </li>
+ </ul>
+ </li>
+ <li class="toc-h3 nav-item toc-entry">
+ <a class="reference internal nav-link" href="#range">
+ <code class="docutils literal notranslate">
+ <span class="pre">
+ range
+ </span>
+ </code>
+ </a>
+ <ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry">
<a class="reference internal nav-link" href="#id210">
+ Arguments
+ </a>
+ </li>
+ <li class="toc-h4 nav-item toc-entry">
+ <a class="reference internal nav-link" href="#id211">
Aliases
</a>
</li>
@@ -3572,7 +3593,7 @@
</a>
<ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry">
- <a class="reference internal nav-link" href="#id211">
+ <a class="reference internal nav-link" href="#id212">
Arguments
</a>
</li>
@@ -3588,12 +3609,36 @@
</a>
<ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry">
- <a class="reference internal nav-link" href="#id212">
+ <a class="reference internal nav-link" href="#id213">
Arguments
</a>
</li>
</ul>
</li>
+ <li class="toc-h3 nav-item toc-entry">
+ <a class="reference internal nav-link" href="#unnest-struct">
+ <code class="docutils literal notranslate">
+ <span class="pre">
+ unnest
+ </span>
+ <span class="pre">
+ (struct)
+ </span>
+ </code>
+ </a>
+ <ul class="nav section-nav flex-column">
+ <li class="toc-h4 nav-item toc-entry">
+ <a class="reference internal nav-link" href="#id214">
+ Arguments
+ </a>
+ </li>
+ <li class="toc-h4 nav-item toc-entry">
+ <a class="reference internal nav-link" href="#id215">
+ Examples
+ </a>
+ </li>
+ </ul>
+ </li>
</ul>
</li>
<li class="toc-h2 nav-item toc-entry">
@@ -3611,7 +3656,7 @@
</a>
<ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry">
- <a class="reference internal nav-link" href="#id213">
+ <a class="reference internal nav-link" href="#id216">
Arguments
</a>
</li>
@@ -3627,7 +3672,7 @@
</a>
<ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry">
- <a class="reference internal nav-link" href="#id214">
+ <a class="reference internal nav-link" href="#id217">
Arguments
</a>
</li>
@@ -3643,7 +3688,7 @@
</a>
<ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry">
- <a class="reference internal nav-link" href="#id215">
+ <a class="reference internal nav-link" href="#id218">
Arguments
</a>
</li>
@@ -3659,7 +3704,7 @@
</a>
<ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry">
- <a class="reference internal nav-link" href="#id216">
+ <a class="reference internal nav-link" href="#id219">
Arguments
</a>
</li>
@@ -3675,7 +3720,7 @@
</a>
<ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry">
- <a class="reference internal nav-link" href="#id217">
+ <a class="reference internal nav-link" href="#id220">
Arguments
</a>
</li>
@@ -3691,7 +3736,7 @@
</a>
<ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry">
- <a class="reference internal nav-link" href="#id218">
+ <a class="reference internal nav-link" href="#id221">
Arguments
</a>
</li>
@@ -3714,12 +3759,12 @@
</a>
<ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry">
- <a class="reference internal nav-link" href="#id219">
+ <a class="reference internal nav-link" href="#id222">
Arguments
</a>
</li>
<li class="toc-h4 nav-item toc-entry">
- <a class="reference internal nav-link" href="#id220">
+ <a class="reference internal nav-link" href="#id223">
Example
</a>
</li>
@@ -3735,12 +3780,12 @@
</a>
<ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry">
- <a class="reference internal nav-link" href="#id221">
+ <a class="reference internal nav-link" href="#id224">
Arguments
</a>
</li>
<li class="toc-h4 nav-item toc-entry">
- <a class="reference internal nav-link" href="#id222">
+ <a class="reference internal nav-link" href="#id225">
Example
</a>
</li>
@@ -5931,6 +5976,7 @@ an error will be returned.</p></li>
<li><p><a class="reference internal"
href="#string-to-array">string_to_array</a></p></li>
<li><p><a class="reference internal"
href="#string-to-list">string_to_list</a></p></li>
<li><p><a class="reference internal" href="#trim-array">trim_array</a></p></li>
+<li><p><a class="reference internal" href="#unnest">unnest</a></p></li>
<li><p><a class="reference internal" href="#range">range</a></p></li>
</ul>
<section id="array-append">
@@ -7290,6 +7336,49 @@ Can be a constant, column, or function, and any
combination of array operators.<
</ul>
</section>
</section>
+<section id="unnest">
+<h3><code class="docutils literal notranslate"><span
class="pre">unnest</span></code><a class="headerlink" href="#unnest"
title="Link to this heading">¶</a></h3>
+<p>Transforms an array into rows.</p>
+<section id="id209">
+<h4>Arguments<a class="headerlink" href="#id209" title="Link to this
heading">¶</a></h4>
+<ul class="simple">
+<li><p><strong>array</strong>: Array expression to unnest.
+Can be a constant, column, or function, and any combination of array
operators.</p></li>
+</ul>
+</section>
+<section id="examples">
+<h4>Examples<a class="headerlink" href="#examples" title="Link to this
heading">¶</a></h4>
+<div class="highlight-default notranslate"><div
class="highlight"><pre><span></span><span class="o">></span> <span
class="n">select</span> <span class="n">unnest</span><span
class="p">(</span><span class="n">make_array</span><span
class="p">(</span><span class="mi">1</span><span class="p">,</span> <span
class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span
class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span
class="mi">5</span><span class="p" [...]
+<span
class="o">+------------------------------------------------------------------+</span>
+<span class="o">|</span> <span class="n">unnest</span><span
class="p">(</span><span class="n">make_array</span><span
class="p">(</span><span class="n">Int64</span><span class="p">(</span><span
class="mi">1</span><span class="p">),</span><span class="n">Int64</span><span
class="p">(</span><span class="mi">2</span><span class="p">),</span><span
class="n">Int64</span><span class="p">(</span><span class="mi">3</span><span
class="p">),</span><span class="n">Int64</span><span class="p">(</span [...]
+<span
class="o">+------------------------------------------------------------------+</span>
+<span class="o">|</span> <span class="mi">1</span>
<span class="o">|</span>
+<span class="o">|</span> <span class="mi">2</span>
<span class="o">|</span>
+<span class="o">|</span> <span class="mi">3</span>
<span class="o">|</span>
+<span class="o">|</span> <span class="mi">4</span>
<span class="o">|</span>
+<span class="o">|</span> <span class="mi">5</span>
<span class="o">|</span>
+<span
class="o">+------------------------------------------------------------------+</span>
+</pre></div>
+</div>
+<div class="highlight-default notranslate"><div
class="highlight"><pre><span></span><span class="o">></span> <span
class="n">select</span> <span class="n">unnest</span><span
class="p">(</span><span class="nb">range</span><span class="p">(</span><span
class="mi">0</span><span class="p">,</span> <span class="mi">10</span><span
class="p">));</span>
+<span class="o">+-----------------------------------+</span>
+<span class="o">|</span> <span class="n">unnest</span><span
class="p">(</span><span class="nb">range</span><span class="p">(</span><span
class="n">Int64</span><span class="p">(</span><span class="mi">0</span><span
class="p">),</span><span class="n">Int64</span><span class="p">(</span><span
class="mi">10</span><span class="p">)))</span> <span class="o">|</span>
+<span class="o">+-----------------------------------+</span>
+<span class="o">|</span> <span class="mi">0</span>
<span class="o">|</span>
+<span class="o">|</span> <span class="mi">1</span>
<span class="o">|</span>
+<span class="o">|</span> <span class="mi">2</span>
<span class="o">|</span>
+<span class="o">|</span> <span class="mi">3</span>
<span class="o">|</span>
+<span class="o">|</span> <span class="mi">4</span>
<span class="o">|</span>
+<span class="o">|</span> <span class="mi">5</span>
<span class="o">|</span>
+<span class="o">|</span> <span class="mi">6</span>
<span class="o">|</span>
+<span class="o">|</span> <span class="mi">7</span>
<span class="o">|</span>
+<span class="o">|</span> <span class="mi">8</span>
<span class="o">|</span>
+<span class="o">|</span> <span class="mi">9</span>
<span class="o">|</span>
+<span class="o">+-----------------------------------+</span>
+</pre></div>
+</div>
+</section>
+</section>
<section id="range">
<h3><code class="docutils literal notranslate"><span
class="pre">range</span></code><a class="headerlink" href="#range" title="Link
to this heading">¶</a></h3>
<p>Returns an Arrow array between start and stop with step. <code
class="docutils literal notranslate"><span class="pre">SELECT</span> <span
class="pre">range(2,</span> <span class="pre">10,</span> <span
class="pre">3)</span> <span class="pre">-></span> <span
class="pre">[2,</span> <span class="pre">5,</span> <span
class="pre">8]</span></code> or <code class="docutils literal
notranslate"><span class="pre">SELECT</span> <span
class="pre">range(DATE</span> <span class="pre">'1992-09-01 [...]
@@ -7314,16 +7403,16 @@ For example,</p>
</pre></div>
</div>
<p>are not allowed</p>
-<section id="id209">
-<h4>Arguments<a class="headerlink" href="#id209" title="Link to this
heading">¶</a></h4>
+<section id="id210">
+<h4>Arguments<a class="headerlink" href="#id210" title="Link to this
heading">¶</a></h4>
<ul class="simple">
<li><p><strong>start</strong>: start of the range</p></li>
<li><p><strong>end</strong>: end of the range (not included)</p></li>
<li><p><strong>step</strong>: increase by step (can not be 0)</p></li>
</ul>
</section>
-<section id="id210">
-<h4>Aliases<a class="headerlink" href="#id210" title="Link to this
heading">¶</a></h4>
+<section id="id211">
+<h4>Aliases<a class="headerlink" href="#id211" title="Link to this
heading">¶</a></h4>
<ul class="simple">
<li><p>generate_series</p></li>
</ul>
@@ -7335,6 +7424,7 @@ For example,</p>
<ul class="simple">
<li><p><a class="reference internal" href="#struct">struct</a></p></li>
<li><p><a class="reference internal"
href="#named-struct">named_struct</a></p></li>
+<li><p><a class="reference internal" href="#unnest-struct">unnest</a></p></li>
</ul>
<section id="struct">
<h3><code class="docutils literal notranslate"><span
class="pre">struct</span></code><a class="headerlink" href="#struct"
title="Link to this heading">¶</a></h3>
@@ -7373,8 +7463,8 @@ select struct(a as field_a, b) from t;
+--------------------------------------------------+
</pre></div>
</div>
-<section id="id211">
-<h4>Arguments<a class="headerlink" href="#id211" title="Link to this
heading">¶</a></h4>
+<section id="id212">
+<h4>Arguments<a class="headerlink" href="#id212" title="Link to this
heading">¶</a></h4>
<ul class="simple">
<li><p><strong>expression_n</strong>: Expression to include in the output
struct.
Can be a constant, column, or function, any combination of arithmetic or
@@ -7407,8 +7497,8 @@ a struct type of fields <code class="docutils literal
notranslate"><span class="
<span
class="o">+-------------------------------------------------------+</span>
</pre></div>
</div>
-<section id="id212">
-<h4>Arguments<a class="headerlink" href="#id212" title="Link to this
heading">¶</a></h4>
+<section id="id213">
+<h4>Arguments<a class="headerlink" href="#id213" title="Link to this
heading">¶</a></h4>
<ul class="simple">
<li><p><strong>expression_n_name</strong>: Name of the column field.
Must be a constant string.</p></li>
@@ -7418,6 +7508,35 @@ string operators.</p></li>
</ul>
</section>
</section>
+<section id="unnest-struct">
+<h3><code class="docutils literal notranslate"><span class="pre">unnest</span>
<span class="pre">(struct)</span></code><a class="headerlink"
href="#unnest-struct" title="Link to this heading">¶</a></h3>
+<p>Unwraps struct fields into columns.</p>
+<section id="id214">
+<h4>Arguments<a class="headerlink" href="#id214" title="Link to this
heading">¶</a></h4>
+<ul class="simple">
+<li><p><strong>struct</strong>: Object expression to unnest.
+Can be a constant, column, or function, and any combination of object
operators.</p></li>
+</ul>
+</section>
+<section id="id215">
+<h4>Examples<a class="headerlink" href="#id215" title="Link to this
heading">¶</a></h4>
+<div class="highlight-default notranslate"><div
class="highlight"><pre><span></span><span class="o">></span> <span
class="n">select</span> <span class="o">*</span> <span class="kn">from</span>
<span class="nn">foo</span><span class="p">;</span>
+<span class="o">+---------------------+</span>
+<span class="o">|</span> <span class="n">column1</span> <span
class="o">|</span>
+<span class="o">+---------------------+</span>
+<span class="o">|</span> <span class="p">{</span><span class="n">a</span><span
class="p">:</span> <span class="mi">5</span><span class="p">,</span> <span
class="n">b</span><span class="p">:</span> <span class="n">a</span> <span
class="n">string</span><span class="p">}</span> <span class="o">|</span>
+<span class="o">+---------------------+</span>
+
+<span class="o">></span> <span class="n">select</span> <span
class="n">unnest</span><span class="p">(</span><span
class="n">column1</span><span class="p">)</span> <span class="kn">from</span>
<span class="nn">foo</span><span class="p">;</span>
+<span class="o">+-----------------------+-----------------------+</span>
+<span class="o">|</span> <span class="n">unnest</span><span
class="p">(</span><span class="n">foo</span><span class="o">.</span><span
class="n">column1</span><span class="p">)</span><span class="o">.</span><span
class="n">a</span> <span class="o">|</span> <span class="n">unnest</span><span
class="p">(</span><span class="n">foo</span><span class="o">.</span><span
class="n">column1</span><span class="p">)</span><span class="o">.</span><span
class="n">b</span> <span class="o">|</span>
+<span class="o">+-----------------------+-----------------------+</span>
+<span class="o">|</span> <span class="mi">5</span> <span
class="o">|</span> <span class="n">a</span> <span class="n">string</span>
<span class="o">|</span>
+<span class="o">+-----------------------+-----------------------+</span>
+</pre></div>
+</div>
+</section>
+</section>
</section>
<section id="hashing-functions">
<h2>Hashing Functions<a class="headerlink" href="#hashing-functions"
title="Link to this heading">¶</a></h2>
@@ -7435,8 +7554,8 @@ string operators.</p></li>
<div class="highlight-default notranslate"><div
class="highlight"><pre><span></span><span class="n">digest</span><span
class="p">(</span><span class="n">expression</span><span class="p">,</span>
<span class="n">algorithm</span><span class="p">)</span>
</pre></div>
</div>
-<section id="id213">
-<h4>Arguments<a class="headerlink" href="#id213" title="Link to this
heading">¶</a></h4>
+<section id="id216">
+<h4>Arguments<a class="headerlink" href="#id216" title="Link to this
heading">¶</a></h4>
<ul class="simple">
<li><p><strong>expression</strong>: String expression to operate on.
Can be a constant, column, or function, and any combination of string
operators.</p></li>
@@ -7462,8 +7581,8 @@ Must be one of:</p>
<div class="highlight-default notranslate"><div
class="highlight"><pre><span></span><span class="n">md5</span><span
class="p">(</span><span class="n">expression</span><span class="p">)</span>
</pre></div>
</div>
-<section id="id214">
-<h4>Arguments<a class="headerlink" href="#id214" title="Link to this
heading">¶</a></h4>
+<section id="id217">
+<h4>Arguments<a class="headerlink" href="#id217" title="Link to this
heading">¶</a></h4>
<ul class="simple">
<li><p><strong>expression</strong>: String expression to operate on.
Can be a constant, column, or function, and any combination of string
operators.</p></li>
@@ -7476,8 +7595,8 @@ Can be a constant, column, or function, and any
combination of string operators.
<div class="highlight-default notranslate"><div
class="highlight"><pre><span></span><span class="n">sha224</span><span
class="p">(</span><span class="n">expression</span><span class="p">)</span>
</pre></div>
</div>
-<section id="id215">
-<h4>Arguments<a class="headerlink" href="#id215" title="Link to this
heading">¶</a></h4>
+<section id="id218">
+<h4>Arguments<a class="headerlink" href="#id218" title="Link to this
heading">¶</a></h4>
<ul class="simple">
<li><p><strong>expression</strong>: String expression to operate on.
Can be a constant, column, or function, and any combination of string
operators.</p></li>
@@ -7490,8 +7609,8 @@ Can be a constant, column, or function, and any
combination of string operators.
<div class="highlight-default notranslate"><div
class="highlight"><pre><span></span><span class="n">sha256</span><span
class="p">(</span><span class="n">expression</span><span class="p">)</span>
</pre></div>
</div>
-<section id="id216">
-<h4>Arguments<a class="headerlink" href="#id216" title="Link to this
heading">¶</a></h4>
+<section id="id219">
+<h4>Arguments<a class="headerlink" href="#id219" title="Link to this
heading">¶</a></h4>
<ul class="simple">
<li><p><strong>expression</strong>: String expression to operate on.
Can be a constant, column, or function, and any combination of string
operators.</p></li>
@@ -7504,8 +7623,8 @@ Can be a constant, column, or function, and any
combination of string operators.
<div class="highlight-default notranslate"><div
class="highlight"><pre><span></span><span class="n">sha384</span><span
class="p">(</span><span class="n">expression</span><span class="p">)</span>
</pre></div>
</div>
-<section id="id217">
-<h4>Arguments<a class="headerlink" href="#id217" title="Link to this
heading">¶</a></h4>
+<section id="id220">
+<h4>Arguments<a class="headerlink" href="#id220" title="Link to this
heading">¶</a></h4>
<ul class="simple">
<li><p><strong>expression</strong>: String expression to operate on.
Can be a constant, column, or function, and any combination of string
operators.</p></li>
@@ -7518,8 +7637,8 @@ Can be a constant, column, or function, and any
combination of string operators.
<div class="highlight-default notranslate"><div
class="highlight"><pre><span></span><span class="n">sha512</span><span
class="p">(</span><span class="n">expression</span><span class="p">)</span>
</pre></div>
</div>
-<section id="id218">
-<h4>Arguments<a class="headerlink" href="#id218" title="Link to this
heading">¶</a></h4>
+<section id="id221">
+<h4>Arguments<a class="headerlink" href="#id221" title="Link to this
heading">¶</a></h4>
<ul class="simple">
<li><p><strong>expression</strong>: String expression to operate on.
Can be a constant, column, or function, and any combination of string
operators.</p></li>
@@ -7539,8 +7658,8 @@ Can be a constant, column, or function, and any
combination of string operators.
<div class="highlight-default notranslate"><div
class="highlight"><pre><span></span><span class="n">arrow_cast</span><span
class="p">(</span><span class="n">expression</span><span class="p">,</span>
<span class="n">datatype</span><span class="p">)</span>
</pre></div>
</div>
-<section id="id219">
-<h4>Arguments<a class="headerlink" href="#id219" title="Link to this
heading">¶</a></h4>
+<section id="id222">
+<h4>Arguments<a class="headerlink" href="#id222" title="Link to this
heading">¶</a></h4>
<ul class="simple">
<li><p><strong>expression</strong>: Expression to cast.
Can be a constant, column, or function, and any combination of arithmetic or
@@ -7549,8 +7668,8 @@ string operators.</p></li>
to cast to, as a string. The format is the same as that returned by [<code
class="docutils literal notranslate"><span
class="pre">arrow_typeof</span></code>]</p></li>
</ul>
</section>
-<section id="id220">
-<h4>Example<a class="headerlink" href="#id220" title="Link to this
heading">¶</a></h4>
+<section id="id223">
+<h4>Example<a class="headerlink" href="#id223" title="Link to this
heading">¶</a></h4>
<div class="highlight-default notranslate"><div
class="highlight"><pre><span></span><span class="o">></span> <span
class="n">select</span> <span class="n">arrow_cast</span><span
class="p">(</span><span class="o">-</span><span class="mi">5</span><span
class="p">,</span> <span class="s1">'Int8'</span><span
class="p">)</span> <span class="k">as</span> <span class="n">a</span><span
class="p">,</span>
<span class="n">arrow_cast</span><span class="p">(</span><span
class="s1">'foo'</span><span class="p">,</span> <span
class="s1">'Dictionary(Int32, Utf8)'</span><span class="p">)</span>
<span class="k">as</span> <span class="n">b</span><span class="p">,</span>
<span class="n">arrow_cast</span><span class="p">(</span><span
class="s1">'bar'</span><span class="p">,</span> <span
class="s1">'LargeUtf8'</span><span class="p">)</span> <span
class="k">as</span> <span class="n">c</span><span class="p">,</span>
@@ -7572,16 +7691,16 @@ to cast to, as a string. The format is the same as that
returned by [<code class
<div class="highlight-default notranslate"><div
class="highlight"><pre><span></span><span class="n">arrow_typeof</span><span
class="p">(</span><span class="n">expression</span><span class="p">)</span>
</pre></div>
</div>
-<section id="id221">
-<h4>Arguments<a class="headerlink" href="#id221" title="Link to this
heading">¶</a></h4>
+<section id="id224">
+<h4>Arguments<a class="headerlink" href="#id224" title="Link to this
heading">¶</a></h4>
<ul class="simple">
<li><p><strong>expression</strong>: Expression to evaluate.
Can be a constant, column, or function, and any combination of arithmetic or
string operators.</p></li>
</ul>
</section>
-<section id="id222">
-<h4>Example<a class="headerlink" href="#id222" title="Link to this
heading">¶</a></h4>
+<section id="id225">
+<h4>Example<a class="headerlink" href="#id225" title="Link to this
heading">¶</a></h4>
<div class="highlight-default notranslate"><div
class="highlight"><pre><span></span><span class="o">></span> <span
class="n">select</span> <span class="n">arrow_typeof</span><span
class="p">(</span><span class="s1">'foo'</span><span
class="p">),</span> <span class="n">arrow_typeof</span><span
class="p">(</span><span class="mi">1</span><span class="p">);</span>
<span class="o">+---------------------------+------------------------+</span>
<span class="o">|</span> <span class="n">arrow_typeof</span><span
class="p">(</span><span class="n">Utf8</span><span class="p">(</span><span
class="s2">"foo"</span><span class="p">))</span> <span
class="o">|</span> <span class="n">arrow_typeof</span><span
class="p">(</span><span class="n">Int64</span><span class="p">(</span><span
class="mi">1</span><span class="p">))</span> <span class="o">|</span>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]