Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
e92e5f3
add replace, langMatches, and hash functions
aannleax Apr 6, 2026
86096f0
add strdt
aannleax Apr 6, 2026
dc6c273
add datetime functions
aannleax Apr 7, 2026
ee53e2a
cargo fmt
aannleax Apr 7, 2026
eb53eb3
restore functions
aannleax Apr 7, 2026
fa8d328
add nondeterministic functions
aannleax Apr 8, 2026
3c10765
add trim
aannleax Apr 8, 2026
21507bf
adjust tokio dependency to allow tests to be run on nemo-physical
aannleax Apr 8, 2026
f7ab3de
cargo fmt
aannleax Apr 8, 2026
58c1ea6
cargo clippy
aannleax Apr 8, 2026
f31b64f
add optional flag parameter for REGEX builtin
aannleax Apr 8, 2026
b72391e
add feature flag for uuid
aannleax Apr 8, 2026
5206acb
fix uuid on wasm
aannleax Apr 8, 2026
34a7345
review comments
aannleax Apr 8, 2026
685d83c
cargo fmt
aannleax Apr 8, 2026
5d3ff9b
add nullary function case
aannleax Apr 8, 2026
b337c44
Add DataValue::to_other method
aannleax Jul 14, 2026
cb7a2d1
Rename function name langMatches to LANGMATCHES
aannleax Jul 14, 2026
7f6e04a
Implement hashing generically
aannleax Jul 14, 2026
966d12a
remove unused chrono dependency and set uuid from v4 to v7
aannleax Jul 14, 2026
6db49b6
remove unused dependencies; update regex to fancy_regex
aannleax Jul 14, 2026
cb09d33
Remove chrono
aannleax Jul 14, 2026
d12beb7
Remove chrono and chnage regex to fancy-regex
aannleax Jul 14, 2026
6b52799
adjust implementation of new built-in functions
aannleax Jul 14, 2026
6a7bb5c
Recompute non-deterministic functions on every row
aannleax Jul 14, 2026
7b14484
Set now timestamp during initialization
aannleax Jul 14, 2026
3a551ea
Update test cases for new built-ins
aannleax Jul 14, 2026
08ba3a3
Enable oxsdatatypes js feature for wasm
aannleax Jul 14, 2026
4d696b4
Move uuid
aannleax Jul 14, 2026
f80f813
Lazily initilialize NOW_TIMESTAMP
aannleax Jul 14, 2026
1daf671
Fix nondeterministic functions being recomputed multiple times
aannleax Jul 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
147 changes: 146 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ strum = "0.28.0"
strum_macros = "0.28.0"
test-log = "0.2"
thiserror = "2.0"
tokio = "1.47.1"
tokio = { version = "1.47.1", features = ["rt", "macros"] }
urlencoding = "2.1.3"
uuid = { version = "1", features = ["v7"] }
line-index = "0.1.1"

[profile.dev]
Expand Down
10 changes: 9 additions & 1 deletion nemo-physical/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ repository.workspace = true
[features]
check_column_sorting = []
old_dictionaries = []
js = ["uuid/js", "oxsdatatypes/js"]

[[bin]]
name = "dict-bench"
Expand All @@ -31,7 +32,6 @@ lru = "0.16"
cpu-time = "1.0"
reqwest = { workspace = true }
delegate = { workspace = true }
regex = "1.9.5"
hashbrown = "0.16.0"
streaming-iterator = "0.1.9"
flate2 = { workspace = true }
Expand All @@ -40,9 +40,17 @@ urlencoding = { workspace = true }
oxiri = { workspace = true }
path-slash = "0.2.1"
levenshtein = "1.0.5"
rand = { workspace = true }
uuid = { workspace = true }
sha2 = "0.10"
sha1 = "0.10"
md5 = { package = "md-5", version = "0.10" }
digest = "0.10"
serde_urlencoded = "0.7.1"
serde = { workspace = true, features =["derive"]}
itertools = { workspace = true }
oxsdatatypes = "0.2.2"
fancy-regex = "0.18"

[dev-dependencies]
rand = { workspace = true }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is now duplicated, since we added it above

Expand Down
10 changes: 9 additions & 1 deletion nemo-physical/src/datatypes/storage_type_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub(crate) enum StorageTypeName {

/// A list of [StorageTypeName],
/// in the order they appear in the enum.
pub(crate) const STORAFE_TYPES: &[StorageTypeName] = &[
pub(crate) const STORAGE_TYPES: &[StorageTypeName] = &[
StorageTypeName::Id32,
StorageTypeName::Id64,
StorageTypeName::Int64,
Expand Down Expand Up @@ -113,6 +113,14 @@ impl StorageTypeBitSet {
result
}

/// Return the first [StorageTypeName] contained in this set, if any.
pub(crate) fn first_type(&self) -> Option<StorageTypeName> {
STORAGE_TYPES
.iter()
.copied()
.find(|storage_type| self.contains(storage_type))
}

/// Returns `true` if there is exactly one possible type.
pub(crate) fn is_unique(&self) -> bool {
self.0.is_single()
Expand Down
2 changes: 2 additions & 0 deletions nemo-physical/src/datavalues/any_datavalue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,8 @@ impl DataValue for AnyDataValue {
fn to_boolean_unchecked(&self) -> bool;
fn to_null(&self) -> Option<NullDataValue>;
fn to_null_unchecked(&self) -> NullDataValue;
fn to_other(&self) -> Option<(String, String)>;
fn to_other_unchecked(&self) -> (String, String);
fn label(&self) -> Option<&IriDataValue>;
fn length(&self) -> Option<usize>;
fn len_unchecked(&self) -> usize;
Expand Down
18 changes: 18 additions & 0 deletions nemo-physical/src/datavalues/datavalue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,24 @@ pub trait DataValue: Debug + Display + Into<AnyDataValue> + PartialEq + Eq + Has
panic!("Value is not a null.");
}

/// If this value is an other literal, return the pair of its lexical value and the IRI of its datatype.
#[must_use]
fn to_other(&self) -> Option<(String, String)> {
match self.value_domain() {
ValueDomain::Other => Some(self.to_other_unchecked()),
_ => None,
}
}

/// If this value is an other literal, return the pair of its lexical value and the IRI of its datatype.
///
/// # Panics
/// Panics if this value is not an other literal.
#[must_use]
fn to_other_unchecked(&self) -> (String, String) {
panic!("Value is not an other literal.");
}

/// Return the IRI-valued label of this complex value if it has a label,
/// and None otherwise. Only values in the domain [ValueDomain::Tuple] or
/// [ValueDomain::Map] can have labels.
Expand Down
4 changes: 4 additions & 0 deletions nemo-physical/src/datavalues/other_datavalue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ impl DataValue for OtherDataValue {
+ RDF_DATATYPE_INDICATOR
+ &super::datavalue::quote_iri(self.1.as_str())
}

fn to_other_unchecked(&self) -> (String, String) {
(self.0.to_owned(), self.1.to_owned())
}
}

impl std::hash::Hash for OtherDataValue {
Expand Down
Loading
Loading