From 1ac548c5524b9956ceaeba8b25c4f04918a8b894 Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Mon, 18 Nov 2024 07:53:12 -0800 Subject: [PATCH] Fix: typo in post for simple functions (#11555) Summary: Fix: typo in post for simple functions Reviewed By: xiaoxmeng Differential Revision: D63989272 --- website/blog/2023-05-01-simple-2.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/blog/2023-05-01-simple-2.mdx b/website/blog/2023-05-01-simple-2.mdx index 1f8ce94a8e88c..e8370980d4745 100644 --- a/website/blog/2023-05-01-simple-2.mdx +++ b/website/blog/2023-05-01-simple-2.mdx @@ -28,7 +28,7 @@ The previous representations of input complex types in the simple function inter The previous approach has two key inefficiencies; **Eager materialization** : For each row, all the data in the input vector is decoded and read before calling the function. And **Double reading**, the data is read twice once when the input is constructed, and again in the function when it's used. -In order to mitigate those regressions, Velox introduced View types: ArraViews, MapViews ...etc. The goal is to keep the authoring simple but achieve at least the performance of a basic vector implementation that decodes input and applies some logic for every row without any special optimizations. +In order to mitigate those regressions, Velox introduced View types: ArrayViews, MapViews ...etc. The goal is to keep the authoring simple but achieve at least the performance of a basic vector implementation that decodes input and applies some logic for every row without any special optimizations. The view types are **Lazy**, very cheap to construct and do not materialize the underlying data unless the code accesses it.For example, the function _array_first_ only needs to read the first element in every array, moreover the _cardinality_ function does not need to read any elements in the array. They view types have interfaces similar to those of std::containers. @@ -69,7 +69,7 @@ A similar pattern of inefficiency existed for functions with complex output type We changed the writing path so that the data is written directly into the Velox vector during the function evaluation. By introducing writer types: ArrayWriter, MapWriter, RowWriter. This avoids the double materialization and the unnecessary sorting and hashing for maps. -Consider the function below for example that constructs an array [0, n-1). +Consider the function below for example that constructs an array [0, n).