Changeset: bce86e279b06 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bce86e279b06
Modified Files:
common/utils/copybinary.h
monetdb5/optimizer/opt_bincopyfrom.c
monetdb5/optimizer/opt_parappend.c
sql/backends/monet5/sql_bincopyfrom.c
Branch: copybinary
Log Message:
Comments
diffs (101 lines):
diff --git a/common/utils/copybinary.h b/common/utils/copybinary.h
--- a/common/utils/copybinary.h
+++ b/common/utils/copybinary.h
@@ -99,7 +99,7 @@ uhge copy_binary_byteswap128(uhge value)
#endif
// These macros are used to convert a value in-place.
-// This makes it possible to also convert timestamps.
+// This makes it possible to also convert timestamp structs.
static inline void
copy_binary_convert16(void *p)
diff --git a/monetdb5/optimizer/opt_bincopyfrom.c
b/monetdb5/optimizer/opt_bincopyfrom.c
--- a/monetdb5/optimizer/opt_bincopyfrom.c
+++ b/monetdb5/optimizer/opt_bincopyfrom.c
@@ -170,14 +170,14 @@ extract_column(MalBlkPtr mb, InstrPtr ol
if (!strNil(path)) {
if (proto_path != NULL && strcmp(proto_path, path) == 0) {
- // we can reuse the prototype var
+ // Same data as in the prototype column so reuse that
var
InstrPtr p = newInstructionArgs(mb, NULL, NULL, 2);
p = pushArgument(mb, p, proto_bat_var);
setReturnArgument(p, old->argv[idx]);
pushInstruction(mb, p);
return count_var;
} else {
- // we emit a new importColumn call
+ // Emit a new importColumn call
InstrPtr p = newFcnCall(mb, sqlRef, importColumnRef);
setReturnArgument(p, old->argv[idx]);
int new_count_var = newTmpVariable(mb, TYPE_oid);
diff --git a/monetdb5/optimizer/opt_parappend.c
b/monetdb5/optimizer/opt_parappend.c
--- a/monetdb5/optimizer/opt_parappend.c
+++ b/monetdb5/optimizer/opt_parappend.c
@@ -39,8 +39,10 @@ OPTparappendImplementation(Client cntxt,
(void)stk;
(void)pci;
- if (WLCused())
+ if (WLCused()) {
+ // can of worms, bail out.
return MAL_SUCCEED;
+ }
int found_at = -1;
for (int i = 0; i < mb->stop; i++) {
@@ -55,12 +57,6 @@ OPTparappendImplementation(Client cntxt,
if (found_at == -1)
return MAL_SUCCEED;
-
- // stream *s1;
- // s1 = open_wastream("a");
- // printFunction(s1, mb, stk, LIST_MAL_ALL);
- // mnstr_close(s1);
-
old_mb_stmt = mb->stmt;
size_t old_ssize = mb->ssize;
size_t old_stop = mb->stop;
@@ -86,11 +82,6 @@ OPTparappendImplementation(Client cntxt,
}
assert(state.prep_stmt == NULL);
- // stream *s2;
- // s2 = open_wastream("b");
- // printFunction(s2, mb, stk, LIST_MAL_ALL);
- // mnstr_close(s2);
-
end:
if (old_mb_stmt) {
for (size_t i = old_stop; i < old_ssize; i++) {
@@ -232,8 +223,8 @@ setup_append_prep(parstate *state, Clien
if (strcmp(existing_cname, incoming_cname) == 0) {
// We're not prepared for the complications
that may arise
// when there are multiple appends to the same
column.
- // In particular we would have to track down
where the prep_stmtious
- // cookie is used and make sure we execute the
next append
+ // In particular we would have to track down
where the previous
+ // cookie was used and make sure we execute the
next append
// after that use.
// This is unlikely to occur in practice, so
instead we just start over.
prep_stmt = NULL;
diff --git a/sql/backends/monet5/sql_bincopyfrom.c
b/sql/backends/monet5/sql_bincopyfrom.c
--- a/sql/backends/monet5/sql_bincopyfrom.c
+++ b/sql/backends/monet5/sql_bincopyfrom.c
@@ -419,12 +419,12 @@ end:
// If an entry has has 'convert_in_place' this means the external and internal
// forms have the same size and are probably identical. In this case, the data
// is loaded directly into the bat heap and then the 'convert_in_place'
function
-// is called once for the whole to perform any necessary tweaking of the data.
+// is called once for the whole block to perform any necessary tweaking of the
data.
// We use this for example for the integer types, on little-endian platforms no
// tweaking is necessary and on big-endian platforms we byteswap the data.
//
// Finally, if an entry has 'convert_fixed_width' it means the internal and
-// external forms are both fixed width but different. The data is loaded into
+// external forms are both fixed width but different in size. The data is
loaded into
// intermediate buffers first and the conversion function copies the data from
// an array of incoming data in the buffer to an array of internal
// representations in the BAT.
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list