Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uprev deps and stricter linting #21

Merged
merged 2 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 2 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ arrow = "52"
arrow-schema = "52"
datafusion-common = "39"
datafusion-expr = "39"
jiter = "0.4"
jiter = "0.5"
paste = "1"
log = "0.4"
datafusion-execution = "39"
Expand All @@ -31,11 +31,9 @@ tokio = { version = "1.37", features = ["full"] }
dbg_macro = "deny"
print_stdout = "deny"

# in general we lint against the pedantic group, but we will whitelist
# in general, we lint against the pedantic group, but we will whitelist
# certain lints which we don't want to enforce (for now)
pedantic = { level = "deny", priority = -1 }
missing_errors_doc = "allow"
cast_possible_truncation = "allow"

[[bench]]
name = "main"
Expand Down
2 changes: 1 addition & 1 deletion src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub enum JsonPath<'s> {

impl From<u64> for JsonPath<'_> {
fn from(index: u64) -> Self {
JsonPath::Index(index as usize)
JsonPath::Index(usize::try_from(index).unwrap())
}
}

Expand Down
10 changes: 9 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,15 @@ pub mod udfs {
pub use crate::json_length::json_length_udf;
}

/// Register all JSON UDFs
/// Register all JSON UDFs, and [`rewrite::JsonFunctionRewriter`] with the provided [`FunctionRegistry`].
///
/// # Arguments
///
/// * `registry`: `FunctionRegistry` to register the UDFs
///
/// # Errors
///
/// Returns an error if the UDFs cannot be registered or if the rewriter cannot be registered.
pub fn register_all(registry: &mut dyn FunctionRegistry) -> Result<()> {
let functions: Vec<Arc<ScalarUDF>> = vec![
json_get::json_get_udf(),
Expand Down
Loading