From 2319d26e82fc3ea29701a8a0ca209846b0dd4b93 Mon Sep 17 00:00:00 2001
From: Joel Natividad <1980690+jqnatividad@users.noreply.github.com>
Date: Sun, 19 Nov 2023 11:45:35 -0500
Subject: [PATCH 1/3] `deps`: update luau from 0.603 to 0.604
---
Cargo.lock | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Cargo.lock b/Cargo.lock
index 233cea0c2..1a30cc241 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2731,9 +2731,9 @@ checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f"
[[package]]
name = "luau0-src"
-version = "0.7.9+luau603"
+version = "0.7.10+luau604"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c4d253e83e2e41239e0d1501d1fc0038e4d97de62d4769bd16b4b33124d5e874"
+checksum = "343303fce0249db3b13e8aab8e887b868c35fd6aed91b233f633fee4c43ec8b7"
dependencies = [
"cc",
]
@@ -4529,9 +4529,9 @@ dependencies = [
[[package]]
name = "rustix"
-version = "0.38.24"
+version = "0.38.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9ad981d6c340a49cdc40a1028d9c6084ec7e9fa33fcb839cab656a267071e234"
+checksum = "dc99bc2d4f1fed22595588a013687477aedf3cdcfb26558c559edb67b4d9b22e"
dependencies = [
"bitflags 2.4.1",
"errno",
From 1522b59865eb786ab00fbc9da13f74f0dfb6bc5a Mon Sep 17 00:00:00 2001
From: Joel Natividad <1980690+jqnatividad@users.noreply.github.com>
Date: Sun, 19 Nov 2023 11:46:23 -0500
Subject: [PATCH 2/3] `docs`: update embedded Luau from 0.603 to 0.604
---
README.md | 2 +-
docs/INTERPRETERS.md | 2 +-
src/cmd/luau.rs | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index da3f23df3..628c68e3c 100644
--- a/README.md
+++ b/README.md
@@ -57,7 +57,7 @@
| [join](/src/cmd/join.rs#L2) | Inner, outer, right, cross, anti & semi joins. Automatically creates a simple, in-memory hash index to make it fast. |
| [joinp](/src/cmd/joinp.rs#L2)
✨🚀🐻❄️ | Inner, outer, cross, anti, semi & asof joins using the [Pola.rs](https://www.pola.rs) engine. Unlike the `join` command, `joinp` can process files larger than RAM, is multi-threaded, has join key validation, pre-join filtering, supports [asof joins](https://pola-rs.github.io/polars/py-polars/html/reference/dataframe/api/polars.DataFrame.join_asof.html) & its output doesn't have duplicate columns. However, `joinp` doesn't have an --ignore-case option & it doesn't support right outer joins. |
| [jsonl](/src/cmd/jsonl.rs#L2) | Convert newline-delimited JSON ([JSONL](https://jsonlines.org/)/[NDJSON](http://ndjson.org/)) to CSV. See `tojsonl` command to convert CSV to JSONL.
-|
[luau](/src/cmd/luau.rs#L2) 👑
✨📇🌐 ![CKAN](docs/images/ckan.png) | Create multiple new computed columns, filter rows, compute aggregations and build complex data pipelines by executing a [Luau](https://luau-lang.org) [0.603](https://github.com/Roblox/luau/releases/tag/0.603) expression/script for every row of a CSV file ([sequential mode](https://github.com/jqnatividad/qsv/blob/bb72c4ef369d192d85d8b7cc6e972c1b7df77635/tests/test_luau.rs#L254-L298)), or using [random access](https://www.webopedia.com/definitions/random-access/) with an index ([random access mode](https://github.com/jqnatividad/qsv/blob/bb72c4ef369d192d85d8b7cc6e972c1b7df77635/tests/test_luau.rs#L367-L415)).
Can process a single Luau expression or [full-fledged data-wrangling scripts using lookup tables](https://github.com/dathere/qsv-lookup-tables#example) with discrete BEGIN, MAIN and END sections.
It is not just another qsv command, it is qsv's [Domain-specific Language](https://en.wikipedia.org/wiki/Domain-specific_language) (DSL) with [numerous qsv-specific helper functions](https://github.com/jqnatividad/qsv/blob/113eee17b97882dc368b2e65fec52b86df09f78b/src/cmd/luau.rs#L1356-L2290) to build production data pipelines. |
+|
[luau](/src/cmd/luau.rs#L2) 👑
✨📇🌐 ![CKAN](docs/images/ckan.png) | Create multiple new computed columns, filter rows, compute aggregations and build complex data pipelines by executing a [Luau](https://luau-lang.org) [0.604](https://github.com/Roblox/luau/releases/tag/0.604) expression/script for every row of a CSV file ([sequential mode](https://github.com/jqnatividad/qsv/blob/bb72c4ef369d192d85d8b7cc6e972c1b7df77635/tests/test_luau.rs#L254-L298)), or using [random access](https://www.webopedia.com/definitions/random-access/) with an index ([random access mode](https://github.com/jqnatividad/qsv/blob/bb72c4ef369d192d85d8b7cc6e972c1b7df77635/tests/test_luau.rs#L367-L415)).
Can process a single Luau expression or [full-fledged data-wrangling scripts using lookup tables](https://github.com/dathere/qsv-lookup-tables#example) with discrete BEGIN, MAIN and END sections.
It is not just another qsv command, it is qsv's [Domain-specific Language](https://en.wikipedia.org/wiki/Domain-specific_language) (DSL) with [numerous qsv-specific helper functions](https://github.com/jqnatividad/qsv/blob/113eee17b97882dc368b2e65fec52b86df09f78b/src/cmd/luau.rs#L1356-L2290) to build production data pipelines. |
| [partition](/src/cmd/partition.rs#L2) | Partition a CSV based on a column value. |
| [pseudo](/src/cmd/pseudo.rs#L2) | [Pseudonymise](https://en.wikipedia.org/wiki/Pseudonymization) the value of the given column by replacing them with an incremental identifier. |
| [py](/src/cmd/python.rs#L2)
✨ | Create a new computed column or filter rows by evaluating a python expression on every row of a CSV file. Python's [f-strings](https://www.freecodecamp.org/news/python-f-strings-tutorial-how-to-use-f-strings-for-string-formatting/) is particularly useful for extended formatting, [with the ability to evaluate Python expressions as well](https://github.com/jqnatividad/qsv/blob/4cd00dca88addf0d287247fa27d40563b6d46985/src/cmd/python.rs#L23-L31). |
diff --git a/docs/INTERPRETERS.md b/docs/INTERPRETERS.md
index e367cf04e..1eec60c0a 100644
--- a/docs/INTERPRETERS.md
+++ b/docs/INTERPRETERS.md
@@ -14,7 +14,7 @@ As date manipulation is often needed, the [LuaDate](https://tieske.github.io/dat
Finally, as [qsv's DSL](../README.md#luau_deeplink) (👑), `luau` will gain even more features over time compared to the `python` feature.
-[Luau 0.603](https://github.com/Roblox/luau/releases/tag/0.603) is currently embedded - qsv's policy is to use the latest stable Luau version at the time of each qsv release.
+[Luau 0.604](https://github.com/Roblox/luau/releases/tag/0.604) is currently embedded - qsv's policy is to use the latest stable Luau version at the time of each qsv release.
## Python
diff --git a/src/cmd/luau.rs b/src/cmd/luau.rs
index cbbe35f07..61c875825 100644
--- a/src/cmd/luau.rs
+++ b/src/cmd/luau.rs
@@ -1,6 +1,6 @@
static USAGE: &str = r#"
Create multiple new computed columns, filter rows or compute aggregations by
-executing a Luau 0.603 script for every row (SEQUENTIAL MODE) or for
+executing a Luau 0.604 script for every row (SEQUENTIAL MODE) or for
specified rows (RANDOM ACCESS MODE) of a CSV file.
Luau is not just another qsv command. It is qsv's Domain-Specific Language (DSL)
From e73f7f62fe7a3abc7166e3176971e2ad18f882d2 Mon Sep 17 00:00:00 2001
From: Joel Natividad <1980690+jqnatividad@users.noreply.github.com>
Date: Sun, 19 Nov 2023 11:47:12 -0500
Subject: [PATCH 3/3] `tests`: update luau test using qsv_register_lookup to
not cache the downloaded lookup table
---
tests/test_luau.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/test_luau.rs b/tests/test_luau.rs
index 645d07288..502baf731 100644
--- a/tests/test_luau.rs
+++ b/tests/test_luau.rs
@@ -549,7 +549,7 @@ BEGIN {
csv_indexed = qsv_autoindex();
us_states_lookup_headers = qsv_register_lookup("us_states",
- "https://raw.githubusercontent.com/jqnatividad/qsv/master/resources/test/us-states-lookup.csv", 1000)
+ "https://raw.githubusercontent.com/jqnatividad/qsv/master/resources/test/us-states-lookup.csv", -1)
-- note how we use the qsv_log function to log to the qsv log file
qsv_log("debug", " _INDEX:", _INDEX, " _ROWCOUNT:", _ROWCOUNT, " csv_indexed:", csv_indexed)
@@ -640,7 +640,7 @@ BEGIN {
csv_indexed = qsv_autoindex();
us_states_lookup_headers = qsv_register_lookup("us_states",
- "dathere://us-states-example.csv", 1000)
+ "dathere://us-states-example.csv", -1)
-- note how we use the qsv_log function to log to the qsv log file
qsv_log("debug", " _INDEX:", _INDEX, " _ROWCOUNT:", _ROWCOUNT, " csv_indexed:", csv_indexed)