phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (PHOENIX-1814) Handle e notation for defining float/double
Date Tue, 14 Apr 2015 21:03:58 GMT


ASF GitHub Bot commented on PHOENIX-1814:

Github user JamesRTaylor commented on a diff in the pull request:
    --- Diff: phoenix-core/src/main/antlr3/PhoenixSQL.g ---
    @@ -967,9 +967,14 @@ NUMBER
         :   POSINTEGER
    -// Exponential format is not supported.
    --- End diff --
    Instead of creating a DECIMAL (which maps to PDecimal that uses a BigDecimal), create
a rule for DOUBLE which matches the e notation and returns a PDouble instead (which uses a
Java double). You could potentially conditionally return a PFloat versus a PDouble depending
on the precision used, but not sure we really need to do that. This is the way I've seen other
databases make it possible to define a literal that's a double instead of a DECIMAL or NUMERIC.

> Handle e notation for defining float/double
> -------------------------------------------
>                 Key: PHOENIX-1814
>                 URL:
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: James Taylor
>            Assignee: Brian Esserlieu
>              Labels: Newbie
> We should allow a numeric literal to be defined with e notation for a float/double like
> {code}
> +1.5e-7
> 12E-5
> -.12345e+6789
> {code}

This message was sent by Atlassian JIRA

View raw message