4 Commits
Author SHA1 Message Date
Samarth Jaiswal f4ff272f37 fix: keep exact DECIMAL and BIGINT UNSIGNED values in COPY FROM csv and json (#10560)
* fix: keep exact DECIMAL and UInt64 values in COPY FROM csv and json

Signed-off-by: Samarth Jaiswal <samarthjaiswal30@gmail.com>

* style: format the reader schema test

Signed-off-by: Samarth Jaiswal <samarthjaiswal30@gmail.com>

* test: add the expected output of the exact numbers case

Signed-off-by: Samarth Jaiswal <samarthjaiswal30@gmail.com>

* fix: round decimals with extra fractional digits in COPY FROM

Signed-off-by: Samarth Jaiswal <samarthjaiswal30@gmail.com>

* fix: parse decimals from text in COPY FROM csv and json

Arrow's decimal decoding is wrong for some numbers in scientific
notation and drops the digits beyond the scale. Read a decimal column
as a string and parse it, so that every digit is used and the value is
rounded as the cast from a float did.

Signed-off-by: Samarth Jaiswal <samarthjaiswal30@gmail.com>

* fix: read unsigned integers from text and reject empty strings in COPY FROM json

Arrow's json reader parses an integer in scientific notation through a
Float64, so 9007199254740993e0 lost its last digit in a BIGINT UNSIGNED
column. Such a column is now read as text and parsed from every digit,
like a DECIMAL column.

An empty json string loaded into a DECIMAL column as NULL. It is an
error again, and only an empty csv field is read as NULL.

Signed-off-by: Samarth Jaiswal <samarthjaiswal30@gmail.com>

---------

Signed-off-by: Samarth Jaiswal <samarthjaiswal30@gmail.com>
2026-11-24 18:18:35 +00:00
Zhenchi 73af1368bd test: more integration test cases for external table (#2429)
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>
2023-09-18 09:21:51 +00:00
3a39215f11 feat: migrate file engine from table to reigon (#2365)
* feat: migrate file engine from table to reigon

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* Update src/file-engine/src/engine.rs

Co-authored-by: Ruihang Xia <waynestxia@gmail.com>

* feat: specify ts index for file engine

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* feat: handle time index for external table

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* fix: some integration testsg

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* feat: add file schema and table schema compatibility

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* feat: compatible file schema to region schema

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* feat: add error msg

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* fix: simplify close

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* fix: implement set_writable

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* fix: tests-integration compilation

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* fix: address comments

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

---------

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>
Co-authored-by: Ruihang Xia <waynestxia@gmail.com>
Co-authored-by: zhongzc <zhongzc@zhongzcs-MacBook-Pro.local>
2023-09-18 08:02:43 +00:00
Weny Xu 7f14d40798 test: add tests for external table (#1460) 2023-04-25 15:14:46 +08:00