Results of 1 - 10 of about 11 for deterministic (0.002 sec.)
- Non-Deterministic Behavior 14403
- Several operators in DuckDB exhibit non-deterministic behavior. Most notably, SQL uses set semantics, which allows results to be returned in a different order. DuckDB exploits this to improve performance, particularly when performing multi-
...ring. This page documents the cases where non-determinism is an expected behavior . If you would like to make your queries deterministic, see the “Working Around Non-Determinism” section . Set Semantics One of the most common sources of non-determinism is the...cies may produce different results when run in multi-threaded configurations: For example, stddev and corr may produce non-deterministic results : CREATE TABLE tbl AS SELECT 'ABCDEFG'[floor(random() * 7 + 1)::INT] AS s, 3.7 AS x, i AS y FROM range(1, 1_000_00...-Determinism For the majority of use cases, non-determinism is not causing any issues. However, there are some cases where deterministic results are desirable. In these cases, try the following workarounds: Limit the number of threads to prevent non-determini... - https://man.mtool.work/duckdb/2.0/operations_manual/non-deterministic_behavior.h...
- LIMIT and OFFSET Clauses 9086
- LIMIT is an output modifier. Logically it is applied at the very end of the query. The LIMIT clause restricts the amount of rows fetched. The OFFSET clause indicates at which position to start reading the values, i.e., the first OFFSET valu
...es are ignored. Note that while LIMIT can be used without an ORDER BY clause, the results might not be deterministic without the ORDER BY clause. This can still be useful, however, for example when you want to inspect a quick snapshot of t... - https://man.mtool.work/duckdb/2.0/sql/query_syntax/limit.html
- Deploy as Native Image 8517
- Overview The JDBC driver runs inside GraalVM Native Image executables. Graal Native Image compiles a Java application ahead of time into a standalone binary that starts in milliseconds and requires no JVM on the target machine, which suits
...erviceLoader is not always visible to Graal Native Image's closed world analysis, and the explicit load makes registration deterministic. Providing the Shared Library DuckDB's engine is a native library bundled inside the driver JAR, one file per platform. Ch... - https://man.mtool.work/duckdb/2.0/clients/java/deploy_native_image.html
- Write User Defined Functions 8517
- 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
...so an object callback should still check its arguments for null . Volatile Functions DuckDB may treat a scalar function as deterministic and cache or constant-fold its result for repeated inputs. Call withVolatile() for a function whose output can change betw...be released when the scan finishes. A state that owns such a resource can implement DuckDBTableFunctionState to receive a deterministic close() call once DuckDB no longer needs it: final class SourceState implements DuckDBTableFunctionState { private final A... - https://man.mtool.work/duckdb/2.0/clients/java/functions.html
- UPDATE Statement 8517
- The UPDATE statement modifies the values of rows in a table. Examples For every row where i is NULL , set the value to 0 instead: UPDATE tbl SET i = 0 WHERE i IS NULL; Set all values of i to 1 and all values of j to 2: UPDATE tbl SET i = 1,
...INSERT INTO source VALUES (1, 10), (1, 20); UPDATE target SET v = source.v FROM source WHERE target.id = source.id; To get deterministic results, ensure that each target row matches at most one source row, e.g., by deduplicating the source. In contrast, the s... - https://man.mtool.work/duckdb/2.0/sql/statements/update.html
- Result Verification 8375
- The standard way of verifying results of queries is using the query statement, followed by the letter I times the number of columns that are expected in the result. After the query, four dashes ( ---- ) are expected followed by the result v
...SELECT 'hello' ---- hello world In general, we prefer not to use this field and rely on ORDER BY in the query to generate deterministic query answers. However, existing sqllogictests use this field extensively, hence it is important to know of its existence.... - https://man.mtool.work/duckdb/2.0/dev/sqllogictest/result_verification.html
- Create Synthetic Data 8232
- DuckDB lets you quickly generate synthetic datasets by combining a few building blocks: functions and clauses that generate rows , functions that generate values to fill those rows, and extensions that generate whole benchmark datasets. Thi
...time, current_localtimestamp() AS timestamp; Hashing Hash functions such as hash , md5 and sha256 turn a row number into a deterministic pseudo-random value, which is useful when you want reproducible identifiers: SELECT hash(i) AS id, md5(i::VARCHAR) AS toke... - https://man.mtool.work/duckdb/2.0/guides/snippets/create_synthetic_data.html
- Friendly SQL 8232
- DuckDB offers several advanced SQL features and syntactic sugar to make SQL queries more concise. We refer to these colloquially as “friendly SQL”. Several of these features were first introduced by DuckDB, while some are inspired by other
...g them from the list of attributes in the SELECT clause. ORDER BY ALL : shorthand to order on all columns (e.g., to ensure deterministic results). SELECT * EXCLUDE : the EXCLUDE option allows excluding specific columns from the * expression. SELECT * REPLACE... - https://man.mtool.work/duckdb/2.0/sql/dialect/friendly_sql.html
- Aggregate Functions 8090
- Examples Produce a single row containing the sum of the amount column: SELECT sum(amount) FROM sales; Produce one row per unique region, containing the sum of amount for each group: SELECT region, sum(amount) FROM sales GROUP BY region; Ret
...ve, and for them this clause is parsed and discarded. However, there are some order-sensitive aggregates that can have non-deterministic results without ordering, e.g., first , last , list and string_agg / group_concat / listagg . These can be made determinis... - https://man.mtool.work/duckdb/2.0/sql/functions/aggregates.html
- Appender 7948
- Appenders are the most efficient way of loading data into DuckDB from within the C interface, and are recommended for fast data loading. The appender is much faster than using prepared statements or individual INSERT INTO statements. Append
...or column) to the chunk created from the specified appender. The default value of the column must be a constant value. Non-deterministic expressions like nextval('seq') or random() are not supported. Syntax duckdb_state duckdb_append_default_to_chunk ( duckdb... - https://man.mtool.work/duckdb/2.0/clients/c/appender.html
DuckDB 2.0 Documentation / man.mtool.work