Skip to content

Commit 2150a3d

Browse files
committed
deploy: 985c8d9
1 parent 1eeaf10 commit 2150a3d

File tree

8 files changed

+181
-91
lines changed

8 files changed

+181
-91
lines changed

api/iceberg/spec/enum.PrimitiveType.html

Lines changed: 5 additions & 5 deletions
Large diffs are not rendered by default.

api/iceberg/spec/enum.Type.html

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

api/iceberg/spec/struct.ListType.html

Lines changed: 4 additions & 4 deletions
Large diffs are not rendered by default.

api/iceberg/spec/struct.MapType.html

Lines changed: 4 additions & 4 deletions
Large diffs are not rendered by default.

api/iceberg/spec/struct.NestedField.html

Lines changed: 14 additions & 14 deletions
Large diffs are not rendered by default.

api/iceberg/spec/struct.StructType.html

Lines changed: 9 additions & 9 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Reference to nested field."><title>NestedFieldRef in iceberg::spec - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iceberg" data-themes="" data-resource-suffix="" data-rustdoc-version="1.81.0-nightly (a70b2ae57 2024-06-09)" data-channel="nightly" data-search-js="search-0fe7219eb170c82e.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc type"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iceberg/index.html">iceberg</a><span class="version">0.4.0</span></h2></div><h2 class="location"><a href="#">NestedFieldRef</a></h2><div class="sidebar-elems"><section><h3><a href="#aliased-type">Aliased type</a></h3></section><h2><a href="index.html">In iceberg::spec</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Type Alias <a href="../index.html">iceberg</a>::<wbr><a href="index.html">spec</a>::<wbr><a class="type" href="#">NestedFieldRef</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../src/iceberg/spec/datatypes.rs.html#589">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub type NestedFieldRef = <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a>&lt;<a class="struct" href="struct.NestedField.html" title="struct iceberg::spec::NestedField">NestedField</a>&gt;;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Reference to nested field.</p>
1+
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Reference to nested field."><title>NestedFieldRef in iceberg::spec - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iceberg" data-themes="" data-resource-suffix="" data-rustdoc-version="1.81.0-nightly (a70b2ae57 2024-06-09)" data-channel="nightly" data-search-js="search-0fe7219eb170c82e.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc type"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iceberg/index.html">iceberg</a><span class="version">0.4.0</span></h2></div><h2 class="location"><a href="#">NestedFieldRef</a></h2><div class="sidebar-elems"><section><h3><a href="#aliased-type">Aliased type</a></h3></section><h2><a href="index.html">In iceberg::spec</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Type Alias <a href="../index.html">iceberg</a>::<wbr><a href="index.html">spec</a>::<wbr><a class="type" href="#">NestedFieldRef</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../src/iceberg/spec/datatypes.rs.html#591">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub type NestedFieldRef = <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a>&lt;<a class="struct" href="struct.NestedField.html" title="struct iceberg::spec::NestedField">NestedField</a>&gt;;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Reference to nested field.</p>
22
</div></details><h2 id="aliased-type" class="section-header">Aliased Type<a href="#aliased-type" class="anchor">§</a></h2><pre class="rust item-decl"><code>struct NestedFieldRef { <span class="comment">/* private fields */</span> }</code></pre><script src="../../type.impl/alloc/sync/struct.Arc.js" data-self-path="iceberg::spec::datatypes::NestedFieldRef" async></script></section></div></main></body></html>

api/src/iceberg/spec/datatypes.rs.html

Lines changed: 142 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,6 +1180,51 @@
11801180
<a href="#1180" id="1180">1180</a>
11811181
<a href="#1181" id="1181">1181</a>
11821182
<a href="#1182" id="1182">1182</a>
1183+
<a href="#1183" id="1183">1183</a>
1184+
<a href="#1184" id="1184">1184</a>
1185+
<a href="#1185" id="1185">1185</a>
1186+
<a href="#1186" id="1186">1186</a>
1187+
<a href="#1187" id="1187">1187</a>
1188+
<a href="#1188" id="1188">1188</a>
1189+
<a href="#1189" id="1189">1189</a>
1190+
<a href="#1190" id="1190">1190</a>
1191+
<a href="#1191" id="1191">1191</a>
1192+
<a href="#1192" id="1192">1192</a>
1193+
<a href="#1193" id="1193">1193</a>
1194+
<a href="#1194" id="1194">1194</a>
1195+
<a href="#1195" id="1195">1195</a>
1196+
<a href="#1196" id="1196">1196</a>
1197+
<a href="#1197" id="1197">1197</a>
1198+
<a href="#1198" id="1198">1198</a>
1199+
<a href="#1199" id="1199">1199</a>
1200+
<a href="#1200" id="1200">1200</a>
1201+
<a href="#1201" id="1201">1201</a>
1202+
<a href="#1202" id="1202">1202</a>
1203+
<a href="#1203" id="1203">1203</a>
1204+
<a href="#1204" id="1204">1204</a>
1205+
<a href="#1205" id="1205">1205</a>
1206+
<a href="#1206" id="1206">1206</a>
1207+
<a href="#1207" id="1207">1207</a>
1208+
<a href="#1208" id="1208">1208</a>
1209+
<a href="#1209" id="1209">1209</a>
1210+
<a href="#1210" id="1210">1210</a>
1211+
<a href="#1211" id="1211">1211</a>
1212+
<a href="#1212" id="1212">1212</a>
1213+
<a href="#1213" id="1213">1213</a>
1214+
<a href="#1214" id="1214">1214</a>
1215+
<a href="#1215" id="1215">1215</a>
1216+
<a href="#1216" id="1216">1216</a>
1217+
<a href="#1217" id="1217">1217</a>
1218+
<a href="#1218" id="1218">1218</a>
1219+
<a href="#1219" id="1219">1219</a>
1220+
<a href="#1220" id="1220">1220</a>
1221+
<a href="#1221" id="1221">1221</a>
1222+
<a href="#1222" id="1222">1222</a>
1223+
<a href="#1223" id="1223">1223</a>
1224+
<a href="#1224" id="1224">1224</a>
1225+
<a href="#1225" id="1225">1225</a>
1226+
<a href="#1226" id="1226">1226</a>
1227+
<a href="#1227" id="1227">1227</a>
11831228
</pre></div><pre class="rust"><code><span class="comment">// Licensed to the Apache Software Foundation (ASF) under one
11841229
// or more contributor license agreements. See the NOTICE file
11851230
// distributed with this work for additional information
@@ -1408,8 +1453,10 @@
14081453
<span class="doccomment">/// Timestamp in microsecond precision, with timezone
14091454
</span>Timestamptz,
14101455
<span class="doccomment">/// Timestamp in nanosecond precision, without timezone
1456+
</span><span class="attr">#[serde(rename = <span class="string">"timestamp_ns"</span>)]
14111457
</span>TimestampNs,
14121458
<span class="doccomment">/// Timestamp in nanosecond precision with timezone
1459+
</span><span class="attr">#[serde(rename = <span class="string">"timestamptz_ns"</span>)]
14131460
</span>TimestamptzNs,
14141461
<span class="doccomment">/// Arbitrary-length character sequences encoded in utf-8
14151462
</span>String,
@@ -2037,64 +2084,107 @@
20372084
}
20382085

20392086
<span class="attr">#[test]
2040-
</span><span class="kw">fn </span>decimal() {
2087+
</span><span class="kw">fn </span>primitive_type_serde() {
20412088
<span class="kw">let </span>record = <span class="string">r#"
2042-
{
2043-
"type": "struct",
2044-
"fields": [
2045-
{
2046-
"id": 1,
2047-
"name": "id",
2048-
"required": true,
2049-
"type": "decimal(9,2)"
2050-
}
2051-
]
2052-
}
2053-
"#</span>;
2054-
2055-
check_type_serde(
2056-
record,
2057-
Type::Struct(StructType {
2058-
fields: <span class="macro">vec!</span>[NestedField::required(
2059-
<span class="number">1</span>,
2060-
<span class="string">"id"</span>,
2061-
Type::Primitive(PrimitiveType::Decimal {
2062-
precision: <span class="number">9</span>,
2063-
scale: <span class="number">2</span>,
2064-
}),
2065-
)
2066-
.into()],
2067-
id_lookup: OnceLock::default(),
2068-
name_lookup: OnceLock::default(),
2069-
}),
2070-
)
2089+
{
2090+
"type": "struct",
2091+
"fields": [
2092+
{"id": 1, "name": "bool_field", "required": true, "type": "boolean"},
2093+
{"id": 2, "name": "int_field", "required": true, "type": "int"},
2094+
{"id": 3, "name": "long_field", "required": true, "type": "long"},
2095+
{"id": 4, "name": "float_field", "required": true, "type": "float"},
2096+
{"id": 5, "name": "double_field", "required": true, "type": "double"},
2097+
{"id": 6, "name": "decimal_field", "required": true, "type": "decimal(9,2)"},
2098+
{"id": 7, "name": "date_field", "required": true, "type": "date"},
2099+
{"id": 8, "name": "time_field", "required": true, "type": "time"},
2100+
{"id": 9, "name": "timestamp_field", "required": true, "type": "timestamp"},
2101+
{"id": 10, "name": "timestamptz_field", "required": true, "type": "timestamptz"},
2102+
{"id": 11, "name": "timestamp_ns_field", "required": true, "type": "timestamp_ns"},
2103+
{"id": 12, "name": "timestamptz_ns_field", "required": true, "type": "timestamptz_ns"},
2104+
{"id": 13, "name": "uuid_field", "required": true, "type": "uuid"},
2105+
{"id": 14, "name": "fixed_field", "required": true, "type": "fixed[10]"},
2106+
{"id": 15, "name": "binary_field", "required": true, "type": "binary"},
2107+
{"id": 16, "name": "string_field", "required": true, "type": "string"}
2108+
]
20712109
}
2072-
2073-
<span class="attr">#[test]
2074-
</span><span class="kw">fn </span>fixed() {
2075-
<span class="kw">let </span>record = <span class="string">r#"
2076-
{
2077-
"type": "struct",
2078-
"fields": [
2079-
{
2080-
"id": 1,
2081-
"name": "id",
2082-
"required": true,
2083-
"type": "fixed[8]"
2084-
}
2085-
]
2086-
}
2087-
"#</span>;
2110+
"#</span>;
20882111

20892112
check_type_serde(
20902113
record,
20912114
Type::Struct(StructType {
2092-
fields: <span class="macro">vec!</span>[NestedField::required(
2093-
<span class="number">1</span>,
2094-
<span class="string">"id"</span>,
2095-
Type::Primitive(PrimitiveType::Fixed(<span class="number">8</span>)),
2096-
)
2097-
.into()],
2115+
fields: <span class="macro">vec!</span>[
2116+
NestedField::required(<span class="number">1</span>, <span class="string">"bool_field"</span>, Type::Primitive(PrimitiveType::Boolean))
2117+
.into(),
2118+
NestedField::required(<span class="number">2</span>, <span class="string">"int_field"</span>, Type::Primitive(PrimitiveType::Int))
2119+
.into(),
2120+
NestedField::required(<span class="number">3</span>, <span class="string">"long_field"</span>, Type::Primitive(PrimitiveType::Long))
2121+
.into(),
2122+
NestedField::required(<span class="number">4</span>, <span class="string">"float_field"</span>, Type::Primitive(PrimitiveType::Float))
2123+
.into(),
2124+
NestedField::required(
2125+
<span class="number">5</span>,
2126+
<span class="string">"double_field"</span>,
2127+
Type::Primitive(PrimitiveType::Double),
2128+
)
2129+
.into(),
2130+
NestedField::required(
2131+
<span class="number">6</span>,
2132+
<span class="string">"decimal_field"</span>,
2133+
Type::Primitive(PrimitiveType::Decimal {
2134+
precision: <span class="number">9</span>,
2135+
scale: <span class="number">2</span>,
2136+
}),
2137+
)
2138+
.into(),
2139+
NestedField::required(<span class="number">7</span>, <span class="string">"date_field"</span>, Type::Primitive(PrimitiveType::Date))
2140+
.into(),
2141+
NestedField::required(<span class="number">8</span>, <span class="string">"time_field"</span>, Type::Primitive(PrimitiveType::Time))
2142+
.into(),
2143+
NestedField::required(
2144+
<span class="number">9</span>,
2145+
<span class="string">"timestamp_field"</span>,
2146+
Type::Primitive(PrimitiveType::Timestamp),
2147+
)
2148+
.into(),
2149+
NestedField::required(
2150+
<span class="number">10</span>,
2151+
<span class="string">"timestamptz_field"</span>,
2152+
Type::Primitive(PrimitiveType::Timestamptz),
2153+
)
2154+
.into(),
2155+
NestedField::required(
2156+
<span class="number">11</span>,
2157+
<span class="string">"timestamp_ns_field"</span>,
2158+
Type::Primitive(PrimitiveType::TimestampNs),
2159+
)
2160+
.into(),
2161+
NestedField::required(
2162+
<span class="number">12</span>,
2163+
<span class="string">"timestamptz_ns_field"</span>,
2164+
Type::Primitive(PrimitiveType::TimestamptzNs),
2165+
)
2166+
.into(),
2167+
NestedField::required(<span class="number">13</span>, <span class="string">"uuid_field"</span>, Type::Primitive(PrimitiveType::Uuid))
2168+
.into(),
2169+
NestedField::required(
2170+
<span class="number">14</span>,
2171+
<span class="string">"fixed_field"</span>,
2172+
Type::Primitive(PrimitiveType::Fixed(<span class="number">10</span>)),
2173+
)
2174+
.into(),
2175+
NestedField::required(
2176+
<span class="number">15</span>,
2177+
<span class="string">"binary_field"</span>,
2178+
Type::Primitive(PrimitiveType::Binary),
2179+
)
2180+
.into(),
2181+
NestedField::required(
2182+
<span class="number">16</span>,
2183+
<span class="string">"string_field"</span>,
2184+
Type::Primitive(PrimitiveType::String),
2185+
)
2186+
.into(),
2187+
],
20982188
id_lookup: OnceLock::default(),
20992189
name_lookup: OnceLock::default(),
21002190
}),

0 commit comments

Comments
 (0)