This is an automated email from the ASF dual-hosted git repository.
quinnj pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/arrow-julia.git
The following commit(s) were added to refs/heads/asf-site by this push:
new 4ba8c98 build based on 64fc730
4ba8c98 is described below
commit 4ba8c98992faf5ae80eac94d726162a19f1fa83e
Author: Documenter.jl <[email protected]>
AuthorDate: Sun May 5 19:09:47 2024 +0000
build based on 64fc730
---
dev/.documenter-siteinfo.json | 2 +-
dev/assets/documenter.js | 923 +++++++++++++++++++--------------
dev/assets/themes/documenter-dark.css | 2 +-
dev/assets/themes/documenter-light.css | 2 +-
dev/index.html | 2 +-
dev/manual/index.html | 6 +-
dev/objects.inv | Bin 0 -> 1224 bytes
dev/reference/index.html | 12 +-
8 files changed, 555 insertions(+), 394 deletions(-)
diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json
index 881633b..43d35cc 100644
--- a/dev/.documenter-siteinfo.json
+++ b/dev/.documenter-siteinfo.json
@@ -1 +1 @@
-{"documenter":{"julia_version":"1.10.0","generation_timestamp":"2024-01-30T17:40:20","documenter_version":"1.2.1"}}
\ No newline at end of file
+{"documenter":{"julia_version":"1.10.2","generation_timestamp":"2024-05-05T19:09:43","documenter_version":"1.4.1"}}
\ No newline at end of file
diff --git a/dev/assets/documenter.js b/dev/assets/documenter.js
index f531160..c6562b5 100644
--- a/dev/assets/documenter.js
+++ b/dev/assets/documenter.js
@@ -4,7 +4,6 @@ requirejs.config({
'highlight-julia':
'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/languages/julia.min',
'headroom':
'https://cdnjs.cloudflare.com/ajax/libs/headroom/0.12.0/headroom.min',
'jqueryui':
'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.13.2/jquery-ui.min',
- 'minisearch':
'https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/index.min',
'katex-auto-render':
'https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.8/contrib/auto-render.min',
'jquery': 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.0/jquery.min',
'headroom-jquery':
'https://cdnjs.cloudflare.com/ajax/libs/headroom/0.12.0/jQuery.headroom.min',
@@ -103,9 +102,10 @@ $(document).on("click", ".docstring header", function () {
});
});
-$(document).on("click", ".docs-article-toggle-button", function () {
+$(document).on("click", ".docs-article-toggle-button", function (event) {
let articleToggleTitle = "Expand docstring";
let navArticleToggleTitle = "Expand all docstrings";
+ let animationSpeed = event.noToggleAnimation ? 0 : 400;
debounce(() => {
if (isExpanded) {
@@ -116,7 +116,7 @@ $(document).on("click", ".docs-article-toggle-button",
function () {
isExpanded = false;
- $(".docstring section").slideUp();
+ $(".docstring section").slideUp(animationSpeed);
} else {
$(this).removeClass("fa-chevron-down").addClass("fa-chevron-up");
$(".docstring-article-toggle-button")
@@ -127,7 +127,7 @@ $(document).on("click", ".docs-article-toggle-button",
function () {
articleToggleTitle = "Collapse docstring";
navArticleToggleTitle = "Collapse all docstrings";
- $(".docstring section").slideDown();
+ $(".docstring section").slideDown(animationSpeed);
}
$(this).prop("title", navArticleToggleTitle);
@@ -224,224 +224,465 @@ $(document).ready(function () {
})
////////////////////////////////////////////////////////////////////////////////
-require(['jquery', 'minisearch'], function($, minisearch) {
-
-// In general, most search related things will have "search" as a prefix.
-// To get an in-depth about the thought process you can refer:
https://hetarth02.hashnode.dev/series/gsoc
+require(['jquery'], function($) {
-let results = [];
-let timer = undefined;
+$(document).ready(function () {
+ let meta = $("div[data-docstringscollapsed]").data();
-let data = documenterSearchIndex["docs"].map((x, key) => {
- x["id"] = key; // minisearch requires a unique for each object
- return x;
+ if (meta?.docstringscollapsed) {
+ $("#documenter-article-toggle-button").trigger({
+ type: "click",
+ noToggleAnimation: true,
+ });
+ }
});
-// list below is the lunr 2.1.3 list minus the intersect with names(Base)
-// (all, any, get, in, is, only, which) and (do, else, for, let, where, while,
with)
-// ideally we'd just filter the original list but it's not available as a
variable
-const stopWords = new Set([
- "a",
- "able",
- "about",
- "across",
- "after",
- "almost",
- "also",
- "am",
- "among",
- "an",
- "and",
- "are",
- "as",
- "at",
- "be",
- "because",
- "been",
- "but",
- "by",
- "can",
- "cannot",
- "could",
- "dear",
- "did",
- "does",
- "either",
- "ever",
- "every",
- "from",
- "got",
- "had",
- "has",
- "have",
- "he",
- "her",
- "hers",
- "him",
- "his",
- "how",
- "however",
- "i",
- "if",
- "into",
- "it",
- "its",
- "just",
- "least",
- "like",
- "likely",
- "may",
- "me",
- "might",
- "most",
- "must",
- "my",
- "neither",
- "no",
- "nor",
- "not",
- "of",
- "off",
- "often",
- "on",
- "or",
- "other",
- "our",
- "own",
- "rather",
- "said",
- "say",
- "says",
- "she",
- "should",
- "since",
- "so",
- "some",
- "than",
- "that",
- "the",
- "their",
- "them",
- "then",
- "there",
- "these",
- "they",
- "this",
- "tis",
- "to",
- "too",
- "twas",
- "us",
- "wants",
- "was",
- "we",
- "were",
- "what",
- "when",
- "who",
- "whom",
- "why",
- "will",
- "would",
- "yet",
- "you",
- "your",
-]);
-
-let index = new minisearch({
- fields: ["title", "text"], // fields to index for full-text search
- storeFields: ["location", "title", "text", "category", "page"], // fields to
return with search results
- processTerm: (term) => {
- let word = stopWords.has(term) ? null : term;
- if (word) {
- // custom trimmer that doesn't strip @ and !, which are used in julia
macro and function names
- word = word
- .replace(/^[^a-zA-Z0-9@!]+/, "")
- .replace(/[^a-zA-Z0-9@!]+$/, "");
- }
+})
+////////////////////////////////////////////////////////////////////////////////
+require(['jquery'], function($) {
- return word ?? null;
- },
- // add . as a separator, because otherwise "title":
"Documenter.Anchors.add!", would not find anything if searching for "add!",
only for the entire qualification
- tokenize: (string) => string.split(/[\s\-\.]+/),
- // options which will be applied during the search
- searchOptions: {
- boost: { title: 100 },
- fuzzy: 2,
+/*
+To get an in-depth about the thought process you can refer:
https://hetarth02.hashnode.dev/series/gsoc
+
+PSEUDOCODE:
+
+Searching happens automatically as the user types or adjusts the selected
filters.
+To preserve responsiveness, as much as possible of the slow parts of the
search are done
+in a web worker. Searching and result generation are done in the worker, and
filtering and
+DOM updates are done in the main thread. The filters are in the main thread as
they should
+be very quick to apply. This lets filters be changed without re-searching with
minisearch
+(which is possible even if filtering is on the worker thread) and also lets
filters be
+changed _while_ the worker is searching and without message passing (neither
of which are
+possible if filtering is on the worker thread)
+
+SEARCH WORKER:
+
+Import minisearch
+
+Build index
+
+On message from main thread
+ run search
+ find the first 200 unique results from each category, and compute their divs
for display
+ note that this is necessary and sufficient information for the main thread
to find the
+ first 200 unique results from any given filter set
+ post results to main thread
+
+MAIN:
+
+Launch worker
+
+Declare nonconstant globals (worker_is_running, last_search_text,
unfiltered_results)
+
+On text update
+ if worker is not running, launch_search()
+
+launch_search
+ set worker_is_running to true, set last_search_text to the search text
+ post the search query to worker
+
+on message from worker
+ if last_search_text is not the same as the text in the search field,
+ the latest search result is not reflective of the latest search query, so
update again
+ launch_search()
+ otherwise
+ set worker_is_running to false
+
+ regardless, display the new search results to the user
+ save the unfiltered_results as a global
+ update_search()
+
+on filter click
+ adjust the filter selection
+ update_search()
+
+update_search
+ apply search filters by looping through the unfiltered_results and finding
the first 200
+ unique results that match the filters
+
+ Update the DOM
+*/
+
+/////// SEARCH WORKER ///////
+
+function worker_function(documenterSearchIndex, documenterBaseURL, filters) {
+ importScripts(
+ "https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/index.min.js"
+ );
+
+ let data = documenterSearchIndex.map((x, key) => {
+ x["id"] = key; // minisearch requires a unique for each object
+ return x;
+ });
+
+ // list below is the lunr 2.1.3 list minus the intersect with names(Base)
+ // (all, any, get, in, is, only, which) and (do, else, for, let, where,
while, with)
+ // ideally we'd just filter the original list but it's not available as a
variable
+ const stopWords = new Set([
+ "a",
+ "able",
+ "about",
+ "across",
+ "after",
+ "almost",
+ "also",
+ "am",
+ "among",
+ "an",
+ "and",
+ "are",
+ "as",
+ "at",
+ "be",
+ "because",
+ "been",
+ "but",
+ "by",
+ "can",
+ "cannot",
+ "could",
+ "dear",
+ "did",
+ "does",
+ "either",
+ "ever",
+ "every",
+ "from",
+ "got",
+ "had",
+ "has",
+ "have",
+ "he",
+ "her",
+ "hers",
+ "him",
+ "his",
+ "how",
+ "however",
+ "i",
+ "if",
+ "into",
+ "it",
+ "its",
+ "just",
+ "least",
+ "like",
+ "likely",
+ "may",
+ "me",
+ "might",
+ "most",
+ "must",
+ "my",
+ "neither",
+ "no",
+ "nor",
+ "not",
+ "of",
+ "off",
+ "often",
+ "on",
+ "or",
+ "other",
+ "our",
+ "own",
+ "rather",
+ "said",
+ "say",
+ "says",
+ "she",
+ "should",
+ "since",
+ "so",
+ "some",
+ "than",
+ "that",
+ "the",
+ "their",
+ "them",
+ "then",
+ "there",
+ "these",
+ "they",
+ "this",
+ "tis",
+ "to",
+ "too",
+ "twas",
+ "us",
+ "wants",
+ "was",
+ "we",
+ "were",
+ "what",
+ "when",
+ "who",
+ "whom",
+ "why",
+ "will",
+ "would",
+ "yet",
+ "you",
+ "your",
+ ]);
+
+ let index = new MiniSearch({
+ fields: ["title", "text"], // fields to index for full-text search
+ storeFields: ["location", "title", "text", "category", "page"], // fields
to return with results
processTerm: (term) => {
let word = stopWords.has(term) ? null : term;
if (word) {
+ // custom trimmer that doesn't strip @ and !, which are used in julia
macro and function names
word = word
.replace(/^[^a-zA-Z0-9@!]+/, "")
.replace(/[^a-zA-Z0-9@!]+$/, "");
+
+ word = word.toLowerCase();
}
return word ?? null;
},
+ // add . as a separator, because otherwise "title":
"Documenter.Anchors.add!", would not
+ // find anything if searching for "add!", only for the entire qualification
tokenize: (string) => string.split(/[\s\-\.]+/),
- },
-});
+ // options which will be applied during the search
+ searchOptions: {
+ prefix: true,
+ boost: { title: 100 },
+ fuzzy: 2,
+ },
+ });
-index.addAll(data);
+ index.addAll(data);
+
+ /**
+ * Used to map characters to HTML entities.
+ * Refer: https://github.com/lodash/lodash/blob/main/src/escape.ts
+ */
+ const htmlEscapes = {
+ "&": "&",
+ "<": "<",
+ ">": ">",
+ '"': """,
+ "'": "'",
+ };
+
+ /**
+ * Used to match HTML entities and HTML characters.
+ * Refer: https://github.com/lodash/lodash/blob/main/src/escape.ts
+ */
+ const reUnescapedHtml = /[&<>"']/g;
+ const reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
+
+ /**
+ * Escape function from lodash
+ * Refer: https://github.com/lodash/lodash/blob/main/src/escape.ts
+ */
+ function escape(string) {
+ return string && reHasUnescapedHtml.test(string)
+ ? string.replace(reUnescapedHtml, (chr) => htmlEscapes[chr])
+ : string || "";
+ }
-let filters = [...new Set(data.map((x) => x.category))];
-var modal_filters = make_modal_body_filters(filters);
-var filter_results = [];
+ /**
+ * Make the result component given a minisearch result data object and the
value
+ * of the search input as queryString. To view the result object structure,
refer:
+ *
https://lucaong.github.io/minisearch/modules/_minisearch_.html#searchresult
+ *
+ * @param {object} result
+ * @param {string} querystring
+ * @returns string
+ */
+ function make_search_result(result, querystring) {
+ let search_divider = `<div class="search-divider w-100"></div>`;
+ let display_link =
+ result.location.slice(Math.max(0), Math.min(50, result.location.length))
+
+ (result.location.length > 30 ? "..." : ""); // To cut-off the link
because it messes with the overflow of the whole div
+
+ if (result.page !== "") {
+ display_link += ` (${result.page})`;
+ }
-$(document).on("keyup", ".documenter-search-input", function (event) {
- // Adding a debounce to prevent disruptions from super-speed typing!
- debounce(() => update_search(filter_results), 300);
+ let textindex = new RegExp(`${querystring}`, "i").exec(result.text);
+ let text =
+ textindex !== null
+ ? result.text.slice(
+ Math.max(textindex.index - 100, 0),
+ Math.min(
+ textindex.index + querystring.length + 100,
+ result.text.length
+ )
+ )
+ : ""; // cut-off text before and after from the match
+
+ text = text.length ? escape(text) : "";
+
+ let display_result = text.length
+ ? "..." +
+ text.replace(
+ new RegExp(`${escape(querystring)}`, "i"), // For first occurrence
+ '<span class="search-result-highlight py-1">$&</span>'
+ ) +
+ "..."
+ : ""; // highlights the match
+
+ let in_code = false;
+ if (!["page", "section"].includes(result.category.toLowerCase())) {
+ in_code = true;
+ }
+
+ // We encode the full url to escape some special characters which can lead
to broken links
+ let result_div = `
+ <a href="${encodeURI(
+ documenterBaseURL + "/" + result.location
+ )}" class="search-result-link w-100 is-flex is-flex-direction-column
gap-2 px-4 py-2">
+ <div class="w-100 is-flex is-flex-wrap-wrap
is-justify-content-space-between is-align-items-flex-start">
+ <div class="search-result-title has-text-weight-bold ${
+ in_code ? "search-result-code-title" : ""
+ }">${escape(result.title)}</div>
+ <div class="property-search-result-badge">${result.category}</div>
+ </div>
+ <p>
+ ${display_result}
+ </p>
+ <div
+ class="has-text-left"
+ style="font-size: smaller;"
+ title="${result.location}"
+ >
+ <i class="fas fa-link"></i> ${display_link}
+ </div>
+ </a>
+ ${search_divider}
+ `;
+
+ return result_div;
+ }
+
+ self.onmessage = function (e) {
+ let query = e.data;
+ let results = index.search(query, {
+ filter: (result) => {
+ // Only return relevant results
+ return result.score >= 1;
+ },
+ });
+
+ // Pre-filter to deduplicate and limit to 200 per category to the extent
+ // possible without knowing what the filters are.
+ let filtered_results = [];
+ let counts = {};
+ for (let filter of filters) {
+ counts[filter] = 0;
+ }
+ let present = {};
+
+ for (let result of results) {
+ cat = result.category;
+ cnt = counts[cat];
+ if (cnt < 200) {
+ id = cat + "---" + result.location;
+ if (present[id]) {
+ continue;
+ }
+ present[id] = true;
+ filtered_results.push({
+ location: result.location,
+ category: cat,
+ div: make_search_result(result, query),
+ });
+ }
+ }
+
+ postMessage(filtered_results);
+ };
+}
+
+// `worker = Threads.@spawn worker_function(documenterSearchIndex)`, but in
JavaScript!
+const filters = [
+ ...new Set(documenterSearchIndex["docs"].map((x) => x.category)),
+];
+const worker_str =
+ "(" +
+ worker_function.toString() +
+ ")(" +
+ JSON.stringify(documenterSearchIndex["docs"]) +
+ "," +
+ JSON.stringify(documenterBaseURL) +
+ "," +
+ JSON.stringify(filters) +
+ ")";
+const worker_blob = new Blob([worker_str], { type: "text/javascript" });
+const worker = new Worker(URL.createObjectURL(worker_blob));
+
+/////// SEARCH MAIN ///////
+
+// Whether the worker is currently handling a search. This is a boolean
+// as the worker only ever handles 1 or 0 searches at a time.
+var worker_is_running = false;
+
+// The last search text that was sent to the worker. This is used to determine
+// if the worker should be launched again when it reports back results.
+var last_search_text = "";
+
+// The results of the last search. This, in combination with the state of the
filters
+// in the DOM, is used compute the results to display on calls to
update_search.
+var unfiltered_results = [];
+
+// Which filter is currently selected
+var selected_filter = "";
+
+$(document).on("input", ".documenter-search-input", function (event) {
+ if (!worker_is_running) {
+ launch_search();
+ }
});
+function launch_search() {
+ worker_is_running = true;
+ last_search_text = $(".documenter-search-input").val();
+ worker.postMessage(last_search_text);
+}
+
+worker.onmessage = function (e) {
+ if (last_search_text !== $(".documenter-search-input").val()) {
+ launch_search();
+ } else {
+ worker_is_running = false;
+ }
+
+ unfiltered_results = e.data;
+ update_search();
+};
+
$(document).on("click", ".search-filter", function () {
if ($(this).hasClass("search-filter-selected")) {
- $(this).removeClass("search-filter-selected");
+ selected_filter = "";
} else {
- $(this).addClass("search-filter-selected");
+ selected_filter = $(this).text().toLowerCase();
}
- // Adding a debounce to prevent disruptions from crazy clicking!
- debounce(() => get_filters(), 300);
+ // This updates search results and toggles classes for UI:
+ update_search();
});
-/**
- * A debounce function, takes a function and an optional timeout in
milliseconds
- *
- * @function callback
- * @param {number} timeout
- */
-function debounce(callback, timeout = 300) {
- clearTimeout(timer);
- timer = setTimeout(callback, timeout);
-}
-
/**
* Make/Update the search component
- *
- * @param {string[]} selected_filters
*/
-function update_search(selected_filters = []) {
- let initial_search_body = `
- <div class="has-text-centered my-5 py-5">Type something to get
started!</div>
- `;
-
+function update_search() {
let querystring = $(".documenter-search-input").val();
if (querystring.trim()) {
- results = index.search(querystring, {
- filter: (result) => {
- // Filtering results
- if (selected_filters.length === 0) {
- return result.score >= 1;
- } else {
- return (
- result.score >= 1 && selected_filters.includes(result.category)
- );
- }
- },
- });
+ if (selected_filter == "") {
+ results = unfiltered_results;
+ } else {
+ results = unfiltered_results.filter((result) => {
+ return selected_filter == result.category.toLowerCase();
+ });
+ }
let search_result_container = ``;
+ let modal_filters = make_modal_body_filters();
let search_divider = `<div class="search-divider w-100"></div>`;
if (results.length) {
@@ -449,19 +690,23 @@ function update_search(selected_filters = []) {
let count = 0;
let search_results = "";
- results.forEach(function (result) {
- if (result.location) {
- // Checking for duplication of results for the same page
- if (!links.includes(result.location)) {
- search_results += make_search_result(result, querystring);
- count++;
- }
-
+ for (var i = 0, n = results.length; i < n && count < 200; ++i) {
+ let result = results[i];
+ if (result.location && !links.includes(result.location)) {
+ search_results += result.div;
+ count++;
links.push(result.location);
}
- });
+ }
- let result_count = `<div class="is-size-6">${count} result(s)</div>`;
+ if (count == 1) {
+ count_str = "1 result";
+ } else if (count == 200) {
+ count_str = "200+ results";
+ } else {
+ count_str = count + " results";
+ }
+ let result_count = `<div class="is-size-6">${count_str}</div>`;
search_result_container = `
<div class="is-flex is-flex-direction-column gap-2
is-align-items-flex-start">
@@ -490,125 +735,37 @@ function update_search(selected_filters = []) {
$(".search-modal-card-body").html(search_result_container);
} else {
- filter_results = [];
- modal_filters = make_modal_body_filters(filters, filter_results);
-
if (!$(".search-modal-card-body").hasClass("is-justify-content-center")) {
$(".search-modal-card-body").addClass("is-justify-content-center");
}
- $(".search-modal-card-body").html(initial_search_body);
+ $(".search-modal-card-body").html(`
+ <div class="has-text-centered my-5 py-5">Type something to get
started!</div>
+ `);
}
}
/**
* Make the modal filter html
*
- * @param {string[]} filters
- * @param {string[]} selected_filters
* @returns string
*/
-function make_modal_body_filters(filters, selected_filters = []) {
- let str = ``;
-
- filters.forEach((val) => {
- if (selected_filters.includes(val)) {
- str += `<a href="javascript:;" class="search-filter
search-filter-selected"><span>${val}</span></a>`;
- } else {
- str += `<a href="javascript:;"
class="search-filter"><span>${val}</span></a>`;
- }
- });
+function make_modal_body_filters() {
+ let str = filters
+ .map((val) => {
+ if (selected_filter == val.toLowerCase()) {
+ return `<a href="javascript:;" class="search-filter
search-filter-selected"><span>${val}</span></a>`;
+ } else {
+ return `<a href="javascript:;"
class="search-filter"><span>${val}</span></a>`;
+ }
+ })
+ .join("");
- let filter_html = `
+ return `
<div class="is-flex gap-2 is-flex-wrap-wrap
is-justify-content-flex-start is-align-items-center search-filters">
<span class="is-size-6">Filters:</span>
${str}
- </div>
- `;
-
- return filter_html;
-}
-
-/**
- * Make the result component given a minisearch result data object and the
value of the search input as queryString.
- * To view the result object structure, refer:
https://lucaong.github.io/minisearch/modules/_minisearch_.html#searchresult
- *
- * @param {object} result
- * @param {string} querystring
- * @returns string
- */
-function make_search_result(result, querystring) {
- let search_divider = `<div class="search-divider w-100"></div>`;
- let display_link =
- result.location.slice(Math.max(0), Math.min(50, result.location.length)) +
- (result.location.length > 30 ? "..." : ""); // To cut-off the link because
it messes with the overflow of the whole div
-
- if (result.page !== "") {
- display_link += ` (${result.page})`;
- }
-
- let textindex = new RegExp(`\\b${querystring}\\b`, "i").exec(result.text);
- let text =
- textindex !== null
- ? result.text.slice(
- Math.max(textindex.index - 100, 0),
- Math.min(
- textindex.index + querystring.length + 100,
- result.text.length
- )
- )
- : ""; // cut-off text before and after from the match
-
- let display_result = text.length
- ? "..." +
- text.replace(
- new RegExp(`\\b${querystring}\\b`, "i"), // For first occurrence
- '<span class="search-result-highlight p-1">$&</span>'
- ) +
- "..."
- : ""; // highlights the match
-
- let in_code = false;
- if (!["page", "section"].includes(result.category.toLowerCase())) {
- in_code = true;
- }
-
- // We encode the full url to escape some special characters which can lead
to broken links
- let result_div = `
- <a href="${encodeURI(
- documenterBaseURL + "/" + result.location
- )}" class="search-result-link w-100 is-flex is-flex-direction-column
gap-2 px-4 py-2">
- <div class="w-100 is-flex is-flex-wrap-wrap
is-justify-content-space-between is-align-items-flex-start">
- <div class="search-result-title has-text-weight-bold ${
- in_code ? "search-result-code-title" : ""
- }">${result.title}</div>
- <div class="property-search-result-badge">${result.category}</div>
- </div>
- <p>
- ${display_result}
- </p>
- <div
- class="has-text-left"
- style="font-size: smaller;"
- title="${result.location}"
- >
- <i class="fas fa-link"></i> ${display_link}
- </div>
- </a>
- ${search_divider}
- `;
-
- return result_div;
-}
-
-/**
- * Get selected filters, remake the filter html and lastly update the search
modal
- */
-function get_filters() {
- let ele = $(".search-filters .search-filter-selected").get();
- filter_results = ele.map((x) => $(x).text().toLowerCase());
- modal_filters = make_modal_body_filters(filters, filter_results);
- update_search(filter_results);
+ </div>`;
}
})
@@ -635,103 +792,107 @@ $(document).ready(function () {
////////////////////////////////////////////////////////////////////////////////
require(['jquery'], function($) {
-let search_modal_header = `
- <header class="modal-card-head gap-2 is-align-items-center
is-justify-content-space-between w-100 px-3">
- <div class="field mb-0 w-100">
- <p class="control has-icons-right">
- <input class="input documenter-search-input" type="text"
placeholder="Search" />
- <span class="icon is-small is-right has-text-primary-dark">
- <i class="fas fa-magnifying-glass"></i>
- </span>
- </p>
- </div>
- <div class="icon is-size-4 is-clickable close-search-modal">
- <i class="fas fa-times"></i>
- </div>
- </header>
-`;
-
-let initial_search_body = `
- <div class="has-text-centered my-5 py-5">Type something to get started!</div>
-`;
-
-let search_modal_footer = `
- <footer class="modal-card-foot">
- <span>
- <kbd class="search-modal-key-hints">Ctrl</kbd> +
- <kbd class="search-modal-key-hints">/</kbd> to search
- </span>
- <span class="ml-3"> <kbd class="search-modal-key-hints">esc</kbd> to close
</span>
- </footer>
-`;
-
-$(document.body).append(
- `
- <div class="modal" id="search-modal">
- <div class="modal-background"></div>
- <div class="modal-card search-min-width-50 search-min-height-100
is-justify-content-center">
- ${search_modal_header}
- <section class="modal-card-body is-flex is-flex-direction-column
is-justify-content-center gap-4 search-modal-card-body">
- ${initial_search_body}
- </section>
- ${search_modal_footer}
+$(document).ready(function () {
+ let search_modal_header = `
+ <header class="modal-card-head gap-2 is-align-items-center
is-justify-content-space-between w-100 px-3">
+ <div class="field mb-0 w-100">
+ <p class="control has-icons-right">
+ <input class="input documenter-search-input" type="text"
placeholder="Search" />
+ <span class="icon is-small is-right has-text-primary-dark">
+ <i class="fas fa-magnifying-glass"></i>
+ </span>
+ </p>
</div>
- </div>
- `
-);
+ <div class="icon is-size-4 is-clickable close-search-modal">
+ <i class="fas fa-times"></i>
+ </div>
+ </header>
+ `;
-document.querySelector(".docs-search-query").addEventListener("click", () => {
- openModal();
-});
+ let initial_search_body = `
+ <div class="has-text-centered my-5 py-5">Type something to get
started!</div>
+ `;
-document.querySelector(".close-search-modal").addEventListener("click", () => {
- closeModal();
-});
+ let search_modal_footer = `
+ <footer class="modal-card-foot">
+ <span>
+ <kbd class="search-modal-key-hints">Ctrl</kbd> +
+ <kbd class="search-modal-key-hints">/</kbd> to search
+ </span>
+ <span class="ml-3"> <kbd class="search-modal-key-hints">esc</kbd> to
close </span>
+ </footer>
+ `;
-$(document).on("click", ".search-result-link", function () {
- closeModal();
-});
+ $(document.body).append(
+ `
+ <div class="modal" id="search-modal">
+ <div class="modal-background"></div>
+ <div class="modal-card search-min-width-50 search-min-height-100
is-justify-content-center">
+ ${search_modal_header}
+ <section class="modal-card-body is-flex is-flex-direction-column
is-justify-content-center gap-4 search-modal-card-body">
+ ${initial_search_body}
+ </section>
+ ${search_modal_footer}
+ </div>
+ </div>
+ `
+ );
-document.addEventListener("keydown", (event) => {
- if ((event.ctrlKey || event.metaKey) && event.key === "/") {
+ document.querySelector(".docs-search-query").addEventListener("click", () =>
{
openModal();
- } else if (event.key === "Escape") {
- closeModal();
- }
+ });
- return false;
-});
+ document
+ .querySelector(".close-search-modal")
+ .addEventListener("click", () => {
+ closeModal();
+ });
-// Functions to open and close a modal
-function openModal() {
- let searchModal = document.querySelector("#search-modal");
+ $(document).on("click", ".search-result-link", function () {
+ closeModal();
+ });
- searchModal.classList.add("is-active");
- document.querySelector(".documenter-search-input").focus();
-}
+ document.addEventListener("keydown", (event) => {
+ if ((event.ctrlKey || event.metaKey) && event.key === "/") {
+ openModal();
+ } else if (event.key === "Escape") {
+ closeModal();
+ }
-function closeModal() {
- let searchModal = document.querySelector("#search-modal");
- let initial_search_body = `
- <div class="has-text-centered my-5 py-5">Type something to get
started!</div>
- `;
+ return false;
+ });
- searchModal.classList.remove("is-active");
- document.querySelector(".documenter-search-input").blur();
+ // Functions to open and close a modal
+ function openModal() {
+ let searchModal = document.querySelector("#search-modal");
- if (!$(".search-modal-card-body").hasClass("is-justify-content-center")) {
- $(".search-modal-card-body").addClass("is-justify-content-center");
+ searchModal.classList.add("is-active");
+ document.querySelector(".documenter-search-input").focus();
}
- $(".documenter-search-input").val("");
- $(".search-modal-card-body").html(initial_search_body);
-}
+ function closeModal() {
+ let searchModal = document.querySelector("#search-modal");
+ let initial_search_body = `
+ <div class="has-text-centered my-5 py-5">Type something to get
started!</div>
+ `;
-document
- .querySelector("#search-modal .modal-background")
- .addEventListener("click", () => {
- closeModal();
- });
+ searchModal.classList.remove("is-active");
+ document.querySelector(".documenter-search-input").blur();
+
+ if (!$(".search-modal-card-body").hasClass("is-justify-content-center")) {
+ $(".search-modal-card-body").addClass("is-justify-content-center");
+ }
+
+ $(".documenter-search-input").val("");
+ $(".search-modal-card-body").html(initial_search_body);
+ }
+
+ document
+ .querySelector("#search-modal .modal-background")
+ .addEventListener("click", () => {
+ closeModal();
+ });
+});
})
////////////////////////////////////////////////////////////////////////////////
diff --git a/dev/assets/themes/documenter-dark.css
b/dev/assets/themes/documenter-dark.css
index 9f5449f..1d71701 100644
--- a/dev/assets/themes/documenter-dark.css
+++ b/dev/assets/themes/documenter-dark.css
@@ -4,4 +4,4 @@
Maintainer: @ericwbailey
Based on the Tomorrow Night Eighties theme:
https://github.com/isagalaev/highlight.js/blob/master/src/styles/tomorrow-night-eighties.css
-*/}html.theme--documenter-dark
html{background-color:#1f2424;font-size:16px;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;min-width:300px;overflow-x:auto;overflow-y:scroll;text-rendering:optimizeLegibility;text-size-adjust:100%}html.theme--documenter-dark
article,html.theme--documenter-dark aside,html.theme--documenter-dark
figure,html.theme--documenter-dark footer,html.theme--documenter-dark
header,html.theme--documenter-dark hgroup,html.theme--documenter-dark sec [...]
+*/}html.theme--documenter-dark
html{background-color:#1f2424;font-size:16px;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;min-width:300px;overflow-x:auto;overflow-y:scroll;text-rendering:optimizeLegibility;text-size-adjust:100%}html.theme--documenter-dark
article,html.theme--documenter-dark aside,html.theme--documenter-dark
figure,html.theme--documenter-dark footer,html.theme--documenter-dark
header,html.theme--documenter-dark hgroup,html.theme--documenter-dark sec [...]
diff --git a/dev/assets/themes/documenter-light.css
b/dev/assets/themes/documenter-light.css
index 2f168c7..07f9d08 100644
--- a/dev/assets/themes/documenter-light.css
+++ b/dev/assets/themes/documenter-light.css
@@ -1,4 +1,4 @@
-.pagination-previous,.pagination-next,.pagination-link,.pagination-ellipsis,.file-cta,.file-name,.select
select,.textarea,.input,#documenter .docs-sidebar
form.docs-search>input,.button{-moz-appearance:none;-webkit-appearance:none;align-items:center;border:1px
solid
transparent;border-radius:4px;box-shadow:none;display:inline-flex;font-size:1rem;height:2.5em;justify-content:flex-start;line-height:1.5;padding-bottom:calc(0.5em
- 1px);padding-left:calc(0.75em - 1px);padding-right:calc(0.7 [...]
+.pagination-previous,.pagination-next,.pagination-link,.pagination-ellipsis,.file-cta,.file-name,.select
select,.textarea,.input,#documenter .docs-sidebar
form.docs-search>input,.button{-moz-appearance:none;-webkit-appearance:none;align-items:center;border:1px
solid
transparent;border-radius:4px;box-shadow:none;display:inline-flex;font-size:1rem;height:2.5em;justify-content:flex-start;line-height:1.5;padding-bottom:calc(0.5em
- 1px);padding-left:calc(0.75em - 1px);padding-right:calc(0.7 [...]
Theme: Default
Description: Original highlight.js style
Author: (c) Ivan Sagalaev <[email protected]>
diff --git a/dev/index.html b/dev/index.html
index f5bb865..67606e9 100644
--- a/dev/index.html
+++ b/dev/index.html
@@ -1,2 +1,2 @@
<!DOCTYPE html>
-<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport"
content="width=device-width, initial-scale=1.0"/><title>Home ·
Arrow.jl</title><meta name="title" content="Home · Arrow.jl"/><meta
property="og:title" content="Home · Arrow.jl"/><meta property="twitter:title"
content="Home · Arrow.jl"/><meta name="description" content="Documentation for
Arrow.jl."/><meta property="og:description" content="Documentation for
Arrow.jl."/><meta property="twitter:description" content="Document [...]
+<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport"
content="width=device-width, initial-scale=1.0"/><title>Home ·
Arrow.jl</title><meta name="title" content="Home · Arrow.jl"/><meta
property="og:title" content="Home · Arrow.jl"/><meta property="twitter:title"
content="Home · Arrow.jl"/><meta name="description" content="Documentation for
Arrow.jl."/><meta property="og:description" content="Documentation for
Arrow.jl."/><meta property="twitter:description" content="Document [...]
diff --git a/dev/manual/index.html b/dev/manual/index.html
index 98e92f9..b0b7c71 100644
--- a/dev/manual/index.html
+++ b/dev/manual/index.html
@@ -1,5 +1,5 @@
<!DOCTYPE html>
-<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport"
content="width=device-width, initial-scale=1.0"/><title>User Manual ·
Arrow.jl</title><meta name="title" content="User Manual · Arrow.jl"/><meta
property="og:title" content="User Manual · Arrow.jl"/><meta
property="twitter:title" content="User Manual · Arrow.jl"/><meta
name="description" content="Documentation for Arrow.jl."/><meta
property="og:description" content="Documentation for Arrow.jl."/><meta
property="twitter:de [...]
+<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport"
content="width=device-width, initial-scale=1.0"/><title>User Manual ·
Arrow.jl</title><meta name="title" content="User Manual · Arrow.jl"/><meta
property="og:title" content="User Manual · Arrow.jl"/><meta
property="twitter:title" content="User Manual · Arrow.jl"/><meta
name="description" content="Documentation for Arrow.jl."/><meta
property="og:description" content="Documentation for Arrow.jl."/><meta
property="twitter:de [...]
table = Arrow.Table("data.arrow")</code></pre><h3
id="Arrow.Table"><a class="docs-heading-anchor"
href="#Arrow.Table"><code>Arrow.Table</code></a><a id="Arrow.Table-1"></a><a
class="docs-heading-anchor-permalink" href="#Arrow.Table"
title="Permalink"></a></h3><p>The type of <code>table</code> in this example
will be an <code>Arrow.Table</code>. When "reading" the arrow data,
<code>Arrow.Table</code> first <a
href="https://en.wikipedia.org/wiki/Mmap">"mmapped" [...]
@@ -43,11 +43,11 @@ function ArrowTypes.JuliaType(::Val{NAME},
::Type{NamedTuple{names, types}}, met
end
ArrowTypes.fromarrow(::Type{Interval{T, L, R}}, first, last) where {T, L, R} =
Interval{L, R}(first, R == Unbounded ? nothing : last)
io = Arrow.tobuffer(table)
-tbl = Arrow.Table(io)</code></pre><p>Again, let's break down what's
going on here:</p><ul><li>Here we're trying to save an
<code>Interval</code> type in the arrow format; this type is unique in that it
has two type parameters (<code>Closed</code> and <code>Unbounded</code>) that
are not inferred/based on fields, but are just "type tags" on the
type itself</li><li>Note that we define a generic <code>arrowname</code> method
on all <code>Interval</code>s, regardless of [...]
+tbl = Arrow.Table(io)</code></pre><p>Again, let's break down what's
going on here:</p><ul><li>Here we're trying to save an
<code>Interval</code> type in the arrow format; this type is unique in that it
has two type parameters (<code>Closed</code> and <code>Unbounded</code>) that
are not inferred/based on fields, but are just "type tags" on the
type itself</li><li>Note that we define a generic <code>arrowname</code> method
on all <code>Interval</code>s, regardless of [...]
tbl_parts = Tables.partitioner([(col1=data1, col2=data2), (col1=data3,
col2=data4)])
Arrow.write(io, tbl_parts)
# treat an array of csv files with same schema where each file is a partition
# in this form, a function `CSV.File` is applied to each element of 2nd
argument
csv_parts = Tables.partitioner(CSV.File, csv_files)
-Arrow.write(io, csv_parts)</code></pre><h3 id="Arrow.Writer"><a
class="docs-heading-anchor"
href="#Arrow.Writer"><code>Arrow.Writer</code></a><a id="Arrow.Writer-1"></a><a
class="docs-heading-anchor-permalink" href="#Arrow.Writer"
title="Permalink"></a></h3><p>With <code>Arrow.Writer</code>, you instantiate
an <code>Arrow.Writer</code> object, write sources using it, and then close it.
This allows for incrmental writes to the same sink. It is similar to
<code>Arrow.append</code> withou [...]
+Arrow.write(io, csv_parts)</code></pre><h3 id="Arrow.Writer"><a
class="docs-heading-anchor"
href="#Arrow.Writer"><code>Arrow.Writer</code></a><a id="Arrow.Writer-1"></a><a
class="docs-heading-anchor-permalink" href="#Arrow.Writer"
title="Permalink"></a></h3><p>With <code>Arrow.Writer</code>, you instantiate
an <code>Arrow.Writer</code> object, write sources using it, and then close it.
This allows for incrmental writes to the same sink. It is similar to
<code>Arrow.append</code> withou [...]
diff --git a/dev/objects.inv b/dev/objects.inv
new file mode 100644
index 0000000..7147028
Binary files /dev/null and b/dev/objects.inv differ
diff --git a/dev/reference/index.html b/dev/reference/index.html
index 722053b..bf40608 100644
--- a/dev/reference/index.html
+++ b/dev/reference/index.html
@@ -1,11 +1,11 @@
<!DOCTYPE html>
-<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport"
content="width=device-width, initial-scale=1.0"/><title>API Reference ·
Arrow.jl</title><meta name="title" content="API Reference · Arrow.jl"/><meta
property="og:title" content="API Reference · Arrow.jl"/><meta
property="twitter:title" content="API Reference · Arrow.jl"/><meta
name="description" content="Documentation for Arrow.jl."/><meta
property="og:description" content="Documentation for Arrow.jl."/><meta
property="tw [...]
+<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport"
content="width=device-width, initial-scale=1.0"/><title>API Reference ·
Arrow.jl</title><meta name="title" content="API Reference · Arrow.jl"/><meta
property="og:title" content="API Reference · Arrow.jl"/><meta
property="twitter:title" content="API Reference · Arrow.jl"/><meta
name="description" content="Documentation for Arrow.jl."/><meta
property="og:description" content="Documentation for Arrow.jl."/><meta
property="tw [...]
Arrow.Stream(file::String; convert::Bool=true)
Arrow.Stream(bytes::Vector{UInt8}, pos=1, len=nothing; convert::Bool=true)
-Arrow.Stream(inputs::Vector; convert::Bool=true)</code></pre><p>Start reading
an arrow formatted table, from:</p><ul><li><code>io</code>, bytes will be read
all at once via <code>read(io)</code></li><li><code>file</code>, bytes will be
read via <code>Mmap.mmap(file)</code></li><li><code>bytes</code>, a byte vector
directly, optionally allowing specifying the starting byte position
<code>pos</code> and <code>len</code></li><li>A <code>Vector</code> of any of
the above, in which each input [...]
+Arrow.Stream(inputs::Vector; convert::Bool=true)</code></pre><p>Start reading
an arrow formatted table, from:</p><ul><li><code>io</code>, bytes will be read
all at once via <code>read(io)</code></li><li><code>file</code>, bytes will be
read via <code>Mmap.mmap(file)</code></li><li><code>bytes</code>, a byte vector
directly, optionally allowing specifying the starting byte position
<code>pos</code> and <code>len</code></li><li>A <code>Vector</code> of any of
the above, in which each input [...]
Arrow.Table(file::String; convert::Bool=true)
Arrow.Table(bytes::Vector{UInt8}, pos=1, len=nothing; convert::Bool=true)
-Arrow.Table(inputs::Vector; convert::Bool=true)</code></pre><p>Read an arrow
formatted table, from:</p><ul><li><code>io</code>, bytes will be read all at
once via <code>read(io)</code></li><li><code>file</code>, bytes will be read
via <code>Mmap.mmap(file)</code></li><li><code>bytes</code>, a byte vector
directly, optionally allowing specifying the starting byte position
<code>pos</code> and <code>len</code></li><li>A <code>Vector</code> of any of
the above, in which each input should be [...]
+Arrow.Table(inputs::Vector; convert::Bool=true)</code></pre><p>Read an arrow
formatted table, from:</p><ul><li><code>io</code>, bytes will be read all at
once via <code>read(io)</code></li><li><code>file</code>, bytes will be read
via <code>Mmap.mmap(file)</code></li><li><code>bytes</code>, a byte vector
directly, optionally allowing specifying the starting byte position
<code>pos</code> and <code>len</code></li><li>A <code>Vector</code> of any of
the above, in which each input should be [...]
julia> partition1 = (col1 = [1, 2], col2 = ["A", "B"])
(col1 = [1, 2], col2 = ["A", "B"])
@@ -22,8 +22,8 @@ julia> close(writer)</code></pre><p>It's also possible
to automatically c
Arrow.write(writer, partition1)
partition2 = (col1 = [3, 4], col2 = ["C", "D"])
Arrow.write(writer, partition2)
- end</code></pre></div><a class="docs-sourcelink" target="_blank"
href="https://github.com/apache/arrow-julia/blob/ac199b0e377502ea0f1fa5ced7fda897a01b82a9/src/write.jl#L78-L110">source</a></section></article><article
class="docstring"><header><a class="docstring-article-toggle-button fa-solid
fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a
class="docstring-binding" id="Arrow.append"
href="#Arrow.append"><code>Arrow.append</code></a> — <span class="docstring-
[...]
+ end</code></pre></div><a class="docs-sourcelink" target="_blank"
href="https://github.com/apache/arrow-julia/blob/64fc730f767de84835a5f1b4fc9b7831a3c2d15b/src/write.jl#L78-L110">source</a></section></article><article
class="docstring"><header><a class="docstring-article-toggle-button fa-solid
fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a
class="docstring-binding" id="Arrow.append"
href="#Arrow.append"><code>Arrow.append</code></a> — <span class="docstring-
[...]
Arrow.append(file::String, tbl)
-tbl |> Arrow.append(file)</code></pre><p>Append any <a
href="https://github.com/JuliaData/Tables.jl">Tables.jl</a>-compatible
<code>tbl</code> to an existing arrow formatted file or IO. The existing arrow
data must be in IPC stream format. Note that appending to the "feather
formatted file" is <em>not</em> allowed, as this file format doesn't
support appending. That means files written like
<code>Arrow.write(filename::String, tbl)</code> <em>cannot</em> be appended to;
i [...]
+tbl |> Arrow.append(file)</code></pre><p>Append any <a
href="https://github.com/JuliaData/Tables.jl">Tables.jl</a>-compatible
<code>tbl</code> to an existing arrow formatted file or IO. The existing arrow
data must be in IPC stream format. Note that appending to the "feather
formatted file" is <em>not</em> allowed, as this file format doesn't
support appending. That means files written like
<code>Arrow.write(filename::String, tbl)</code> <em>cannot</em> be appended to;
i [...]
Arrow.write(file::String, tbl)
-tbl |> Arrow.write(io_or_file)</code></pre><p>Write any <a
href="https://github.com/JuliaData/Tables.jl">Tables.jl</a>-compatible
<code>tbl</code> out as arrow formatted data. Providing an <code>io::IO</code>
argument will cause the data to be written to it in the <a
href="https://arrow.apache.org/docs/format/Columnar.html#ipc-streaming-format">"streaming"
format</a>, unless <code>file=true</code> keyword argument is passed.
Providing a <code>file::String</code> argument wil [...]
+tbl |> Arrow.write(io_or_file)</code></pre><p>Write any <a
href="https://github.com/JuliaData/Tables.jl">Tables.jl</a>-compatible
<code>tbl</code> out as arrow formatted data. Providing an <code>io::IO</code>
argument will cause the data to be written to it in the <a
href="https://arrow.apache.org/docs/format/Columnar.html#ipc-streaming-format">"streaming"
format</a>, unless <code>file=true</code> keyword argument is passed.
Providing a <code>file::String</code> argument wil [...]