Skip to content

sql: builtin hlc_to_timestamp doesn't handle decimals with exponents other than -10 #129152

Closed
@michae2

Description

Builtin function hlc_to_timestamp doesn't seem to work with decimals without ten fractional digits.

demo@127.0.0.1:26257/demoapp/defaultdb> SELECT hlc_to_timestamp(1723841815000000000);
        hlc_to_timestamp
---------------------------------
  1970-01-01 00:00:00.172384+00
(1 row)

Time: 3ms total (execution 2ms / network 2ms)

demo@127.0.0.1:26257/demoapp/defaultdb> SELECT hlc_to_timestamp(1723841815000000000.0000000000);
     hlc_to_timestamp
--------------------------
  2024-08-16 20:56:55+00
(1 row)

Time: 1ms total (execution 1ms / network 0ms)

Jira issue: CRDB-41403

Metadata

Assignees

Labels

A-sql-builtinsSQL built-in functions and semantics thereof.C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-sql-queriesSQL Queries Teambranch-masterFailures and bugs on the master branch.branch-release-21.2Used to mark GA and release blockers, technical advisories, and bugs for 21.2branch-release-22.1Used to mark GA and release blockers, technical advisories, and bugs for 22.1branch-release-22.2Used to mark GA and release blockers, technical advisories, and bugs for 22.2branch-release-23.1Used to mark GA and release blockers, technical advisories, and bugs for 23.1branch-release-23.2Used to mark GA and release blockers, technical advisories, and bugs for 23.2branch-release-24.1Used to mark GA and release blockers, technical advisories, and bugs for 24.1branch-release-24.2Used to mark GA and release blockers, technical advisories, and bugs for 24.2

Type

No type

Projects

  • Status

    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions