Changeset: 2cc06379d80e for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/2cc06379d80e
Modified Files:
clients/Tests/exports.stable.out
Branch: default
Log Message:
merged with Aug2024
diffs (101 lines):
diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -1065,6 +1065,7 @@ const char *likeRef;
const char *likejoinRef;
const char *likeselectRef;
const char *likeuselectRef;
+const char *lngRef;
str loadLibrary(const char *modulename, int flag);
char *locate_file(const char *basename, const char *ext, bit recurse);
const char *lockRef;
diff --git a/monetdb5/optimizer/opt_prelude.c b/monetdb5/optimizer/opt_prelude.c
--- a/monetdb5/optimizer/opt_prelude.c
+++ b/monetdb5/optimizer/opt_prelude.c
@@ -149,6 +149,7 @@ const char *leftjoinRef;
const char *likejoinRef;
const char *likeRef;
const char *likeselectRef;
+const char *lngRef;
const char *lockRef;
const char *lookupRef;
const char *malRef;
@@ -409,6 +410,7 @@ optimizerInit(void)
likejoinRef = putName("likejoin");
likeRef = putName("like");
likeselectRef = putName("likeselect");
+ lngRef = putName("lng");
lockRef = putName("lock");
lookupRef = putName("lookup");
malRef = putName("mal");
diff --git a/monetdb5/optimizer/opt_prelude.h b/monetdb5/optimizer/opt_prelude.h
--- a/monetdb5/optimizer/opt_prelude.h
+++ b/monetdb5/optimizer/opt_prelude.h
@@ -147,6 +147,7 @@ mal_export const char *likejoinRef;
mal_export const char *likeRef;
mal_export const char *likeselectRef;
mal_export const char *likeuselectRef;
+mal_export const char *lngRef;
mal_export const char *lockRef;
mal_export const char *lookupRef;
mal_export const char *malRef;
diff --git a/monetdb5/optimizer/opt_remap.c b/monetdb5/optimizer/opt_remap.c
--- a/monetdb5/optimizer/opt_remap.c
+++ b/monetdb5/optimizer/opt_remap.c
@@ -21,6 +21,21 @@
#include "opt_inline.h"
#include "opt_multiplex.h"
+static InstrPtr
+pushNilAt(MalBlkPtr mb, InstrPtr p, int pos)
+{
+ int i;
+
+ p = pushNilBat(mb, p); /* push at end */
+ if (mb->errors == NULL) {
+ int arg = getArg(p, p->argc - 1);
+ for (i = p->argc - 1; i > pos; i--)
+ getArg(p, i) = getArg(p, i - 1);
+ getArg(p, pos) = arg;
+ }
+ return p;
+}
+
static int
OPTremapDirect(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci, int
idx,
Module scope)
@@ -261,11 +276,16 @@ OPTmultiplexInline(Client cntxt, MalBlkP
q->typeresolved = false;
if (q->retc == 1 &&
((getModuleId(q) == batcalcRef
- && (getFunctionId(q) == mulRef
- || getFunctionId(q)
== divRef
- || getFunctionId(q)
== plusRef
- || getFunctionId(q)
== minusRef
- || getFunctionId(q)
== modRef))
+ && ( getFunctionId(q) ==
mulRef
+ || getFunctionId(q)
== divRef
+ || getFunctionId(q)
== plusRef
+ || getFunctionId(q)
== minusRef
+ || getFunctionId(q)
== modRef
+ || (q->argc > 3 && (
+
getFunctionId(q) == intRef
+ ||
getFunctionId(q) == lngRef
+ ||
getFunctionId(q) == hgeRef))
+ ))
|| getModuleId(q) ==
batmtimeRef
|| getModuleId(q) ==
batstrRef)) {
if (q->argc == 3 &&
@@ -292,6 +312,12 @@ OPTmultiplexInline(Client cntxt, MalBlkP
if
(isaBatType(getArgType(mq, q, 2)))
q =
pushNilBat(mq, q);
q = pushArgument(mq, q,
a);
+ } else if (q->argc == 5 &&
getModuleId(q) == batcalcRef) { /* decimal casts */
+ int pos = 3;
+ if
(isaBatType(getArgType(mq, q, 1)))
+ q =
pushNilAt(mq, q, pos++);
+ if
(isaBatType(getArgType(mq, q, 2)))
+ q =
pushNilAt(mq, q, pos);
}
}
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]