Results of 1 - 10 of about 24 for throw (0.002 sec.)
- Casting 13561
- Casting refers to the operation of converting a value in a particular data type to the corresponding value in another data type. Casting can occur either implicitly or explicitly. The syntax described here performs an explicit cast. More in
...Casting Rules Not all casts are possible. For example, it is not possible to convert an INTEGER to a DATE . Casts may also throw errors when the cast could not be successfully performed. For example, trying to cast the string 'hello' to an INTEGER wil...l result in an error being thrown. SELECT CAST('hello' AS INTEGER); Conversion Error: Could not convert string 'hello' to INT32 The exact behavior of the c...rounding rules can be found on the NUMERIC type page . TRY_CAST TRY_CAST can be used when the preferred behavior is not to throw an error, but instead to return a NULL value. TRY_CAST will never throw an error, and will instead return NULL if a cast i... - https://man.mtool.work/duckdb/2.0/sql/expressions/cast.html
- Python Function API 13010
- You can create a DuckDB user-defined function (UDF) from a Python function so it can be used in SQL queries. Similarly to regular functions , they need to have a name, a return type and parameter types. Creating Functions To register a Pyth
...ior for NULL values by setting null_handling = 'special' . exception_handling (optional): By default, when an exception is thrown from the Python function, the query fails with an error that names it. Users can disable this behavior, and instead retur...b.sql("SELECT return_str_or_none('')").fetchall() print(res) [(None,)] Exception Handling By default, when an exception is thrown from the Python function, the query fails with a duckdb.InvalidInputException that names the Python exception. If you wan...turn NULL , you'll need to set this parameter to "return_null" . import duckdb from duckdb.sqltypes import BIGINT def will_throw(): raise ValueError("ERROR") duckdb.create_function("throws", will_throw, [], BIGINT) try: res = duckdb.sql("SELECT throws... - https://man.mtool.work/duckdb/2.0/clients/python/function.html
- C++ API 9641
- Installation To use the DuckDB C++ API, download the libduckdb archive for your platform. The latest stable version of the DuckDB C++ API is 2.0.0. Warning DuckDB's C++ API is internal. It is not guaranteed to be stable and can change witho
...ig , you can set various database parameters, for example the read/write mode or memory limits. The DuckDB constructor may throw exceptions, for example if the database file is not usable. With the DuckDB instance, you can create one or many Connectio...f (result->HasError()) { cerr << result->GetError() << endl; } else { cout << result->ToString() << endl; } Query will not throw exceptions under normal circumstances. Instead, invalid queries or other issues cause the HasError() method of the returne... - https://man.mtool.work/duckdb/2.0/clients/cpp.html
- Using fsspec Filesystems 9357
- DuckDB support for fsspec filesystems allows querying data in filesystems that DuckDB's httpfs extension does not support. fsspec has a large number of inbuilt filesystems , and there are also many external implementations . This capability
...n, you can register whichever filesystem you'd like to query: import duckdb from fsspec import filesystem # this line will throw an exception if the appropriate filesystem interface is not installed duckdb.register_filesystem(filesystem('gcs')) duckdb... - https://man.mtool.work/duckdb/2.0/guides/python/filesystems.html
- TRY Expression 9074
- The TRY expression ensures that errors caused by the input rows in the child (scalar) expression result in NULL for those rows, instead of causing the query to throw an error. The TRY expression was inspired by the TRY_CAST expression . Exa
... - https://man.mtool.work/duckdb/2.0/sql/expressions/try.html
- Reading Faulty CSV Files 8523
- CSV files can come in all shapes and forms, with some presenting many errors that make the process of cleanly reading them inherently difficult. To help users read these files, DuckDB supports detailed error messages, the ability to skip fa
...erforming a CSV read, if any structural errors are encountered, the scanner will immediately stop the scanning process and throw the error to the user. These errors are designed to provide as much information as possible to allow users to evaluate the...loading the file would fail, as the string three cannot be converted to an INTEGER . For example, the following query will throw a casting error. FROM read_csv('faulty.csv', columns = {'name': 'VARCHAR', 'age': 'INTEGER'}); However, with ignore_errors...at the CSV Parser is affected by the projection pushdown optimization. Hence, if we were to select only the name column, both rows would be considered valid, as the casting error on the age would never occur. For example: SELECT name FROM read_csv('fa... - https://man.mtool.work/duckdb/2.0/data/csv/reading_faulty_csv_files.html
- CREATE INDEX Statement 8523
- CREATE INDEX The CREATE INDEX statement constructs an index on the specified column(s) of the specified table. Examples Create a unique index films_id_idx on the column id of table films : CREATE UNIQUE INDEX films_id_idx ON films (id); Cre
...database system. Examples Remove the index title_idx : DROP INDEX title_idx; Parameters Name Description IF EXISTS Do not throw an error if the index does not exist. name The name of an index to remove. Syntax Limitations The CREATE INDEX clause does... - https://man.mtool.work/duckdb/2.0/sql/statements/create_index.html
- DROP Statement 8523
- The DROP statement removes a catalog entry added previously with the CREATE command. Examples Delete the table with the name tbl : DROP TABLE tbl; Drop the view with the name view1 ; do not throw an error if the view does not exist: DROP VI
... - https://man.mtool.work/duckdb/2.0/sql/statements/drop.html
- Overview of DuckDB Internals 8240
- Tip For a detailed explanation of DuckDB internals, see the Design and Implementation of DuckDB Internals ("DiDi") library entry. On this page is a brief description of the internals of the DuckDB engine. Parser The parser converts a query
...ueryNode TableRef ParsedExpression The parser is not aware of the catalog or any other aspect of the database. It will not throw errors if tables do not exist, and will not resolve any types of columns yet. It only transforms a query string into a set... - https://man.mtool.work/duckdb/2.0/internals/overview.html
- Write User Defined Functions 7956
- 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
...uates it for every row. Error Handling Type and value errors raised while a callback reads its inputs or writes its result throw DuckDBFunctions.FunctionException , an unchecked RuntimeException . An out-of-range row or column index throws IndexOutOfB...oundsException . Registration-time problems, such as an undefined return type or an invalid type declaration, throw SQLException . Vectorized Scalar Functions The examples above process one value per call. To process a whole batch of rows...ew DuckDBTableFunction<Integer, AtomicBoolean, Object>() { @Override public Integer bind(DuckDBTableFunctionBindInfo info) throws Exception { info.addResultColumn("col1", Integer.TYPE) .addResultColumn("col2", String.class); DuckDBValue param = info.g... - https://man.mtool.work/duckdb/2.0/clients/java/functions.html
DuckDB 2.0 Documentation / man.mtool.work