GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — float value cannot be used to insert data to NUMERIC field. · Issue #315 · googleapis/python-spanner

This repository was archived by the owner on Jun 8, 2026. It is now read-only.
This repository was archived by the owner on Jun 8, 2026. It is now read-only.

float value cannot be used to insert data to NUMERIC field. #315

Copy link
Copy link
Closed
#317
#316
Closed
float value cannot be used to insert data to NUMERIC field.#315
#317
#316
Copy link
Assignees
vi3k6i5
Labels
api: spannerIssues related to the googleapis/python-spanner API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Description

@vi3k6i5
vi3k6i5
opened on Apr 22, 2021
Issue body actions

Float data type is mapped to float: spanner.param_types.FLOAT64 Link.

We need to add support to map decimal.Decimal type in python to Numeric type in spanner.

Environment details

  • OS type and version: MacOS Big Sur 11.2.3
  • Python version: 3.8.8
  • pip version: pip 21.0.1
  • google-cloud-spanner version: 3.2.0

Steps to reproduce

  1. Create a table with Numeric field.
  2. Insert data in field with type float

Code example

sql='INSERT INTO t (x) VALUES (%s)', 
params=[3.194387483193242e+19]

Thanks!

Activity

  1. blunderbuss-gcf
    assigned
    larkee
    on Apr 22, 2021
  2. product-auto-label
    added
    api: spannerIssues related to the googleapis/python-spanner API.
    on Apr 22, 2021
  3. vi3k6i5
    assigned
    vi3k6i5
    and unassigned
    larkee
    on Apr 22, 2021
  4. larkee
    closed this as completedin #316on Apr 23, 2021
  5. vi3k6i5 commented on Apr 24, 2021

    @vi3k6i5
    vi3k6i5
    on Apr 24, 2021
    ContributorAuthor
    More actions

    Decimal field is currently converted to string, need to remove that conversion.

  6. vi3k6i5
    reopened this on Apr 24, 2021
  7. yoshi-automation
    added
    triage meI really want to be triaged.
    on Apr 25, 2021
  8. larkee
    added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    and removed
    triage meI really want to be triaged.
    on Apr 26, 2021
  9. larkee
    closed this as completedin #317on Apr 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @vi3k6i5
    vi3k6i5

Labels

api: spannerIssues related to the googleapis/python-spanner API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.