Skip to content

Commit f7bba8a

Browse files
committed
WIP
1 parent e1c6eb9 commit f7bba8a

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

test/sql/test_decimal_features.test

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# name: test/sql/test_decimal_features.test
22
# group: [infera]
33

4-
# Validate DECIMAL feature inputs work (via implicit cast) and return correct results
4+
# Validate DECIMAL feature inputs work and return correct results.
5+
# Note: bare DECIMAL literals (DECIMAL '1.0') have no precision/scale in DuckDB main
6+
# and resolve to PhysicalType::INVALID, which crashes Vector initialization. Use
7+
# explicit precision (::DECIMAL(10,2)) so the type has a valid physical representation.
58

69
statement ok
710
pragma enable_verification
@@ -12,9 +15,9 @@ load 'build/release/extension/infera/infera.duckdb_extension'
1215
statement ok
1316
select infera_load_model('linear_dec', 'test/models/linear.onnx')
1417

15-
# Use DECIMAL features; expected y = 2*1 - 1*2 + 0.5*3 + 0.25 = 1.75
18+
# Use DECIMAL(10,2) features; expected y = 2*1 - 1*2 + 0.5*3 + 0.25 = 1.75
1619
query I
17-
select abs(infera_predict('linear_dec', DECIMAL '1.0', DECIMAL '2.0', DECIMAL '3.0') - 1.75) < 1e-5
20+
select abs(infera_predict('linear_dec', 1.0::DECIMAL(10,2), 2.0::DECIMAL(10,2), 3.0::DECIMAL(10,2)) - 1.75) < 1e-5
1821
----
1922
true
2023

0 commit comments

Comments
 (0)