1 | /* |
2 | * This Source Code Form is subject to the terms of the Mozilla Public |
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. |
5 | * |
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2019 MonetDB B.V. |
7 | */ |
8 | |
9 | /* |
10 | * Pedro Ferreira |
11 | * This file contains declarations for SQL window analytical functions. |
12 | */ |
13 | |
14 | #ifndef _GDK_ANALYTIC_H_ |
15 | #define _GDK_ANALYTIC_H_ |
16 | |
17 | #include "gdk.h" |
18 | |
19 | gdk_export gdk_return GDKanalyticaldiff(BAT *r, BAT *b, BAT *p, int tpe); |
20 | |
21 | gdk_export gdk_return GDKanalyticalntile(BAT *r, BAT *b, BAT *p, int tpe, const void *restrict ntile); |
22 | gdk_export gdk_return GDKanalyticallag(BAT *r, BAT *b, BAT *p, BUN lag, const void *restrict default_value, int tpe); |
23 | gdk_export gdk_return GDKanalyticallead(BAT *r, BAT *b, BAT *p, BUN lead, const void *restrict default_value, int tpe); |
24 | |
25 | gdk_export gdk_return GDKanalyticalwindowbounds(BAT *r, BAT *b, BAT *p, BAT *l, |
26 | const void *restrict bound, |
27 | int tp1, int tp2, int unit, |
28 | bool preceding, lng first_half); |
29 | |
30 | gdk_export gdk_return GDKanalyticalfirst(BAT *r, BAT *b, BAT *s, BAT *e, int tpe); |
31 | gdk_export gdk_return GDKanalyticallast(BAT *r, BAT *b, BAT *s, BAT *e, int tpe); |
32 | gdk_export gdk_return GDKanalyticalnthvalue(BAT *r, BAT *b, BAT *s, BAT *e, BAT *l, const void *restrict bound, int tp1, int tp2); |
33 | gdk_export gdk_return GDKanalyticalmin(BAT *r, BAT *b, BAT *s, BAT *e, int tpe); |
34 | gdk_export gdk_return GDKanalyticalmax(BAT *r, BAT *b, BAT *s, BAT *e, int tpe); |
35 | gdk_export gdk_return GDKanalyticalcount(BAT *r, BAT *b, BAT *s, BAT *e, const bit *restrict ignore_nils, int tpe); |
36 | gdk_export gdk_return GDKanalyticalsum(BAT *r, BAT *b, BAT *s, BAT *e, int tp1, int tp2); |
37 | gdk_export gdk_return GDKanalyticalprod(BAT *r, BAT *b, BAT *s, BAT *e, int tp1, int tp2); |
38 | gdk_export gdk_return GDKanalyticalavg(BAT *r, BAT *b, BAT *s, BAT *e, int tpe); |
39 | |
40 | #endif //_GDK_ANALYTIC_H_ |
41 | |