MonetDB: default - removed verbose output again, as it requires ...
Changeset: f23b078d272c for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/f23b078d272c Modified Files: sql/server/sql_parser.y Branch: default Log Message: removed verbose output again, as it requires bison 3.6 and up diffs (13 lines): diff --git a/sql/server/sql_parser.y b/sql/server/sql_parser.y --- a/sql/server/sql_parser.y +++ b/sql/server/sql_parser.y @@ -173,7 +173,9 @@ uescape_xform(char *restrict s, const ch %parse-param { mvc *m } %lex-param { void *m } +/* only possible from bison 3.6 and up %define parse.error verbose +*/ /* reentrant parser */ %define api.pure ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - approved output
Changeset: 1c8f28664966 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/1c8f28664966 Modified Files: sql/test/BugTracker-2022/Tests/incomplete-sql-script.Bug-7298.SQL.py Branch: default Log Message: approved output diffs (47 lines): diff --git a/sql/test/BugTracker-2022/Tests/incomplete-sql-script.Bug-7298.SQL.py b/sql/test/BugTracker-2022/Tests/incomplete-sql-script.Bug-7298.SQL.py --- a/sql/test/BugTracker-2022/Tests/incomplete-sql-script.Bug-7298.SQL.py +++ b/sql/test/BugTracker-2022/Tests/incomplete-sql-script.Bug-7298.SQL.py @@ -1,6 +1,7 @@ from MonetDBtesting.sqltest import SQLTestCase import tempfile + with SQLTestCase() as tc: with tempfile.TemporaryFile('w+') as tf: @@ -9,7 +10,7 @@ with SQLTestCase() as tc: tf.flush() tf.seek(0) -tc.execute(None, '-fraw', client='mclient', stdin=tf).assertFailed(err_code="42000", err_message=['!syntax error, unexpected $end in: "select foo"', '!syntax error in: "select foo"']) +tc.execute(None, '-fraw', client='mclient', stdin=tf).assertFailed(err_code="42000", err_message=['!syntax error, unexpected end of file in: "select foo"']) tf.seek(0) tf.truncate(0) @@ -27,7 +28,7 @@ with SQLTestCase() as tc: tf.flush() tf.seek(0) -tc.execute(None, '-fraw', client='mclient', stdin=tf).assertFailed(err_code="42000", err_message=['!syntax error, unexpected $end, expecting SCOLON in: "select foo."', '!syntax error in: "select foo."']) +tc.execute(None, '-fraw', client='mclient', stdin=tf).assertFailed(err_code="42000", err_message=['!syntax error, unexpected end of file, expecting SCOLON in: "select foo."']) tf.seek(0) tf.truncate(0) @@ -36,7 +37,7 @@ with SQLTestCase() as tc: tf.flush() tf.seek(0) -tc.execute(None, '-fraw', client='mclient', stdin=tf).assertFailed(err_code="42000", err_message=['!syntax error, unexpected $end, expecting SCOLON in: "select foo-"', '!syntax error in: "select foo-"']) +tc.execute(None, '-fraw', client='mclient', stdin=tf).assertFailed(err_code="42000", err_message=['!syntax error, unexpected end of file, expecting SCOLON in: "select foo-"']) tf.seek(0) tf.truncate(0) @@ -45,7 +46,7 @@ with SQLTestCase() as tc: tf.flush() tf.seek(0) -tc.execute(None, '-fraw', client='mclient', stdin=tf).assertFailed(err_code="42000", err_message=['!syntax error, unexpected $end in: "select f001234"', '!syntax error in: "select f001234"']) +tc.execute(None, '-fraw', client='mclient', stdin=tf).assertFailed(err_code="42000", err_message=['!syntax error, unexpected end of file in: "select f001234"']) tf.seek(0) tf.truncate(0) ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - more helpful error messages
Changeset: a2cb4334d3c0 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/a2cb4334d3c0 Modified Files: sql/server/sql_parser.y Branch: default Log Message: more helpful error messages diffs (12 lines): diff --git a/sql/server/sql_parser.y b/sql/server/sql_parser.y --- a/sql/server/sql_parser.y +++ b/sql/server/sql_parser.y @@ -173,6 +173,8 @@ uescape_xform(char *restrict s, const ch %parse-param { mvc *m } %lex-param { void *m } +%define parse.error verbose + /* reentrant parser */ %define api.pure %union { ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: parquet - merged with default
Changeset: 81b0b38eed3c for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/81b0b38eed3c Modified Files: monetdb5/mal/mal_embedded.c sql/backends/monet5/CMakeLists.txt sql/backends/monet5/rel_bin.c sql/backends/monet5/vaults/csv/csv.c sql/common/sql_types.c sql/server/rel_select.c sql/server/sql_parser.y Branch: parquet Log Message: merged with default diffs (truncated from 24511 to 300 lines): diff --git a/.bumpversion.cfg b/.bumpversion.cfg --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 11.46.0 +current_version = 11.48.0 commit = False tag = False @@ -30,4 +30,3 @@ serialize = {major},{minor},{patch} [bumpversion:file:monetdb5/tools/libmonetdb5.rc] parse = (?P\d+),(?P\d+),(?P\d+) serialize = {major},{minor},{patch} - diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -795,3 +795,4 @@ e8b0e5558313f4d98bc48316368299decc55ed4e e8b0e5558313f4d98bc48316368299decc55ed4e Sep2022_SP2_release 8a95168e853382b9b89ac7b67e343788ea837f3a Jul2021_31 8a95168e853382b9b89ac7b67e343788ea837f3a Jul2021_SP9_release +bb95192134c0d8ef8fea525204eefcd0de099a54 Jun2023_root diff --git a/ChangeLog b/ChangeLog.Jun2023 copy from ChangeLog copy to ChangeLog.Jun2023 diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -7,7 +7,7 @@ # Copyright 1997 - July 2008 CWI, August 2008 - 2023 MonetDB B.V. %global name MonetDB -%global version 11.46.0 +%global version 11.48.0 %{!?buildno: %global buildno %(date +%Y%m%d)} # Use bcond_with to add a --with option; i.e., "without" is default. @@ -366,6 +366,7 @@ developer. %{_bindir}/ODBCStmtAttr %{_bindir}/ODBCgetInfo %{_bindir}/ODBCmetadata +%{_bindir}/ODBCtester %{_bindir}/arraytest %{_bindir}/bincopydata %{_bindir}/odbcsample1 diff --git a/clients/ChangeLog b/clients/ChangeLog.Jun2023 copy from clients/ChangeLog copy to clients/ChangeLog.Jun2023 diff --git a/clients/ChangeLog.Sep2022 b/clients/ChangeLog.Sep2022 --- a/clients/ChangeLog.Sep2022 +++ b/clients/ChangeLog.Sep2022 @@ -1,3 +1,8 @@ # ChangeLog file for clients # This file is updated with Maddlog +* Mon Apr 17 2023 Sjoerd Mullender +- If the number of rows in mclient is set to 0 (using either --rows=0 + option or \r0 on the mclient command line), the internal pager is used + and it then uses the height of the terminal window. + diff --git a/clients/Tests/MAL-signatures-hge.test b/clients/Tests/MAL-signatures-hge.test --- a/clients/Tests/MAL-signatures-hge.test +++ b/clients/Tests/MAL-signatures-hge.test @@ -1019,11 +1019,21 @@ command aggr.quantile(X_0:bat[:any_1], X AGGRquantile; Quantile aggregate aggr +quantile +command aggr.quantile(X_0:bat[:any_1], X_1:dbl):any_1 +AGGRquantile_cst; +Quantile aggregate +aggr quantile_avg command aggr.quantile_avg(X_0:bat[:any_1], X_1:bat[:dbl]):dbl AGGRquantile_avg; Quantile aggregate aggr +quantile_avg +command aggr.quantile_avg(X_0:bat[:any_1], X_1:dbl):dbl +AGGRquantile_avg_cst; +Quantile aggregate +aggr stdev command aggr.stdev(X_0:bat[:bte], X_1:bat[:oid], X_2:bat[:any_1]):bat[:dbl] AGGRstdev3_dbl; @@ -34574,35 +34584,130 @@ pattern batstr.ascii(X_0:bat[:str], X_1: STRbatAscii; Return unicode of head of string batstr +asciify +command batstr.asciify(X_0:bat[:str]):bat[:str] +BATSTRasciify; +Transform BAT of strings from UTF8 to ASCII +batstr +contains +pattern batstr.contains(X_0:bat[:str], X_1:bat[:str]):bat[:bit] +BATSTRcontains; +Check if bat string haystack contains bat string needle. +batstr +contains +pattern batstr.contains(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid]):bat[:bit] +BATSTRcontains; +Check if bat string haystack contains bat string needle (with CLs). +batstr +contains +pattern batstr.contains(X_0:bat[:str], X_1:bat[:str], X_2:bit):bat[:bit] +BATSTRcontains; +Check if bat string haystack contains bat string needle, icase flag. +batstr +contains +pattern batstr.contains(X_0:bat[:str], X_1:bat[:str], X_2:bit, X_3:bat[:oid], X_4:bat[:oid]):bat[:bit] +BATSTRcontains; +Check if bat string haystack contains bat string needle (with CLs) + icase flag. +batstr +contains +pattern batstr.contains(X_0:bat[:str], X_1:str):bat[:bit] +BATSTRcontains_cst; +Check if bat string haystack contains string needle. +batstr +contains +pattern batstr.contains(X_0:bat[:str], X_1:str, X_2:bat[:oid]):bat[:bit] +BATSTRcontains_cst; +Check if bat string haystack contains string needle (with CL) ends with substring. +batstr +contains +pattern batstr.contains(X_0:bat[:str], X_1:str, X_2:bit):bat[:bit] +BATSTRcontains_cst; +Check if bat string haystack contains string needle, icase flag. +batstr +contains +pattern batstr.contains(X_0:bat[:str], X_1:str, X_2:bit, X_3:bat[:oid]):bat[:bit] +BATSTRcontains_cst; +Check if bat string haystack contains string needle (with CL) ends with substring + icase flag. +batstr +contains +pattern batstr.contains(X_0:str, X_1:bat[:str]):bat[:bit] +BA
MonetDB: parquet - improved decimal type detection (including sc...
Changeset: 7725aee828c0 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/7725aee828c0 Modified Files: sql/backends/monet5/vaults/csv/csv.c sql/server/rel_select.c Branch: parquet Log Message: improved decimal type detection (including scale), fallback too double on differences in scales initial detection of quotes diffs (242 lines): diff --git a/sql/backends/monet5/vaults/csv/csv.c b/sql/backends/monet5/vaults/csv/csv.c --- a/sql/backends/monet5/vaults/csv/csv.c +++ b/sql/backends/monet5/vaults/csv/csv.c @@ -23,13 +23,6 @@ csv_open_file(char* filename) return fopen(filename, "r"); } -static char -detect_quote(const char *buf) -{ - (void)buf; - return '"'; -} - /* todo handle escapes */ static const char * next_delim(const char *s, const char *e, char delim, char quote) @@ -46,6 +39,30 @@ next_delim(const char *s, const char *e, return NULL; } +/* todo detect escapes */ +static char +detect_quote(const char *buf) +{ + const char *cur = buf; + const char *l = NULL; + /* "'(none) */ + bool has_double_quote = true, has_single_quote = true; + while ((has_double_quote || has_single_quote) && (l = strchr(cur, '\n')) != NULL) { + const char *s = cur, *t; + if (has_double_quote && ((t = strchr(s, '"')) == NULL || t > l)) /* no quote not used */ + has_double_quote = false; + if (has_single_quote && ((t = strchr(s, '\'')) == NULL || t > l)) /* no quote not used */ + has_single_quote = false; + cur = l+1; + } + if (has_double_quote && !has_single_quote) + return '"'; + if (has_single_quote && !has_double_quote) + return '\''; + /* no quote */ + return '\0'; +} + #define DLEN 4 static char detect_delimiter(const char *buf, char q, int *nr_fields) @@ -106,6 +123,11 @@ typedef enum csv { //later: UUID, INET, JSON etc } csv_types_t; +typedef struct csv_type { + csv_types_t type; + int scale; +} csv_type; + static bool detect_bool(const char *s, const char *e) { @@ -132,25 +154,28 @@ detect_bigint(const char *s, const char } static bool -detect_decimal(const char *s, const char *e) +detect_decimal(const char *s, const char *e, int *scale) { - bool dotseen = 0; + int dotseen = 0; while(s < e) { if (!dotseen && *s == '.') - dotseen = true; + dotseen = (e-(s+1)); else if (!isdigit(*s)) break; s++; } - if (s==e && dotseen) + if (s==e && dotseen) { + *scale = dotseen; return true; + } return false; } static bool detect_time(const char *s, const char *e) { + /* TODO detect time with timezone */ if ((e-s) != 5) return false; /* 00:00 - 23:59 */ @@ -190,40 +215,42 @@ detect_timestamp(const char *s, const ch } /* per row */ -static csv_types_t * +static csv_type * detect_types_row(const char *s, const char *e, char delim, char quote, int nr_fields) { - csv_types_t *types = (csv_types_t*)GDKmalloc(sizeof(csv_types_t)*nr_fields); + csv_type *types = (csv_type*)GDKmalloc(sizeof(csv_type)*nr_fields); if (!types) return NULL; for(int i = 0; i< nr_fields; i++) { const char *n = next_delim(s, e, delim, quote); + int scale = 0; - types[i] = CSV_STRING; + types[i].type = CSV_STRING; if (n) { if (detect_bool(s,n)) - types[i] = CSV_BOOLEAN; + types[i].type = CSV_BOOLEAN; else if (detect_bigint(s, n)) - types[i] = CSV_BIGINT; - else if (detect_decimal(s, n)) - types[i] = CSV_DECIMAL; + types[i].type = CSV_BIGINT; + else if (detect_decimal(s, n, &scale)) + types[i].type = CSV_DECIMAL; else if (detect_time(s, n)) - types[i] = CSV_TIME; + types[i].type = CSV_TIME; else if (detect_date(s, n)) - types[i] = CSV_DATE; + types[i].type = CSV_DATE; else if (detect_timestamp(s, n)) - types[i] = CSV_TIMESTAMP; + types[i].type = CSV_TIMESTAMP; + types[i].scale = scale; } s = n+1; } return types; } -static csv_types_t * +static csv_type * detect_types(const char *buf, char delim, char quote, int nr_fields, bool *has_hea