ClickHouse / ClickHouse/ClickHouse

Can't parse number in exponential notation during cast to integer column.

Open
#56,937 1 comment 1 reaction 0 assignees View on GitHub
comp-regular-function feature
Dominant language
C++
Stars
49.9k
Forks
9k
Avg merge
21h 32m
Merged PRs (30d)
515

Description

```
SELECT CAST('1e2', 'Float32')

┌─CAST('1e2', 'Float32')─┐
│ 100 │
└────────────────────────┘

SELECT CAST('1e2', 'UInt64')

Received exception from server (version 23.10.2):
Code: 6. DB::Exception: Received from localhost:9000. DB::Exception: Cannot parse string '1e2' as UInt64: syntax error at position 1 (parsed just '1'). Note: there are toUInt64OrZero and toUInt64OrNull functions, which returns zero/NULL instead of throwing exception.: While processing CAST('1e2', 'UInt64'). (CANNOT_PARSE_TEXT)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.