0

We're using MonetDB to implemnent an idea. For our purposes we need to implement the SUM Aggregation for Strings. My first step in trying to realize it was to just add a sum pattern in the mal files that define these patterns for the other datatypes. Then I tried to pinpoint the exact point where the list of possible implementations is compared with the input datatype but I'm making slow progress.

  1. Where/how are mal files evaluated?
  2. How to go about adding own sum command/pattern so that string data reaches the sum function without MonetDB trying to convert it to bte?
Moorts
  • 15
  • 1
  • 4
  • This SUM aggregation for strings makes curious. What is the sum of strings? Their concatenation? The sum of their conversion to some numeric type? – Joeri van Ruth Feb 26 '21 at 14:45
  • @JoerivanRuth We work with encrypted data that is always represented as a string data type, we actually added our own types but they are basically strings, after decryption the strings are converted to numbers, so its just the classic sum – Moorts Mar 02 '21 at 10:03

1 Answers1

0

As of Oct2020 release, MAL files are integrated into the C source code, hence, MAL files are no longer used. The MAL files are in the source code repository for documentation purpose only and once that information has been moved to proper places, the MAL files will be gradually removed.

If you want to implement your own function, please have a look at the examples in this repository: https://dev.monetdb.org/hg/MonetDB-extend You can clone it using hg clone https://dev.monetdb.org/hg/MonetDB-extend

I'm not sure how up-to-date this repository now is => depends on which MonetDB version you're using. If you have problems with those examples, please open new tickets in https://github.com/monetdb/monetdb/issues

Jennie
  • 345
  • 1
  • 8
  • Sadly the project I'm working on is pretty old and has not been updated with new releases, so its still using the mal files (i think the latest official commit in our fork is from 2018) and updating is not an option for now since it would most definetly break our code. Is there any resource explaining how things worked before MAL files got deprecated? – Moorts Feb 24 '21 at 10:59
  • Which MonetDB version are you using? Older versions of MonetDB-extend take into account that MAL files are used. I guess you just need to find a version of MonetDB-extend that works for you – Jennie Feb 24 '21 at 11:24
  • There is, not sure why I didnt think of that, thank you very much, it works now – Moorts Feb 24 '21 at 13:23