Results of 1 - 10 of about 50 for scalar (0.005 sec.)
- Complete API 15445
- This page contains the reference for DuckDB's C API. The reference contains several deprecation notices. These concern methods whose long-term availability is not guaranteed as they may be removed in the future. That said, DuckDB's develope
...t_row_invalid ( uint64_t * validity , idx_t row ); void duckdb_validity_set_row_valid ( uint64_t * validity , idx_t row ); Scalar Functions duckdb_scalar_function duckdb_create_scalar_function (); void duckdb_destroy_scalar_function ( duckdb_scalar_fun...ction * scalar_function ); void duckdb_scalar_function_set_name ( duckdb_scalar_function scalar_function , const char * name ); void duck...db_scalar_function_set_varargs ( duckdb_scalar_function scalar_function , duckdb_logical_type type ); void duckdb_scalar_function_se... - https://man.mtool.work/duckdb/2.0/clients/c/api.html
- Functions 11505
- Function Syntax Function Chaining via the Dot Operator DuckDB supports the dot syntax for function chaining. This allows the function call fn(arg1, arg2, arg3, ...) to be rewritten as arg1.fn(arg2, arg3, ...) . For example, take the followi
...function call: Parser Error: syntax error at or near "(" Limitations Function chaining via the dot operator is limited to scalar functions and is not supported for table functions. For example, the following call returns a Parser Error : SELECT * FROM..._name, function_type, return_type, parameters, parameter_types, description FROM duckdb_functions() WHERE function_type = 'scalar' AND function_name LIKE 'b%' ORDER BY function_name; function_name function_type return_type parameters parameter_types de...scription bar scalar VARCHAR [x, min, max, width] [DOUBLE, DOUBLE, DOUBLE, DOUBLE] Draws a band whose width is proportional to (x - min) and eq... - https://man.mtool.work/duckdb/2.0/sql/functions/overview.html
- Subqueries 9850
- Subqueries are parenthesized query expressions that appear as part of a larger, outer query. Subqueries are usually based on SELECT ... FROM , but in DuckDB other query constructs such as PIVOT can also appear as a subquery. Scalar Subquery
...Scalar subqueries are subqueries that return a single value. They can be used anywhere where an expression can be used. If a scal...ar subquery returns more than a single value, an error is raised (unless scalar_subquery_error_on_multiple_rows is set to false , in which case a row is selected randomly). Consider the following table:...'CS'); We can run the following query to obtain the minimum grade: SELECT min(grade) FROM grades; min(grade) 7 By using a scalar subquery in the WHERE clause, we can figure out for which course this grade was obtained: SELECT course FROM grades WHERE... - https://man.mtool.work/duckdb/2.0/sql/expressions/subqueries.html
- CREATE MACRO Statement 9850
- The CREATE MACRO statement defines a named, callable SQL expression as a database schema object. Macros may declare parameters, which can be referenced by its expression. Once a macro is created, it may be called by referencing its name and
...ts parameters; this causes its expression to be evaluated, yielding a value. Depending on the macro type, the value may be scalar, or a TABLE value. The CREATE FUNCTION statement is an alias for CREATE MACRO . The simplified syntax for creating a macro...the expression, indicating the macro is a table macro and returns a result set. When omitted, the macro is automatically a scalar macro. The expression can be any valid SQL expression provided the expression's type is aligned with the macro's type . Pl...ement. Types of Macros The contexts where a particular macro may be called depends on the data type of its result value: * Scalar macros evaluate to a scalar value. For scalar macros, the expression can either be a simple expression, or a scalar subque... - https://man.mtool.work/duckdb/2.0/sql/statements/create_macro.html
- Write User Defined Functions 9038
- Overview The JDBC driver can register user-defined functions (UDFs) written in Java, including scalar functions and table functions. This page covers building and registering both, from the simple functional-interface overloads to the vecto
...rized interface, along with type mapping and the function registry. Scalar Functions Build a scalar function with the DuckDBFunctions.scalarFunction() builder — which returns an org.duckdb.DuckDBSc...; import org.duckdb.DuckDBFunctions; try (Connection conn = DriverManager.getConnection("jdbc:duckdb:")) { DuckDBFunctions.scalarFunction() .withName("java_add_one") .withParameter(int.class) .withReturnType(int.class) .withIntFunction(x -> x + 1) .reg...va_add_one(41); The binary overloads take two arguments of the same type, declared with withParameters() : DuckDBFunctions.scalarFunction() .withName("java_weighted_sum") .withParameters(double.class, double.class) .withReturnType(double.class) .withDo... - https://man.mtool.work/duckdb/2.0/clients/java/functions.html
- Write User Defined Functions 8677
- Overview The Go client can register user-defined functions written in Go: scalar functions that map input rows to a single output value, and table functions that produce a set of rows. It can also register a replacement scan that rewrites a
...n unresolved table name into a query. Scalar and table functions are registered on a connection checked out with db.Conn() , while a replacement scan is registered on...ector ; in each case the function is then callable from SQL like any built-in. The sections below build and register each. Scalar Functions A scalar function is a Go type that implements the duckdb.ScalarFunc interface, which has two methods: Config()...returns a duckdb.ScalarFuncConfig declaring the input parameter types, the result type, and, for a variadic function, the variadic parameter type.... - https://man.mtool.work/duckdb/2.0/clients/go/functions.html
- Lambda Functions 8617
- DuckDB lambda functions (a.k.a. 'lambdas' or 'lambda expressions') are expressions that define an inline anonymous function. Lambdas are passed as argument to certain list functions , which evaluate the passed lambda expression against its
...t function to pass the (1-based) index of the current element. This is always the last parameter. The expression must be a scalar expression. Additionally, it cannot contain a subquery, table function, and the like. The expression may contain macro inv...ocations. However, only scalar macros are allowed, and only if they do not rely on a subquery. For example, the following are all valid lambda functions:...DB'), 'duck') lambda acc, x : acc + x Lambda functions enable the use of more complex and flexible expressions in queries. Scalar Functions That Accept Lambda Functions Function Description apply(list, lambda(x)) Alias for list_transform . array_apply(... - https://man.mtool.work/duckdb/2.0/sql/functions/lambda.html
- Write User Defined Functions 8557
- Overview The Rust client can register user-defined functions written in Rust: scalar functions with the vscalar feature and table functions with the vtab feature. Both operate on DuckDB's columnar data chunks, so a single call processes a b
...of rows. The sections below build and register each, then point to a template for packaging them as a loadable extension. Scalar Functions A scalar function is a type that implements the VScalar trait, registered on a connection with register_scalar_f...ures() declares the argument and return types. The following defines add_one(BIGINT) -> BIGINT , adapted from the crate's vscalar example . It reads the single BIGINT argument as a slice of i64 and writes each result into the output vector: use duckdb:...:{ Connection, Result, core::{DataChunkHandle, LogicalTypeHandle, LogicalTypeId}, vscalar::{ScalarFunctionSignature, VScalar}, vtab::arrow::WritableVector, }; struct AddOne; impl VScalar for AddOne { // No per-fu... - https://man.mtool.work/duckdb/2.0/clients/rust/functions.html
- JSON Processing Functions 8271
- JSON Extraction Functions There are two extraction functions, which have their respective operators. The operators can only be used if the string is stored as the JSON logical type. These functions support the same two location notations as
...JSON Scalar functions . Function Alias Operator Description json_exists(json, path) Returns true if the supplied path exists in the js...of VARCHAR . json_value(json, path) Extracts JSON from json at the given path . If the json at the supplied path is not a scalar value, it will return NULL . Note that the arrow operator -> , which is used for JSON extracts, has a low precedence as it...ecies[*]', lambda s: s IS NOT NULL), lambda acc, s: acc || ', ' || s ) AS names FROM example; names duck, goose, swan JSON Scalar Functions The following scalar JSON functions can be used to gain information about the stored JSON values. With the excep... - https://man.mtool.work/duckdb/2.0/data/json/json_functions.html
- Rust Client 7971
- Installation To use the DuckDB Rust client, visit the Rust installation page . The latest stable version of the DuckDB Rust client is 2.0.0. The DuckDB Rust client, duckdb-rs , is an ergonomic wrapper over the DuckDB C API that exposes an i
..., which the plain bundled build omits. tpch The TPC-H benchmark extension. tpcds The TPC-DS benchmark extension. Table and Scalar Functions Feature Enables vtab Base support for table functions . vtab-arrow Apache Arrow integration for table functions,...converting between an Arrow RecordBatch and DuckDB data chunks. Implies vtab . vscalar Scalar functions . Implies vtab-arrow . vscalar-arrow Arrow-optimized scalar functions, intended for use alongside vscalar..., and JSON files. Handle Results — Apache Arrow and Polars result interchange. Write User Defined Functions — user-defined scalar and table functions, and loadable extensions. Profile and Monitor — query profiling and interrupting long-running queries.... - https://man.mtool.work/duckdb/2.0/clients/rust/overview.html
DuckDB 2.0 Documentation / man.mtool.work