Skip to content

README has no morton_decode example (only morton_encode + hilbert_{encode,decode}) #9

@rustyconover

Description

@rustyconover

The README's Type Coverage and Examples sections show working SQL for:

  • hilbert_encode
  • hilbert_decode
  • morton_encode

…but morton_decode is described in the parameter list without a corresponding usage example. That's the only one of the four that doesn't have a runnable round-trip snippet in the docs.

For symmetry — and so users picking Morton over Hilbert have a clear cookbook entry — would be good to add a snippet alongside the existing Hilbert decode, e.g.:

SELECT morton_decode(
  morton_encode([10, 20]::INTEGER[2]),
  /* num_elements    */ 2,
  /* return_float    */ false,
  /* return_unsigned */ true
) AS roundtrip;
-- [10, 20]

Surfaced this while running an automated coverage report over our docs site — morton_decode was the only function in the introspected surface that had no example in either the upstream README or anywhere downstream. Trivial fix, just flagging.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions