Changeset: b7e0765180d4 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b7e0765180d4
Modified Files:
        monetdb5/mal/mal_parser.c
Branch: default
Log Message:

Reapply lost patch.
Changeset 54896 improved the handling of flt/dbl.
It seems to be accidentally lost in a r 55041


diffs (27 lines):

diff --git a/monetdb5/mal/mal_parser.c b/monetdb5/mal/mal_parser.c
--- a/monetdb5/mal/mal_parser.c
+++ b/monetdb5/mal/mal_parser.c
@@ -446,11 +446,6 @@ cstToken(Client cntxt, ValPtr cst)
                                GDKfree(pval);
                        } else
                                cst->val.dval = 0;
-
-                       if (cst->val.dval > FLT_MIN && cst->val.dval <= 
FLT_MAX) {
-                               cst->vtype = TYPE_flt;
-                               cst->val.fval = (flt) cst->val.dval;
-                       }
                }
                if (*s == '@') {
                        int len = (int) sizeof(lng);
@@ -921,6 +916,11 @@ term(Client cntxt, MalBlkPtr curBlk, Ins
                cstidx = fndConstant(curBlk, &cst, MAL_VAR_WINDOW);
                if (cstidx >= 0) {
                        advance(cntxt, i);
+                       if (currChar(cntxt) != ':' && cst.vtype == TYPE_dbl && 
cst.val.dval > FLT_MIN && cst.val.dval <= FLT_MAX) {
+                               cst.vtype = TYPE_flt;
+                               cst.val.fval = (flt) cst.val.dval;
+                       }
+
                        if (currChar(cntxt) == ':') {
                                tpe = typeElm(cntxt, getVarType(curBlk, 
cstidx));
                                if (tpe < 0)
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to