Results of 1 - 10 of about 41 for apply (0.003 sec.)
- Write User Defined Functions 14578
- 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
...thread and returns thread-local state. Override it when a parallel scan needs per-thread state; the default returns null . apply writes rows into the output vectors and returns the number of rows written, with access to the bind, global-init, and loca...Boolean init(DuckDBTableFunctionInitInfo info) throws Exception { return new AtomicBoolean(false); } @Override public long apply(DuckDBTableFunctionCallInfo info, DuckDBDataChunkWriter output) throws Exception { Integer bindData = info.getBindData();...DB's C API table functions as closely as possible. Producing Rows in Chunks The example above writes every row in a single apply call, but a table function is not expected to. DuckDB calls apply repeatedly, each time passing a fresh output chunk that... - https://man.mtool.work/duckdb/2.0/clients/java/functions.html
- Lambda Functions 13288
- 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
...se 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(list, lambda(x)) Alias for list_transform . array_filter(list, lam..._reduce . array_transform(list, lambda(x)) Alias for list_transform . filter(list, lambda(x)) Alias for list_filter . list_apply(list, lambda(x)) Alias for list_transform . list_filter(list, lambda(x)) Constructs a list from those elements of the inpu...al initial_value argument. See list_reduce examples . list_transform(list, lambda(x)) Returns a list that is the result of applying the lambda function to each element of the input list . The return type is defined by the return type of the lambda fun... - https://man.mtool.work/duckdb/2.0/sql/functions/lambda.html
- Tuning Workloads 9387
- DuckDB aims to perform well out of the box, so most workloads do not require any tuning. When tuning is worthwhile, there is no single configuration or magic number that is optimal for every workload: the right settings depend on what you a
...a, hardware, and environment. Rather than copying a fixed value, identify which of the concerns below match your workload, apply the corresponding change, and measure its effect. If your priority is… Consider Covered in Loading or exporting data large...p/somefile.db' AS db (ROW_GROUP_SIZE 16384); The performance considerations when choosing ROW_GROUP_SIZE for Parquet files apply verbatim to DuckDB's own database format. Too Many Threads Note that in certain cases DuckDB may launch too many threads (...include a filter pushdown for a filter condition that is later applied performs unnecessary IO. Try rewriting the query to apply a pushdown. Bad join orders where the cardinality of an operator explodes to billions of tuples should be avoided at all c... - https://man.mtool.work/duckdb/2.0/guides/performance/how_to_tune_workloads.html
- List Functions 9247
- Function Description list[index] Extracts a single list element using a (1-based) index . list[begin[:end][:step]] Extracts a sublist using slice conventions . Negative values are accepted. list1 && list2 Alias for list_has_any . list1 <->
...oncat(arg1, arg2, ...) and list_concat(list1, list2, ...) . aggregate(list, function_name, ...) Alias for list_aggregate . apply(list, lambda(x)) Alias for list_transform . array_aggr(list, function_name, ...) Alias for list_aggregate . array_aggregat...e(list, function_name, ...) Alias for list_aggregate . array_append(list, element) Alias for list_append . array_apply(list, lambda(x)) Alias for list_transform . array_cat(list_1, ..., list_n) Alias for list_concat . array_concat(list_1, .....y_value(list) Applies aggregate function any_value to the list . list_append(list, element) Appends element to list . list_apply(list, lambda(x)) Alias for list_transform . list_approx_count_distinct(list) Applies aggregate function approx_count_disti... - https://man.mtool.work/duckdb/2.0/sql/functions/list.html
- Versioning of Extensions 8812
- Extension Versioning Most software has some sort of version number. Version numbers serve a few important goals: Tie a binary to a specific state of the source code Allow determining the expected feature set Allow determining the state of t
...ng with v0 have a special meaning: they indicate that the more strict semantics of regular ( >v1.0.0 ) versions do not yet apply. It basically means that an extension is working towards becoming a stable extension, but is not quite there yet. For exam...pre-release format? The extension is compiled from the source code corresponding to the tag. Semantic Versioning semantics apply. See the Semantic Versioning specification for details. The extension follows a release cycle where new features are teste...sion number in the stable format? Essentially the same as pre-release extensions, but now the more strict SemVer semantics apply: the API of the extension should now be stable and will only change in backwards incompatible ways when the major version... - https://man.mtool.work/duckdb/2.0/extensions/versioning_of_extensions.html
- Relational API 8517
- The Relational API builds a query one step at a time from Python. A relation, a DuckDBPyRelation , is a piece of SQL text: the methods of the Transformation and Functions sections return a new relation whose text extends the one they were c
...run nothing. Name Description aggregate Compute the aggregate aggr_expr by the optional groups group_expr on the relation. apply Compute the function of a single column or a list of columns by the optional groups on the relation. cross Create cross/ca...egory │ max_price │ │ varchar │ int32 │ ├──────────┼───────────┤ │ clothing │ 65 │ │ tools │ 89 │ └──────────┴───────────┘ apply apply(self, function_name: str, function_aggr: str, group_expr: str = '', function_parameter: str = '', projected_columns:...column or a list of columns by the optional groups on the relation. Parameters function_name : str Name of the function to apply over the relation. * function_aggr : str The list of columns to apply the function over. * group_expr : str, default: '' O... - https://man.mtool.work/duckdb/2.0/clients/python/relational_api.html
- Securing DuckDB 8517
- DuckDB is a powerful analytical database engine. It can read and write files, access the network, load extensions, and use system resources. Like any powerful tool, these capabilities require appropriate configuration when working with sens
...rpreter (such as bash or Python). Just as you wouldn't run an untrusted shell script or Python program without sandboxing, apply the same caution to SQL in DuckDB. If your application must execute SQL from untrusted sources, use additional safeguards...ed container (e.g., Docker with restricted capabilities) Use a virtual machine or separate process with minimal privileges Apply operating system-level sandboxing Use network isolation to prevent data exfiltration Implement strict query timeouts at th...e same caution as SQL. Recommendations: Validate and sanitize all user-provided inputs before passing them to DuckDB APIs. Apply the same sandboxing principles as for untrusted SQL when accepting input from untrusted sources. Properly read the documen... - https://man.mtool.work/duckdb/2.0/operations_manual/securing_duckdb/overview.htm...
- WHERE Clause 8517
- The WHERE clause specifies any filters to apply to the data. This allows you to select only a subset of the data in which you are interested. Logically the WHERE clause is applied immediately after the FROM clause. Examples Select all rows
... - https://man.mtool.work/duckdb/2.0/sql/query_syntax/where.html
- Text Types 7942
- In DuckDB, strings can be stored in the VARCHAR field. The field allows storage of Unicode characters. Internally, the data is encoded as UTF-8. Name Aliases Description VARCHAR CHAR , BPCHAR , STRING , TEXT Variable-length character string
...ying a Compression Type You can specify a compression type for a string with the USING COMPRESSION clause. For example, to apply zstd compression, run: CREATE TABLE tbl (s VARCHAR USING COMPRESSION zstd); Text Type Values Values of the text type are c...eferencing columns whose declared or implied type is the text data type string literals casting expressions to a text type applying a string operator , or invoking a function that returns a text type value Strings with Special Characters To use specia... - https://man.mtool.work/duckdb/2.0/sql/data_types/text.html
- SET and RESET Statements 7942
- The SET statement modifies the provided DuckDB configuration option at the specified scope. Examples Update the memory_limit configuration value: SET memory_limit = '10GB'; Configure the system to use 1 thread: SET threads = 1; Or use the T
...n not specified, the default scope for the configuration option is used. For most options this is GLOBAL . GLOBAL settings apply to the current DuckDB instance. They are not written to the database file or persisted across DuckDB instances. If all con... - https://man.mtool.work/duckdb/2.0/sql/statements/set.html
DuckDB 2.0 Documentation / man.mtool.work