commit | 48126d3d3834e28e84ae3fc4c65b86831b5d6aef | [log] [tgz] |
---|---|---|
author | Stamatis Zampetakis <zabetak@gmail.com> | Thu Jul 29 14:16:20 2021 +0300 |
committer | Stamatis Zampetakis <zabetak@gmail.com> | Tue Aug 10 12:47:35 2021 +0300 |
tree | 98debacef707f7470319e413b174759cdd0da928 | |
parent | 8346167252bcb90cd64ced9e3a5c893de28f88ed [diff] |
[CALCITE-4706] JDBC adapter generates casts exceeding Redshift's data types bounds 1. Add Redshift type system ensuring precision/scale bounds are satisfied when casting. 2. Consider max precision for DECIMAL and CHAR data types in SqlDialect#getCastSpec. 3. Consider max scale for DECIMAL data types in SqlDialect#getCastSpec. 4. Extend RelToSqlConverterTest.Sql with custom type system to allow writting tests with non-default type system (e.g., simulate systems with large numeric precision). 5. Set typesystem explicitly in SqlDialectFactoryImpl since it cannot be derived from the metadata and the default is not appropriate. 6. Add unit tests casting to DECIMAL, CHAR, VARCHAR, with precision/scale exceeding Redshift's bounds. Close apache/calcite#2470
Apache Calcite is a dynamic data management framework.
It contains many of the pieces that comprise a typical database management system but omits the storage primitives. It provides an industry standard SQL parser and validator, a customisable optimizer with pluggable rules and cost functions, logical and physical algebraic operators, various transformation algorithms from SQL to algebra (and the opposite), and many adapters for executing SQL queries over Cassandra, Druid, Elasticsearch, MongoDB, Kafka, and others, with minimal configuration.
For more details, see the home page.