* [Tarantool-patches] [PATCH] sql: use unify pattern for column names
@ 2020-03-09 15:02 Roman Khabibov
2020-03-09 15:04 ` Roman Khabibov
0 siblings, 1 reply; 9+ messages in thread
From: Roman Khabibov @ 2020-03-09 15:02 UTC (permalink / raw)
To: tarantool-patches; +Cc: v.shpilevoy
Name resulting columns generated by an expression or <VALUES>
construction by the "_COLUMN_N" pattern.
Closes #3962
@TarantoolBot document
Title: Column naming in SQL
Now, every auto generated column is named by the "_COLUMN_N"
pattern, where N is the number of column in a query. Auto
generated column is a column in a query result generated by an
expression or a column from <VALUES> construction.
---
src/box/sql/select.c | 11 +-
src/box/sql/sqlInt.h | 13 +
test/box/function1.result | 12 +-
test/sql-tap/colname.test.lua | 6 +-
test/sql-tap/select1.test.lua | 21 +-
test/sql-tap/select6.test.lua | 22 +-
test/sql-tap/view.test.lua | 4 +-
test/sql/bind.result | 42 +-
test/sql/boolean.result | 354 ++++-----
test/sql/collation.result | 14 +-
test/sql/errinj.result | 2 +-
test/sql/foreign-keys.result | 4 +-
test/sql/full_metadata.result | 10 +-
test/sql/func-recreate.result | 2 +-
test/sql/gh-3199-no-mem-leaks.result | 24 +-
test/sql/gh-3888-values-blob-assert.result | 125 ++--
test/sql/icu-upper-lower.result | 82 +-
test/sql/integer-overflow.result | 14 +-
test/sql/iproto.result | 16 +-
test/sql/max-on-index.result | 6 +-
test/sql/misc.result | 299 ++++----
test/sql/persistency.result | 826 +++++++++++----------
test/sql/prepared.result | 18 +-
test/sql/row-count.result | 40 +-
test/sql/transition.result | 66 +-
test/sql/types.result | 226 +++---
26 files changed, 1143 insertions(+), 1116 deletions(-)
diff --git a/src/box/sql/select.c b/src/box/sql/select.c
index 65e41f219..54b6f83d8 100644
--- a/src/box/sql/select.c
+++ b/src/box/sql/select.c
@@ -1852,12 +1852,10 @@ generate_column_metadata(struct Parse *pParse, struct SrcList *pTabList,
const char *z = NULL;
if (colname != NULL)
z = colname;
- else if (span != NULL)
- z = span;
else
- z = tt_sprintf("column%d", i + 1);
+ z = sql_generate_column_name(i + 1);
vdbe_metadata_set_col_name(v, i, z);
- if (is_full_meta && colname != NULL)
+ if (is_full_meta)
vdbe_metadata_set_col_span(v, i, span);
}
}
@@ -1946,13 +1944,10 @@ sqlColumnsFromExprList(Parse * parse, ExprList * expr_list,
} else if (pColExpr->op == TK_ID) {
assert(!ExprHasProperty(pColExpr, EP_IntValue));
zName = pColExpr->u.zToken;
- } else {
- /* Use the original text of the column expression as its name */
- zName = expr_list->a[i].zSpan;
}
}
if (zName == NULL)
- zName = "_auto_field_";
+ zName = sql_generate_column_name(i + 1);
zName = sqlMPrintf(db, "%s", zName);
/* Make sure the column name is unique. If the name is not unique,
diff --git a/src/box/sql/sqlInt.h b/src/box/sql/sqlInt.h
index 1579cc92e..8c9708cf6 100644
--- a/src/box/sql/sqlInt.h
+++ b/src/box/sql/sqlInt.h
@@ -4513,4 +4513,17 @@ int
sql_fieldno_by_name(struct Parse *parse_context, struct Expr *field_name,
uint32_t *fieldno);
+/**
+ * Return a string of the form "_COLUMN_N", where N is @a number.
+ *
+ * @param number Number of column.
+ *
+ * @retval string success.
+ */
+static inline char *
+sql_generate_column_name(uint32_t number)
+{
+ return (char *) tt_sprintf("_COLUMN_%d", number);
+}
+
#endif /* sqlINT_H */
diff --git a/test/box/function1.result b/test/box/function1.result
index b91d63c51..86cea4f3b 100644
--- a/test/box/function1.result
+++ b/test/box/function1.result
@@ -449,7 +449,7 @@ box.execute('SELECT "function1.divide"(6, 3, 3)')
box.execute('SELECT "function1.divide"(6, 3)')
---
- metadata:
- - name: '"function1.divide"(6, 3)'
+ - name: _COLUMN_1
type: number
rows:
- [2]
@@ -457,7 +457,7 @@ box.execute('SELECT "function1.divide"(6, 3)')
box.execute('SELECT "function1.divide"(5, 2)')
---
- metadata:
- - name: '"function1.divide"(5, 2)'
+ - name: _COLUMN_1
type: number
rows:
- [2.5]
@@ -482,7 +482,7 @@ test_run:cmd("setopt delimiter ''");
box.execute('SELECT summarize(1, 2)')
---
- metadata:
- - name: summarize(1, 2)
+ - name: _COLUMN_1
type: number
rows:
- [3]
@@ -505,7 +505,7 @@ test_run:cmd("setopt delimiter ''");
box.execute('SELECT summarize(1, 2)')
---
- metadata:
- - name: summarize(1, 2)
+ - name: _COLUMN_1
type: number
rows:
- [3]
@@ -519,7 +519,7 @@ box.func.SUMMARIZE:drop()
box.execute('SELECT lua(\'return 1 + 1\')')
---
- metadata:
- - name: lua('return 1 + 1')
+ - name: _COLUMN_1
type: any
rows:
- [2]
@@ -537,7 +537,7 @@ box.execute('SELECT lua(\'return box.cfg()\')')
box.execute('SELECT lua(\'return box.cfg.memtx_memory\')')
---
- metadata:
- - name: lua('return box.cfg.memtx_memory')
+ - name: _COLUMN_1
type: any
rows:
- [107374182]
diff --git a/test/sql-tap/colname.test.lua b/test/sql-tap/colname.test.lua
index caa61a07a..f8cd5cc0e 100755
--- a/test/sql-tap/colname.test.lua
+++ b/test/sql-tap/colname.test.lua
@@ -94,7 +94,7 @@ test:do_execsql2_test(
SELECT +tabc.a, -tabc.b, tabc.c, * FROM tabc
]], {
-- <colname-2.3>
- "+tabc.a",1,"-tabc.b",-2,"C",3,"A",1,"B",2,"C",3
+ "_COLUMN_1",1,"_COLUMN_2",-2,"C",3,"A",1,"B",2,"C",3
-- </colname-2.3>
})
@@ -194,7 +194,7 @@ test:do_execsql2_test(
SELECT +tabc.a, -tabc.b, tabc.c FROM tabc
]], {
-- <colname-3.3>
- "+tabc.a", 1, "-tabc.b", -2, "C", 3
+ "_COLUMN_1",1,"_COLUMN_2",-2,"C",3
-- </colname-3.3>
})
@@ -314,7 +314,7 @@ test:do_execsql2_test(
SELECT +tabc.a, -tabc.b, tabc.c FROM tabc
]], {
-- <colname-4.3>
- "+tabc.a", 1, "-tabc.b", -2, "TABC.C", 3
+ "_COLUMN_1",1,"_COLUMN_2",-2,"TABC.C",3
-- </colname-4.3>
})
diff --git a/test/sql-tap/select1.test.lua b/test/sql-tap/select1.test.lua
index fbebfab37..2c5f90479 100755
--- a/test/sql-tap/select1.test.lua
+++ b/test/sql-tap/select1.test.lua
@@ -1032,7 +1032,7 @@ test:do_catchsql2_test(
SELECT f1+F2 FROM test1 ORDER BY f2
]], {
-- <select1-6.4a>
- 0, {"f1+F2", 33, "f1+F2", 77}
+ 0, {"_COLUMN_1",33,"_COLUMN_1",77}
-- </select1-6.4a>
})
@@ -1042,7 +1042,7 @@ test:do_catchsql2_test(
SELECT test1.f1+F2 FROM test1 ORDER BY f2
]], {
-- <select1-6.5>
- 0, {"test1.f1+F2", 33, "test1.f1+F2", 77}
+ 0, {"_COLUMN_1",33,"_COLUMN_1",77}
-- </select1-6.5>
})
@@ -1059,7 +1059,7 @@ test:do_test(
return table.insert(v,msg) or v
end, {
-- <select1-6.5.1>
- 0, {'test1.f1+F2', 33, 'test1.f1+F2', 77}
+ 0, {"_COLUMN_1",33,"_COLUMN_1",77}
-- </select1-6.5.1>
})
@@ -1068,7 +1068,7 @@ test:do_catchsql2_test(
[[SELECT test1.f1+F2, t1 FROM test1, test2
ORDER BY f2]], {
-- <select1-6.6>
- 0, {"test1.f1+F2", 33, "T1", "abc", "test1.f1+F2", 77, "T1", "abc"}
+ 0, {"_COLUMN_1",33,"T1","abc","_COLUMN_1",77,"T1","abc"}
-- </select1-6.6>
})
@@ -1161,7 +1161,7 @@ test:do_test(
]]
end, {
-- <select1-6.9.5>
- "123.45", 123.45
+ "_COLUMN_1",123.45
-- </select1-6.9.5>
})
@@ -1189,7 +1189,8 @@ test:do_test(
return x
end, {
-- <select1-6.9.7>
- "A.F1", 11, "A.F2", 22, "sql_subquery.5", 5, "sql_subquery.6", 6
+ "A.F1", 11, "A.F2", 22, "sql_subquery._COLUMN_1", 5,
+ "sql_subquery._COLUMN_2", 6
-- </select1-6.9.7>
})
@@ -1816,7 +1817,7 @@ test:do_execsql2_test(
SELECT * FROM t3, (SELECT max(a), max(b) FROM t4) as "tx"
]], {
-- <select1-11.14>
- "ID", 0, "A", "1", "B", "2", "max(a)", 3, "max(b)", "4"
+ "ID", 0, "A", "1", "B", "2", "_COLUMN_1", 3, "_COLUMN_2", "4"
-- </select1-11.14>
})
@@ -1826,7 +1827,7 @@ test:do_execsql2_test(
SELECT y.*, t3.* FROM t3, (SELECT max(a), max(b) FROM t4) AS y
]], {
-- <select1-11.15>
- "max(a)", 3, "max(b)", "4", "ID", 0, "A", "1", "B", "2"
+ "_COLUMN_1", 3, "_COLUMN_2", "4", "ID", 0, "A", "1", "B", "2"
-- </select1-11.15>
})
@@ -1850,7 +1851,7 @@ test:do_execsql2_test(
SELECT 1+2+3
]], {
-- <select1-12.1>
- "1+2+3", 6
+ "_COLUMN_1",6
-- </select1-12.1>
})
@@ -1860,7 +1861,7 @@ test:do_execsql2_test(
SELECT 1,'hello',2
]], {
-- <select1-12.2>
- '1', 1, "'hello'", "hello", '2', 2
+ "_COLUMN_1",1,"_COLUMN_2","hello","_COLUMN_3",2
-- </select1-12.2>
})
diff --git a/test/sql-tap/select6.test.lua b/test/sql-tap/select6.test.lua
index c9960dc29..e99260505 100755
--- a/test/sql-tap/select6.test.lua
+++ b/test/sql-tap/select6.test.lua
@@ -128,9 +128,9 @@ test:do_execsql_test(
test:do_execsql_test(
"select6-1.7",
[=[
- SELECT a.y, a."count(*)", "max(x)", "count(*)"
- FROM (SELECT count(*),y FROM t1 GROUP BY y) AS a,
- (SELECT max(x),y FROM t1 GROUP BY y) as b
+ SELECT a.y, a.count, max, count
+ FROM (SELECT count(*) AS count, y FROM t1 GROUP BY y) AS a,
+ (SELECT max(x) AS max, y FROM t1 GROUP BY y) as b
WHERE a.y=b.y ORDER BY a.y
]=], {
-- <select6-1.7>
@@ -154,9 +154,9 @@ test:do_execsql_test(
test:do_execsql_test(
"select6-1.9",
[=[
- SELECT q, p, r, b."min(x)+y"
+ SELECT q, p, r, min
FROM (SELECT count(*) as p , y as q FROM t1 GROUP BY y) AS a,
- (SELECT max(x) as r, y as s, min(x)+y FROM t1 GROUP BY y) as b
+ (SELECT max(x) as r, y as s, min(x)+y AS min FROM t1 GROUP BY y) as b
WHERE q=s ORDER BY s
]=], {
-- <select6-1.9>
@@ -247,9 +247,9 @@ test:do_execsql_test(
test:do_execsql_test(
"select6-2.7",
[=[
- SELECT a.b, a."count(*)", "max(a)", "count(*)"
- FROM (SELECT count(*),b FROM t2 GROUP BY b) AS a,
- (SELECT max(a),b FROM t2 GROUP BY b) as b
+ SELECT a.b, a.count, max, count
+ FROM (SELECT count(*) AS count, b FROM t2 GROUP BY b) AS a,
+ (SELECT max(a) AS max, b FROM t2 GROUP BY b) as b
WHERE a.b=b.b ORDER BY a.b
]=], {
-- <select6-2.7>
@@ -432,8 +432,8 @@ test:do_execsql_test(
test:do_execsql_test(
"select6-3.14",
[=[
- SELECT "count(*)",y FROM (SELECT count(*), y FROM t1 GROUP BY y)
- ORDER BY "count(*)"
+ SELECT count, y FROM (SELECT count(*) AS count, y FROM t1 GROUP BY y)
+ ORDER BY count
]=], {
-- <select6-3.14>
1, 1, 2, 2, 4, 3, 5, 5, 8, 4
@@ -443,7 +443,7 @@ test:do_execsql_test(
test:do_execsql_test(
"select6-3.15",
[=[
- SELECT "count(*)",y FROM (SELECT count(*), y FROM t1 GROUP BY y)
+ SELECT count, y FROM (SELECT count(*) AS count, y FROM t1 GROUP BY y)
ORDER BY y
]=], {
-- <select6-3.15>
diff --git a/test/sql-tap/view.test.lua b/test/sql-tap/view.test.lua
index e553b91c7..6c7671537 100755
--- a/test/sql-tap/view.test.lua
+++ b/test/sql-tap/view.test.lua
@@ -265,7 +265,7 @@ test:do_execsql2_test(
SELECT * FROM v1 LIMIT 1
]], {
-- <view-3.3.1>
- "XYZ", 2, "PQR", 7, "c-b", 1
+ "XYZ", 2, "PQR", 7, "_COLUMN_3", 1
-- </view-3.3.1>
})
@@ -276,7 +276,7 @@ test:do_execsql2_test(
SELECT * FROM v1b LIMIT 1
]], {
-- <view-3.3.2>
- "A", 2, "b+c", 7, "C", 4
+ "A", 2, "_COLUMN_2", 7, "C", 4
-- </view-3.3.2>
})
diff --git a/test/sql/bind.result b/test/sql/bind.result
index b24094052..fd6eac834 100644
--- a/test/sql/bind.result
+++ b/test/sql/bind.result
@@ -77,11 +77,11 @@ execute('SELECT * FROM test WHERE id = :value', parameters)
execute('SELECT ?, ?, ?', {1, 2, 3})
---
- metadata:
- - name: '?'
+ - name: _COLUMN_1
type: integer
- - name: '?'
+ - name: _COLUMN_2
type: integer
- - name: '?'
+ - name: _COLUMN_3
type: integer
rows:
- [1, 2, 3]
@@ -107,11 +107,11 @@ parameters[3][':value1'] = 11
execute('SELECT ?, :value1, @value2', parameters)
---
- metadata:
- - name: '?'
+ - name: _COLUMN_1
type: integer
- - name: :value1
+ - name: _COLUMN_2
type: integer
- - name: '@value2'
+ - name: _COLUMN_3
type: integer
rows:
- [10, 11, 12]
@@ -149,22 +149,22 @@ parameters[6]['@value2'] = 6
execute('SELECT :value3, ?, :value1, ?, ?, @value2, ?, :value3', parameters)
---
- metadata:
- - name: :value3
+ - name: _COLUMN_1
type: integer
- - name: '?'
+ - name: _COLUMN_2
type: integer
- - name: :value1
+ - name: _COLUMN_3
type: integer
- - name: '?'
+ - name: _COLUMN_4
type: integer
- - name: '?'
+ - name: _COLUMN_5
type: integer
- - name: '@value2'
+ - name: _COLUMN_6
type: integer
- - name: '?'
+ - name: _COLUMN_7
+ type: boolean
+ - name: _COLUMN_8
type: boolean
- - name: :value3
- type: integer
rows:
- [1, 2, 3, 4, 5, 6, null, 1]
...
@@ -175,15 +175,15 @@ msgpack = require('msgpack')
execute('SELECT ?, ?, ?, ?, ?', {'abc', -123.456, msgpack.NULL, true, false})
---
- metadata:
- - name: '?'
+ - name: _COLUMN_1
type: text
- - name: '?'
+ - name: _COLUMN_2
type: numeric
- - name: '?'
+ - name: _COLUMN_3
type: boolean
- - name: '?'
+ - name: _COLUMN_4
type: boolean
- - name: '?'
+ - name: _COLUMN_5
type: boolean
rows:
- ['abc', -123.456, null, true, false]
@@ -290,7 +290,7 @@ execute('SELECT :value', parameters)
execute('SELECT ? ', {18446744073709551615ULL})
---
- metadata:
- - name: '?'
+ - name: _COLUMN_1
type: integer
rows:
- [18446744073709551615]
diff --git a/test/sql/boolean.result b/test/sql/boolean.result
index 112e41a12..3c273f2cd 100644
--- a/test/sql/boolean.result
+++ b/test/sql/boolean.result
@@ -241,7 +241,7 @@ i > 0
SELECT return_type(a) FROM t;
| ---
| - metadata:
- | - name: return_type(a)
+ | - name: _COLUMN_1
| type: string
| rows:
| - ['boolean']
@@ -250,7 +250,7 @@ SELECT return_type(a) FROM t;
SELECT return_type('false');
| ---
| - metadata:
- | - name: return_type('false')
+ | - name: _COLUMN_1
| type: string
| rows:
| - ['string']
@@ -258,7 +258,7 @@ SELECT return_type('false');
SELECT is_boolean(a) FROM t LIMIT 1;
| ---
| - metadata:
- | - name: is_boolean(a)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -266,7 +266,7 @@ SELECT is_boolean(a) FROM t LIMIT 1;
SELECT is_boolean('true');
| ---
| - metadata:
- | - name: is_boolean('true')
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -281,7 +281,7 @@ SELECT abs(a) FROM t0;
SELECT lower(a) FROM t0;
| ---
| - metadata:
- | - name: lower(a)
+ | - name: _COLUMN_1
| type: string
| rows:
| - ['false']
@@ -292,7 +292,7 @@ SELECT lower(a) FROM t0;
SELECT upper(a) FROM t0;
| ---
| - metadata:
- | - name: upper(a)
+ | - name: _COLUMN_1
| type: string
| rows:
| - ['FALSE']
@@ -303,7 +303,7 @@ SELECT upper(a) FROM t0;
SELECT quote(a) FROM t0;
| ---
| - metadata:
- | - name: quote(a)
+ | - name: _COLUMN_1
| type: string
| rows:
| - ['FALSE']
@@ -315,7 +315,7 @@ SELECT quote(a) FROM t0;
SELECT length(a) FROM t0;
| ---
| - metadata:
- | - name: length(a)
+ | - name: _COLUMN_1
| type: integer
| rows:
| - [5]
@@ -326,7 +326,7 @@ SELECT length(a) FROM t0;
SELECT typeof(a) FROM t0;
| ---
| - metadata:
- | - name: typeof(a)
+ | - name: _COLUMN_1
| type: string
| rows:
| - ['boolean']
@@ -344,7 +344,7 @@ SELECT AVG(a) FROM t0;
SELECT MIN(a) FROM t0;
| ---
| - metadata:
- | - name: MIN(a)
+ | - name: _COLUMN_1
| type: scalar
| rows:
| - [false]
@@ -352,7 +352,7 @@ SELECT MIN(a) FROM t0;
SELECT MAX(a) FROM t0;
| ---
| - metadata:
- | - name: MAX(a)
+ | - name: _COLUMN_1
| type: scalar
| rows:
| - [true]
@@ -365,7 +365,7 @@ SELECT SUM(a) FROM t0;
SELECT COUNT(a) FROM t0;
| ---
| - metadata:
- | - name: COUNT(a)
+ | - name: _COLUMN_1
| type: integer
| rows:
| - [2]
@@ -378,7 +378,7 @@ SELECT TOTAL(a) FROM t0;
SELECT GROUP_CONCAT(a, ' +++ ') FROM t0;
| ---
| - metadata:
- | - name: GROUP_CONCAT(a, ' +++ ')
+ | - name: _COLUMN_1
| type: string
| rows:
| - ['FALSE +++ TRUE']
@@ -392,13 +392,13 @@ SELECT GROUP_CONCAT(a, ' +++ ') FROM t0;
box.execute('SELECT ?, ?, return_type($1), typeof($2);', {true, false})
| ---
| - metadata:
- | - name: '?'
+ | - name: _COLUMN_1
| type: boolean
- | - name: '?'
+ | - name: _COLUMN_2
| type: boolean
- | - name: return_type($1)
+ | - name: _COLUMN_3
| type: string
- | - name: typeof($2)
+ | - name: _COLUMN_4
| type: string
| rows:
| - [true, false, 'boolean', 'boolean']
@@ -422,9 +422,9 @@ parameters[2][':value1'] = false
box.execute('SELECT :value1, @value2;', parameters)
| ---
| - metadata:
- | - name: :value1
+ | - name: _COLUMN_1
| type: boolean
- | - name: '@value2'
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -501,9 +501,9 @@ INSERT INTO t3 VALUES (4, false)
SELECT cast(true AS INTEGER), cast(false AS INTEGER);
| ---
| - metadata:
- | - name: cast(true AS INTEGER)
+ | - name: _COLUMN_1
| type: integer
- | - name: cast(false AS INTEGER)
+ | - name: _COLUMN_2
| type: integer
| rows:
| - [1, 0]
@@ -511,9 +511,9 @@ SELECT cast(true AS INTEGER), cast(false AS INTEGER);
SELECT cast(true AS NUMBER), cast(false AS NUMBER);
| ---
| - metadata:
- | - name: cast(true AS NUMBER)
+ | - name: _COLUMN_1
| type: number
- | - name: cast(false AS NUMBER)
+ | - name: _COLUMN_2
| type: number
| rows:
| - [1, 0]
@@ -522,9 +522,9 @@ SELECT cast(true AS NUMBER), cast(false AS NUMBER);
SELECT cast(true AS TEXT), cast(false AS TEXT);
| ---
| - metadata:
- | - name: cast(true AS TEXT)
+ | - name: _COLUMN_1
| type: string
- | - name: cast(false AS TEXT)
+ | - name: _COLUMN_2
| type: string
| rows:
| - ['TRUE', 'FALSE']
@@ -532,9 +532,9 @@ SELECT cast(true AS TEXT), cast(false AS TEXT);
SELECT cast(true AS BOOLEAN), cast(false AS BOOLEAN);
| ---
| - metadata:
- | - name: cast(true AS BOOLEAN)
+ | - name: _COLUMN_1
| type: boolean
- | - name: cast(false AS BOOLEAN)
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [true, false]
@@ -544,11 +544,11 @@ SELECT cast(true AS BOOLEAN), cast(false AS BOOLEAN);
SELECT cast(100 AS BOOLEAN), cast(1 AS BOOLEAN), cast(0 AS BOOLEAN);
| ---
| - metadata:
- | - name: cast(100 AS BOOLEAN)
+ | - name: _COLUMN_1
| type: boolean
- | - name: cast(1 AS BOOLEAN)
+ | - name: _COLUMN_2
| type: boolean
- | - name: cast(0 AS BOOLEAN)
+ | - name: _COLUMN_3
| type: boolean
| rows:
| - [true, true, false]
@@ -556,9 +556,9 @@ SELECT cast(100 AS BOOLEAN), cast(1 AS BOOLEAN), cast(0 AS BOOLEAN);
SELECT cast(0.123 AS BOOLEAN), cast(0.0 AS BOOLEAN);
| ---
| - metadata:
- | - name: cast(0.123 AS BOOLEAN)
+ | - name: _COLUMN_1
| type: boolean
- | - name: cast(0.0 AS BOOLEAN)
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [true, false]
@@ -566,9 +566,9 @@ SELECT cast(0.123 AS BOOLEAN), cast(0.0 AS BOOLEAN);
SELECT cast('true' AS BOOLEAN), cast('false' AS BOOLEAN);
| ---
| - metadata:
- | - name: cast('true' AS BOOLEAN)
+ | - name: _COLUMN_1
| type: boolean
- | - name: cast('false' AS BOOLEAN)
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [true, false]
@@ -576,9 +576,9 @@ SELECT cast('true' AS BOOLEAN), cast('false' AS BOOLEAN);
SELECT cast('TRUE' AS BOOLEAN), cast('FALSE' AS BOOLEAN);
| ---
| - metadata:
- | - name: cast('TRUE' AS BOOLEAN)
+ | - name: _COLUMN_1
| type: boolean
- | - name: cast('FALSE' AS BOOLEAN)
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [true, false]
@@ -887,7 +887,7 @@ SELECT a, COUNT(*) FROM (SELECT * FROM t4 UNION SELECT * FROM t5) GROUP BY a;
| - metadata:
| - name: A
| type: boolean
- | - name: COUNT(*)
+ | - name: _COLUMN_2
| type: integer
| rows:
| - [false, 3]
@@ -907,7 +907,7 @@ INSERT INTO t6 VALUES (true, false), (false, true);
SELECT NOT true;
| ---
| - metadata:
- | - name: NOT true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -915,7 +915,7 @@ SELECT NOT true;
SELECT NOT false;
| ---
| - metadata:
- | - name: NOT false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -925,7 +925,7 @@ SELECT a, NOT a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: NOT a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -935,7 +935,7 @@ SELECT a, NOT a FROM t;
SELECT true AND true;
| ---
| - metadata:
- | - name: true AND true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -943,7 +943,7 @@ SELECT true AND true;
SELECT true AND false;
| ---
| - metadata:
- | - name: true AND false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -951,7 +951,7 @@ SELECT true AND false;
SELECT false AND true;
| ---
| - metadata:
- | - name: false AND true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -959,7 +959,7 @@ SELECT false AND true;
SELECT false AND false;
| ---
| - metadata:
- | - name: false AND false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -967,7 +967,7 @@ SELECT false AND false;
SELECT true OR true;
| ---
| - metadata:
- | - name: true OR true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -975,7 +975,7 @@ SELECT true OR true;
SELECT true OR false;
| ---
| - metadata:
- | - name: true OR false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -983,7 +983,7 @@ SELECT true OR false;
SELECT false OR true;
| ---
| - metadata:
- | - name: false OR true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -991,7 +991,7 @@ SELECT false OR true;
SELECT false OR false;
| ---
| - metadata:
- | - name: false OR false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -1002,7 +1002,7 @@ SELECT a, true AND a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: true AND a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -1013,7 +1013,7 @@ SELECT a, false AND a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: false AND a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -1024,7 +1024,7 @@ SELECT a, true OR a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: true OR a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -1035,7 +1035,7 @@ SELECT a, false OR a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: false OR a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -1046,7 +1046,7 @@ SELECT a, a AND true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a AND true
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -1057,7 +1057,7 @@ SELECT a, a AND false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a AND false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -1068,7 +1068,7 @@ SELECT a, a OR true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a OR true
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -1079,7 +1079,7 @@ SELECT a, a OR false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a OR false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -1093,7 +1093,7 @@ SELECT a, a1, a AND a1 FROM t, t6;
| type: boolean
| - name: A1
| type: boolean
- | - name: a AND a1
+ | - name: _COLUMN_3
| type: boolean
| rows:
| - [false, false, false]
@@ -1108,7 +1108,7 @@ SELECT a, a1, a OR a1 FROM t, t6;
| type: boolean
| - name: A1
| type: boolean
- | - name: a OR a1
+ | - name: _COLUMN_3
| type: boolean
| rows:
| - [false, false, false]
@@ -1622,7 +1622,7 @@ SELECT a1, a2, a2 || a2 FROM t6;
SELECT true > true;
| ---
| - metadata:
- | - name: true > true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -1630,7 +1630,7 @@ SELECT true > true;
SELECT true > false;
| ---
| - metadata:
- | - name: true > false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -1638,7 +1638,7 @@ SELECT true > false;
SELECT false > true;
| ---
| - metadata:
- | - name: false > true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -1646,7 +1646,7 @@ SELECT false > true;
SELECT false > false;
| ---
| - metadata:
- | - name: false > false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -1654,7 +1654,7 @@ SELECT false > false;
SELECT true < true;
| ---
| - metadata:
- | - name: true < true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -1662,7 +1662,7 @@ SELECT true < true;
SELECT true < false;
| ---
| - metadata:
- | - name: true < false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -1670,7 +1670,7 @@ SELECT true < false;
SELECT false < true;
| ---
| - metadata:
- | - name: false < true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -1678,7 +1678,7 @@ SELECT false < true;
SELECT false < false;
| ---
| - metadata:
- | - name: false < false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -1689,7 +1689,7 @@ SELECT a, true > a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: true > a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -1700,7 +1700,7 @@ SELECT a, false > a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: false > a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -1711,7 +1711,7 @@ SELECT a, true < a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: true < a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -1722,7 +1722,7 @@ SELECT a, false < a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: false < a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -1733,7 +1733,7 @@ SELECT a, a > true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a > true
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -1744,7 +1744,7 @@ SELECT a, a > false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a > false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -1755,7 +1755,7 @@ SELECT a, a < true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a < true
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -1766,7 +1766,7 @@ SELECT a, a < false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a < false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -1780,7 +1780,7 @@ SELECT a, a1, a > a1 FROM t, t6;
| type: boolean
| - name: A1
| type: boolean
- | - name: a > a1
+ | - name: _COLUMN_3
| type: boolean
| rows:
| - [false, false, false]
@@ -1795,7 +1795,7 @@ SELECT a, a1, a < a1 FROM t, t6;
| type: boolean
| - name: A1
| type: boolean
- | - name: a < a1
+ | - name: _COLUMN_3
| type: boolean
| rows:
| - [false, false, false]
@@ -1807,7 +1807,7 @@ SELECT a, a1, a < a1 FROM t, t6;
SELECT true >= true;
| ---
| - metadata:
- | - name: true >= true
+ | - name: _COLUMN_1
| type: any
| rows:
| - [true]
@@ -1815,7 +1815,7 @@ SELECT true >= true;
SELECT true >= false;
| ---
| - metadata:
- | - name: true >= false
+ | - name: _COLUMN_1
| type: any
| rows:
| - [true]
@@ -1823,7 +1823,7 @@ SELECT true >= false;
SELECT false >= true;
| ---
| - metadata:
- | - name: false >= true
+ | - name: _COLUMN_1
| type: any
| rows:
| - [false]
@@ -1831,7 +1831,7 @@ SELECT false >= true;
SELECT false >= false;
| ---
| - metadata:
- | - name: false >= false
+ | - name: _COLUMN_1
| type: any
| rows:
| - [true]
@@ -1839,7 +1839,7 @@ SELECT false >= false;
SELECT true <= true;
| ---
| - metadata:
- | - name: true <= true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -1847,7 +1847,7 @@ SELECT true <= true;
SELECT true <= false;
| ---
| - metadata:
- | - name: true <= false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -1855,7 +1855,7 @@ SELECT true <= false;
SELECT false <= true;
| ---
| - metadata:
- | - name: false <= true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -1863,7 +1863,7 @@ SELECT false <= true;
SELECT false <= false;
| ---
| - metadata:
- | - name: false <= false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -1874,7 +1874,7 @@ SELECT a, true >= a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: true >= a
+ | - name: _COLUMN_2
| type: any
| rows:
| - [false, true]
@@ -1885,7 +1885,7 @@ SELECT a, false >= a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: false >= a
+ | - name: _COLUMN_2
| type: any
| rows:
| - [false, true]
@@ -1896,7 +1896,7 @@ SELECT a, true <= a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: true <= a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -1907,7 +1907,7 @@ SELECT a, false <= a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: false <= a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -1918,7 +1918,7 @@ SELECT a, a >= true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a >= true
+ | - name: _COLUMN_2
| type: any
| rows:
| - [false, false]
@@ -1929,7 +1929,7 @@ SELECT a, a >= false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a >= false
+ | - name: _COLUMN_2
| type: any
| rows:
| - [false, true]
@@ -1940,7 +1940,7 @@ SELECT a, a <= true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a <= true
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -1951,7 +1951,7 @@ SELECT a, a <= false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a <= false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -1965,7 +1965,7 @@ SELECT a, a1, a >= a1 FROM t, t6;
| type: boolean
| - name: A1
| type: boolean
- | - name: a >= a1
+ | - name: _COLUMN_3
| type: any
| rows:
| - [false, false, true]
@@ -1980,7 +1980,7 @@ SELECT a, a1, a <= a1 FROM t, t6;
| type: boolean
| - name: A1
| type: boolean
- | - name: a <= a1
+ | - name: _COLUMN_3
| type: boolean
| rows:
| - [false, false, true]
@@ -1992,7 +1992,7 @@ SELECT a, a1, a <= a1 FROM t, t6;
SELECT true == true;
| ---
| - metadata:
- | - name: true == true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2000,7 +2000,7 @@ SELECT true == true;
SELECT true == false;
| ---
| - metadata:
- | - name: true == false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2008,7 +2008,7 @@ SELECT true == false;
SELECT false == true;
| ---
| - metadata:
- | - name: false == true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2016,7 +2016,7 @@ SELECT false == true;
SELECT false == false;
| ---
| - metadata:
- | - name: false == false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2024,7 +2024,7 @@ SELECT false == false;
SELECT true != true;
| ---
| - metadata:
- | - name: true != true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2032,7 +2032,7 @@ SELECT true != true;
SELECT true != false;
| ---
| - metadata:
- | - name: true != false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2040,7 +2040,7 @@ SELECT true != false;
SELECT false != true;
| ---
| - metadata:
- | - name: false != true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2048,7 +2048,7 @@ SELECT false != true;
SELECT false != false;
| ---
| - metadata:
- | - name: false != false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2059,7 +2059,7 @@ SELECT a, true == a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: true == a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -2070,7 +2070,7 @@ SELECT a, false == a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: false == a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -2081,7 +2081,7 @@ SELECT a, true != a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: true != a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -2092,7 +2092,7 @@ SELECT a, false != a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: false != a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -2103,7 +2103,7 @@ SELECT a, a == true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a == true
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -2114,7 +2114,7 @@ SELECT a, a == false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a == false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -2125,7 +2125,7 @@ SELECT a, a != true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a != true
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -2136,7 +2136,7 @@ SELECT a, a != false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a != false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -2150,7 +2150,7 @@ SELECT a, a1, a == a1 FROM t, t6;
| type: boolean
| - name: A1
| type: boolean
- | - name: a == a1
+ | - name: _COLUMN_3
| type: boolean
| rows:
| - [false, false, true]
@@ -2165,7 +2165,7 @@ SELECT a, a1, a != a1 FROM t, t6;
| type: boolean
| - name: A1
| type: boolean
- | - name: a != a1
+ | - name: _COLUMN_3
| type: boolean
| rows:
| - [false, false, false]
@@ -2177,7 +2177,7 @@ SELECT a, a1, a != a1 FROM t, t6;
SELECT true IN (true);
| ---
| - metadata:
- | - name: true IN (true)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2185,7 +2185,7 @@ SELECT true IN (true);
SELECT false IN (true);
| ---
| - metadata:
- | - name: false IN (true)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2193,7 +2193,7 @@ SELECT false IN (true);
SELECT true IN (false);
| ---
| - metadata:
- | - name: true IN (false)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2201,7 +2201,7 @@ SELECT true IN (false);
SELECT false IN (false);
| ---
| - metadata:
- | - name: false IN (false)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2209,7 +2209,7 @@ SELECT false IN (false);
SELECT true IN (true, false);
| ---
| - metadata:
- | - name: true IN (true, false)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2217,7 +2217,7 @@ SELECT true IN (true, false);
SELECT false IN (true, false);
| ---
| - metadata:
- | - name: false IN (true, false)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2225,7 +2225,7 @@ SELECT false IN (true, false);
SELECT true IN (SELECT a1 FROM t6);
| ---
| - metadata:
- | - name: true IN (SELECT a1 FROM t6)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2233,7 +2233,7 @@ SELECT true IN (SELECT a1 FROM t6);
SELECT false IN (SELECT a1 FROM t6);
| ---
| - metadata:
- | - name: false IN (SELECT a1 FROM t6)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2241,7 +2241,7 @@ SELECT false IN (SELECT a1 FROM t6);
SELECT true IN (SELECT a1 FROM t6 LIMIT 1);
| ---
| - metadata:
- | - name: true IN (SELECT a1 FROM t6 LIMIT 1)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2249,7 +2249,7 @@ SELECT true IN (SELECT a1 FROM t6 LIMIT 1);
SELECT false IN (SELECT a1 FROM t6 LIMIT 1);
| ---
| - metadata:
- | - name: false IN (SELECT a1 FROM t6 LIMIT 1)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2257,7 +2257,7 @@ SELECT false IN (SELECT a1 FROM t6 LIMIT 1);
SELECT true IN (1, 1.2, 'true', false);
| ---
| - metadata:
- | - name: true IN (1, 1.2, 'true', false)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2265,7 +2265,7 @@ SELECT true IN (1, 1.2, 'true', false);
SELECT false IN (1, 1.2, 'true', false);
| ---
| - metadata:
- | - name: false IN (1, 1.2, 'true', false)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2276,7 +2276,7 @@ SELECT a, a IN (true) FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a IN (true)
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -2287,7 +2287,7 @@ SELECT a, a IN (false) FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a IN (false)
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -2298,7 +2298,7 @@ SELECT a, a IN (true, false) FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a IN (true, false)
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -2309,7 +2309,7 @@ SELECT a, a IN (SELECT a1 FROM t6 LIMIT 1) FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a IN (SELECT a1 FROM t6 LIMIT 1)
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -2320,7 +2320,7 @@ SELECT a, a IN (SELECT a1 FROM t6) FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a IN (SELECT a1 FROM t6)
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -2331,7 +2331,7 @@ SELECT a, a IN (1, 1.2, 'true', false) FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a IN (1, 1.2, 'true', false)
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -2341,7 +2341,7 @@ SELECT a, a IN (1, 1.2, 'true', false) FROM t;
SELECT true BETWEEN true AND true;
| ---
| - metadata:
- | - name: true BETWEEN true AND true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2349,7 +2349,7 @@ SELECT true BETWEEN true AND true;
SELECT false BETWEEN true AND true;
| ---
| - metadata:
- | - name: false BETWEEN true AND true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2357,7 +2357,7 @@ SELECT false BETWEEN true AND true;
SELECT true BETWEEN false AND false;
| ---
| - metadata:
- | - name: true BETWEEN false AND false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2365,7 +2365,7 @@ SELECT true BETWEEN false AND false;
SELECT false BETWEEN false AND false;
| ---
| - metadata:
- | - name: false BETWEEN false AND false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2373,7 +2373,7 @@ SELECT false BETWEEN false AND false;
SELECT true BETWEEN true AND false;
| ---
| - metadata:
- | - name: true BETWEEN true AND false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2381,7 +2381,7 @@ SELECT true BETWEEN true AND false;
SELECT false BETWEEN true AND false;
| ---
| - metadata:
- | - name: false BETWEEN true AND false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2389,7 +2389,7 @@ SELECT false BETWEEN true AND false;
SELECT true BETWEEN false AND true;
| ---
| - metadata:
- | - name: true BETWEEN false AND true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2397,7 +2397,7 @@ SELECT true BETWEEN false AND true;
SELECT false BETWEEN false AND true;
| ---
| - metadata:
- | - name: false BETWEEN false AND true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2408,7 +2408,7 @@ SELECT a, a BETWEEN true AND true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a BETWEEN true AND true
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -2419,7 +2419,7 @@ SELECT a, a BETWEEN false AND false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a BETWEEN false AND false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -2430,7 +2430,7 @@ SELECT a, a BETWEEN true AND false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a BETWEEN true AND false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -2441,7 +2441,7 @@ SELECT a, a BETWEEN false AND true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a BETWEEN false AND true
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -2466,7 +2466,7 @@ SELECT true AND 2;
SELECT false AND 2;
| ---
| - metadata:
- | - name: false AND 2
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2489,7 +2489,7 @@ SELECT 2 AND true;
SELECT 2 AND false;
| ---
| - metadata:
- | - name: 2 AND false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2556,7 +2556,7 @@ SELECT b, false AND b FROM t7;
| - metadata:
| - name: B
| type: integer
- | - name: false AND b
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [123, false]
@@ -2581,7 +2581,7 @@ SELECT b, b AND false FROM t7;
| - metadata:
| - name: B
| type: integer
- | - name: b AND false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [123, false]
@@ -3861,7 +3861,7 @@ SELECT a2, b, b != a2 FROM t6, t7;
SELECT true IN (0, 1, 2, 3);
| ---
| - metadata:
- | - name: true IN (0, 1, 2, 3)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -3869,7 +3869,7 @@ SELECT true IN (0, 1, 2, 3);
SELECT false IN (0, 1, 2, 3);
| ---
| - metadata:
- | - name: false IN (0, 1, 2, 3)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -3889,7 +3889,7 @@ SELECT a1, a1 IN (0, 1, 2, 3) FROM t6
| - metadata:
| - name: A1
| type: boolean
- | - name: a1 IN (0, 1, 2, 3)
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -3935,7 +3935,7 @@ SELECT true AND 2.3;
SELECT false AND 2.3;
| ---
| - metadata:
- | - name: false AND 2.3
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -3958,7 +3958,7 @@ SELECT 2.3 AND true;
SELECT 2.3 AND false;
| ---
| - metadata:
- | - name: 2.3 AND false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -4025,7 +4025,7 @@ SELECT c, false AND c FROM t8;
| - metadata:
| - name: C
| type: number
- | - name: false AND c
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [4.56, false]
@@ -4050,7 +4050,7 @@ SELECT c, c AND false FROM t8;
| - metadata:
| - name: C
| type: number
- | - name: c AND false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [4.56, false]
@@ -5006,7 +5006,7 @@ SELECT a2, c, c != a2 FROM t6, t8;
SELECT true IN (0.1, 1.2, 2.3, 3.4);
| ---
| - metadata:
- | - name: true IN (0.1, 1.2, 2.3, 3.4)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5014,7 +5014,7 @@ SELECT true IN (0.1, 1.2, 2.3, 3.4);
SELECT false IN (0.1, 1.2, 2.3, 3.4);
| ---
| - metadata:
- | - name: false IN (0.1, 1.2, 2.3, 3.4)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5022,7 +5022,7 @@ SELECT false IN (0.1, 1.2, 2.3, 3.4);
SELECT a1 IN (0.1, 1.2, 2.3, 3.4) FROM t6 LIMIT 1;
| ---
| - metadata:
- | - name: a1 IN (0.1, 1.2, 2.3, 3.4)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5030,7 +5030,7 @@ SELECT a1 IN (0.1, 1.2, 2.3, 3.4) FROM t6 LIMIT 1;
SELECT a2 IN (0.1, 1.2, 2.3, 3.4) FROM t6 LIMIT 1;
| ---
| - metadata:
- | - name: a2 IN (0.1, 1.2, 2.3, 3.4)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5095,7 +5095,7 @@ SELECT true AND 'abc';
SELECT false AND 'abc';
| ---
| - metadata:
- | - name: false AND 'abc'
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5118,7 +5118,7 @@ SELECT 'abc' AND true;
SELECT 'abc' AND false;
| ---
| - metadata:
- | - name: '''abc'' AND false'
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5185,7 +5185,7 @@ SELECT d, false AND d FROM t9;
| - metadata:
| - name: D
| type: string
- | - name: false AND d
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - ['AsdF', false]
@@ -5210,7 +5210,7 @@ SELECT d, d AND false FROM t9;
| - metadata:
| - name: D
| type: string
- | - name: d AND false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - ['AsdF', false]
@@ -5470,7 +5470,7 @@ SELECT true AND 'TRUE';
SELECT false AND 'TRUE';
| ---
| - metadata:
- | - name: false AND 'TRUE'
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5493,7 +5493,7 @@ SELECT 'TRUE' AND true;
SELECT 'TRUE' AND false;
| ---
| - metadata:
- | - name: '''TRUE'' AND false'
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5560,7 +5560,7 @@ SELECT d, false AND d FROM t9 WHERE d = 'TRUE';
| - metadata:
| - name: D
| type: string
- | - name: false AND d
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - ['TRUE', false]
@@ -5585,7 +5585,7 @@ SELECT d, d AND false FROM t9 WHERE d = 'TRUE';
| - metadata:
| - name: D
| type: string
- | - name: d AND false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - ['TRUE', false]
@@ -5650,7 +5650,7 @@ SELECT true AND 'true';
SELECT false AND 'true';
| ---
| - metadata:
- | - name: false AND 'true'
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5673,7 +5673,7 @@ SELECT 'true' AND true;
SELECT 'true' AND false;
| ---
| - metadata:
- | - name: '''true'' AND false'
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5740,7 +5740,7 @@ SELECT d, false AND d FROM t9 WHERE d = 'true';
| - metadata:
| - name: D
| type: string
- | - name: false AND d
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - ['true', false]
@@ -5765,7 +5765,7 @@ SELECT d, d AND false FROM t9 WHERE d = 'true';
| - metadata:
| - name: D
| type: string
- | - name: d AND false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - ['true', false]
@@ -5830,7 +5830,7 @@ SELECT true AND 'FALSE';
SELECT false AND 'FALSE';
| ---
| - metadata:
- | - name: false AND 'FALSE'
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5853,7 +5853,7 @@ SELECT 'FALSE' AND true;
SELECT 'FALSE' AND false;
| ---
| - metadata:
- | - name: '''FALSE'' AND false'
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5920,7 +5920,7 @@ SELECT d, false AND d FROM t9 WHERE d = 'FALSE';
| - metadata:
| - name: D
| type: string
- | - name: false AND d
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - ['FALSE', false]
@@ -5945,7 +5945,7 @@ SELECT d, d AND false FROM t9 WHERE d = 'FALSE';
| - metadata:
| - name: D
| type: string
- | - name: d AND false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - ['FALSE', false]
@@ -6010,7 +6010,7 @@ SELECT true AND 'false';
SELECT false AND 'false';
| ---
| - metadata:
- | - name: false AND 'false'
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -6033,7 +6033,7 @@ SELECT 'false' AND true;
SELECT 'false' AND false;
| ---
| - metadata:
- | - name: '''false'' AND false'
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -6100,7 +6100,7 @@ SELECT d, false AND d FROM t9 WHERE d = 'false';
| - metadata:
| - name: D
| type: string
- | - name: false AND d
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - ['false', false]
@@ -6125,7 +6125,7 @@ SELECT d, d AND false FROM t9 WHERE d = 'false';
| - metadata:
| - name: D
| type: string
- | - name: d AND false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - ['false', false]
diff --git a/test/sql/collation.result b/test/sql/collation.result
index 4e4c27ef0..b1035d569 100644
--- a/test/sql/collation.result
+++ b/test/sql/collation.result
@@ -111,7 +111,7 @@ box.execute([[SELECT descriptor, upper(letter), letter FROM tu where UPPER(lette
- metadata:
- name: DESCRIPTOR
type: string
- - name: upper(letter)
+ - name: _COLUMN_2
type: string
- name: LETTER
type: string
@@ -124,7 +124,7 @@ box.execute([[SELECT descriptor, upper(letter COLLATE "GERMAN"), letter FROM tu
- metadata:
- name: DESCRIPTOR
type: string
- - name: upper(letter COLLATE "GERMAN")
+ - name: _COLUMN_2
type: string
- name: LETTER
type: string
@@ -335,14 +335,14 @@ box.execute("SELECT a FROM t UNION SELECT c FROM t;")
box.execute("SELECT c COLLATE \"binary\" FROM t UNION SELECT a FROM t;")
---
- metadata:
- - name: c COLLATE "binary"
+ - name: _COLUMN_1
type: string
rows: []
...
box.execute("SELECT b COLLATE \"unicode\" FROM t UNION SELECT a FROM t;")
---
- metadata:
- - name: b COLLATE "unicode"
+ - name: _COLUMN_1
type: string
rows: []
...
@@ -1128,7 +1128,7 @@ box.execute("INSERT INTO jj VALUES (1,'A'), (2,'a')")
box.execute("SELECT DISTINCT trim(s2) FROM jj;")
---
- metadata:
- - name: trim(s2)
+ - name: _COLUMN_1
type: string
rows:
- ['A']
@@ -1140,7 +1140,7 @@ box.execute("INSERT INTO jj VALUES (3, 'aS'), (4, 'AS');")
box.execute("SELECT DISTINCT replace(s2, 'S', 's') FROM jj;")
---
- metadata:
- - name: replace(s2, 'S', 's')
+ - name: _COLUMN_1
type: string
rows:
- ['A']
@@ -1149,7 +1149,7 @@ box.execute("SELECT DISTINCT replace(s2, 'S', 's') FROM jj;")
box.execute("SELECT DISTINCT substr(s2, 1, 1) FROM jj;")
---
- metadata:
- - name: substr(s2, 1, 1)
+ - name: _COLUMN_1
type: string
rows:
- ['A']
diff --git a/test/sql/errinj.result b/test/sql/errinj.result
index 68c001f28..c41739bb7 100644
--- a/test/sql/errinj.result
+++ b/test/sql/errinj.result
@@ -120,7 +120,7 @@ insert_res
select_res
---
- metadata:
- - name: '1'
+ - name: _COLUMN_1
type: integer
rows:
- [1]
diff --git a/test/sql/foreign-keys.result b/test/sql/foreign-keys.result
index f1d973443..3093b5852 100644
--- a/test/sql/foreign-keys.result
+++ b/test/sql/foreign-keys.result
@@ -357,7 +357,7 @@ box.execute('ALTER TABLE tc ADD CONSTRAINT fk1 FOREIGN KEY (id) REFERENCES tp(id
box.execute('SELECT row_count();')
---
- metadata:
- - name: row_count()
+ - name: _COLUMN_1
type: integer
rows:
- [1]
@@ -374,7 +374,7 @@ box.execute('ALTER TABLE tc DROP CONSTRAINT fk1;')
box.execute('SELECT row_count();')
---
- metadata:
- - name: row_count()
+ - name: _COLUMN_1
type: integer
rows:
- [1]
diff --git a/test/sql/full_metadata.result b/test/sql/full_metadata.result
index 5a93c41ec..31bea3786 100644
--- a/test/sql/full_metadata.result
+++ b/test/sql/full_metadata.result
@@ -57,7 +57,7 @@ execute("SELECT 'aSd' COLLATE \"unicode_ci\";")
| - metadata:
| - type: string
| span: '''aSd'' COLLATE "unicode_ci"'
- | name: '''aSd'' COLLATE "unicode_ci"'
+ | name: _COLUMN_1
| collation: unicode_ci
| rows:
| - ['aSd']
@@ -78,7 +78,7 @@ execute("SELECT c COLLATE \"unicode\" FROM t;")
| - metadata:
| - type: string
| span: c COLLATE "unicode"
- | name: c COLLATE "unicode"
+ | name: _COLUMN_1
| collation: unicode
| rows:
| - ['aSd']
@@ -165,7 +165,7 @@ execute("SELECT *, id + 1 AS x, a AS y, c || 'abc' FROM t;")
| is_nullable: false
| - type: string
| span: c || 'abc'
- | name: c || 'abc'
+ | name: _COLUMN_6
| rows:
| - [1, 1, 'aSd', 2, 1, 'aSdabc']
| ...
@@ -185,8 +185,8 @@ execute("SELECT * FROM v;")
| name: Y
| is_nullable: false
| - type: string
- | span: c || 'abc'
- | name: c || 'abc'
+ | span: _COLUMN_3
+ | name: _COLUMN_3
| rows:
| - [2, 1, 'aSdabc']
| ...
diff --git a/test/sql/func-recreate.result b/test/sql/func-recreate.result
index 3709df787..36e6b1fc4 100644
--- a/test/sql/func-recreate.result
+++ b/test/sql/func-recreate.result
@@ -48,7 +48,7 @@ test_run:cmd("setopt delimiter ''");
ch:get()
---
- metadata:
- - name: WAITFOR(0.2)
+ - name: _COLUMN_1
type: number
rows:
- [0.2]
diff --git a/test/sql/gh-3199-no-mem-leaks.result b/test/sql/gh-3199-no-mem-leaks.result
index d8590779a..dcd05c534 100644
--- a/test/sql/gh-3199-no-mem-leaks.result
+++ b/test/sql/gh-3199-no-mem-leaks.result
@@ -32,7 +32,7 @@ box.execute('SELECT x, y, x + y FROM test ORDER BY y')
type: integer
- name: Y
type: integer
- - name: x + y
+ - name: _COLUMN_3
type: integer
rows:
- [1, 1, 2]
@@ -49,7 +49,7 @@ box.execute('SELECT x, y, x + y FROM test ORDER BY y')
type: integer
- name: Y
type: integer
- - name: x + y
+ - name: _COLUMN_3
type: integer
rows:
- [1, 1, 2]
@@ -62,7 +62,7 @@ box.execute('SELECT x, y, x + y FROM test ORDER BY y')
type: integer
- name: Y
type: integer
- - name: x + y
+ - name: _COLUMN_3
type: integer
rows:
- [1, 1, 2]
@@ -75,7 +75,7 @@ box.execute('SELECT x, y, x + y FROM test ORDER BY y')
type: integer
- name: Y
type: integer
- - name: x + y
+ - name: _COLUMN_3
type: integer
rows:
- [1, 1, 2]
@@ -88,7 +88,7 @@ box.execute('SELECT x, y, x + y FROM test ORDER BY y')
type: integer
- name: Y
type: integer
- - name: x + y
+ - name: _COLUMN_3
type: integer
rows:
- [1, 1, 2]
@@ -115,7 +115,7 @@ box.execute('SELECT a, id + 2, b FROM test2 WHERE b < id * 2 ORDER BY a ')
- metadata:
- name: A
type: string
- - name: id + 2
+ - name: _COLUMN_2
type: integer
- name: B
type: integer
@@ -134,7 +134,7 @@ box.execute('SELECT a, id + 2 * b, a FROM test2 WHERE b < id * 2 ORDER BY a ')
- metadata:
- name: A
type: string
- - name: id + 2 * b
+ - name: _COLUMN_2
type: integer
- name: A
type: string
@@ -149,7 +149,7 @@ box.execute('SELECT a, id + 2 * b, a FROM test2 WHERE b < id * 2 ORDER BY a ')
- metadata:
- name: A
type: string
- - name: id + 2 * b
+ - name: _COLUMN_2
type: integer
- name: A
type: string
@@ -164,7 +164,7 @@ box.execute('SELECT a, id + 2 * b, a FROM test2 WHERE b < id * 2 ORDER BY a ')
- metadata:
- name: A
type: string
- - name: id + 2 * b
+ - name: _COLUMN_2
type: integer
- name: A
type: string
@@ -183,7 +183,7 @@ box.execute('SELECT x, y + 3 * b, b FROM test2, test WHERE b = x')
- metadata:
- name: X
type: integer
- - name: y + 3 * b
+ - name: _COLUMN_2
type: integer
- name: B
type: integer
@@ -196,7 +196,7 @@ box.execute('SELECT x, y + 3 * b, b FROM test2, test WHERE b = x')
- metadata:
- name: X
type: integer
- - name: y + 3 * b
+ - name: _COLUMN_2
type: integer
- name: B
type: integer
@@ -209,7 +209,7 @@ box.execute('SELECT x, y + 3 * b, b FROM test2, test WHERE b = x')
- metadata:
- name: X
type: integer
- - name: y + 3 * b
+ - name: _COLUMN_2
type: integer
- name: B
type: integer
diff --git a/test/sql/gh-3888-values-blob-assert.result b/test/sql/gh-3888-values-blob-assert.result
index 0a1af28f2..d2e27efd9 100644
--- a/test/sql/gh-3888-values-blob-assert.result
+++ b/test/sql/gh-3888-values-blob-assert.result
@@ -1,3 +1,4 @@
+-- test-run result file version 2
-- sql: assertion fault on VALUES #3888
--
-- Make sure that tokens representing values of integer, float,
@@ -5,79 +6,87 @@
-- keywords of the same names.
--
test_run = require('test_run').new()
----
-...
+ | ---
+ | ...
engine = test_run:get_cfg('engine')
----
-...
+ | ---
+ | ...
_ = box.space._session_settings:update('sql_default_engine', {{'=', 2, engine}})
----
-...
+ | ---
+ | ...
+
-- check 'VALUES' against typedef keywords (should fail)
box.execute('VALUES(scalar)')
----
-- null
-- Syntax error at line 1 near 'scalar'
-...
+ | ---
+ | - null
+ | - Syntax error at line 1 near 'scalar'
+ | ...
box.execute('VALUES(float)')
----
-- null
-- Syntax error at line 1 near 'float'
-...
+ | ---
+ | - null
+ | - Syntax error at line 1 near 'float'
+ | ...
+
-- check 'SELECT' against typedef keywords (should fail)
box.execute('SELECT scalar')
----
-- null
-- Syntax error at line 1 near 'scalar'
-...
+ | ---
+ | - null
+ | - Syntax error at line 1 near 'scalar'
+ | ...
box.execute('SELECT float')
----
-- null
-- Syntax error at line 1 near 'float'
-...
+ | ---
+ | - null
+ | - Syntax error at line 1 near 'float'
+ | ...
+
-- check 'VALUES' against ID (should fail)
box.execute('VALUES(TheColumnName)')
----
-- null
-- Can’t resolve field 'THECOLUMNNAME'
-...
+ | ---
+ | - null
+ | - Can’t resolve field 'THECOLUMNNAME'
+ | ...
+
-- check 'SELECT' against ID (should fail)
box.execute('SELECT TheColumnName')
----
-- null
-- Can’t resolve field 'THECOLUMNNAME'
-...
+ | ---
+ | - null
+ | - Can’t resolve field 'THECOLUMNNAME'
+ | ...
+
-- check 'VALUES' well-formed expression (returns value)
box.execute('VALUES(-0.5e-2)')
----
-- metadata:
- - name: column1
- type: double
- rows:
- - [-0.005]
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: double
+ | rows:
+ | - [-0.005]
+ | ...
box.execute('SELECT X\'507265766564\'')
----
-- metadata:
- - name: X'507265766564'
- type: varbinary
- rows:
- - ['Preved']
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: varbinary
+ | rows:
+ | - ['Preved']
+ | ...
+
-- check 'SELECT' well-formed expression (return value)
box.execute('SELECT 3.14')
----
-- metadata:
- - name: '3.14'
- type: double
- rows:
- - [3.14]
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: double
+ | rows:
+ | - [3.14]
+ | ...
box.execute('SELECT X\'4D6564766564\'')
----
-- metadata:
- - name: X'4D6564766564'
- type: varbinary
- rows:
- - ['Medved']
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: varbinary
+ | rows:
+ | - ['Medved']
+ | ...
+
+
diff --git a/test/sql/icu-upper-lower.result b/test/sql/icu-upper-lower.result
index f7b9dfa38..8acaed2d4 100644
--- a/test/sql/icu-upper-lower.result
+++ b/test/sql/icu-upper-lower.result
@@ -23,11 +23,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Zəfər, jaketini də, papağını da götür, bu axşam hava çox soyuq
- olacaq. ')
+ - name: _COLUMN_1
type: string
- - name: upper(' Zəfər, jaketini də, papağını da götür, bu axşam hava çox soyuq
- olacaq. ')
+ - name: _COLUMN_2
type: string
rows:
- [' zəfər, jaketini də, papağını da götür, bu axşam hava çox soyuq olacaq. ',
@@ -38,9 +36,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' The quick brown fox jumps over the lazy dog. ')
+ - name: _COLUMN_1
type: string
- - name: upper(' The quick brown fox jumps over the lazy dog. ')
+ - name: _COLUMN_2
type: string
rows:
- [' the quick brown fox jumps over the lazy dog. ', ' THE QUICK BROWN FOX
@@ -52,9 +50,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' The quick brown fox jumps over the lazy dog. ')
+ - name: _COLUMN_1
type: string
- - name: upper(' The quick brown fox jumps over the lazy dog. ')
+ - name: _COLUMN_2
type: string
rows:
- [' the quick brown fox jumps over the lazy dog. ', ' THE QUICK BROWN FOX
@@ -66,11 +64,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Բել դղյակի ձախ ժամն օֆ ազգությանը ցպահանջ չճշտած վնաս էր եւ
- փառք ')
+ - name: _COLUMN_1
type: string
- - name: upper(' Բել դղյակի ձախ ժամն օֆ ազգությանը ցպահանջ չճշտած վնաս էր եւ
- փառք ')
+ - name: _COLUMN_2
type: string
rows:
- [' բել դղյակի ձախ ժամն օֆ ազգությանը ցպահանջ չճշտած վնաս էր եւ փառք ', ' ԲԵԼ
@@ -82,11 +78,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' У Іўі худы жвавы чорт у зялёнай камізэльцы пабег пад’есці фаршу
- з юшкай ')
+ - name: _COLUMN_1
type: string
- - name: upper(' У Іўі худы жвавы чорт у зялёнай камізэльцы пабег пад’есці фаршу
- з юшкай ')
+ - name: _COLUMN_2
type: string
rows:
- [' у іўі худы жвавы чорт у зялёнай камізэльцы пабег пад’есці фаршу з юшкай ',
@@ -98,11 +92,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Τάχιστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός
- ')
+ - name: _COLUMN_1
type: string
- - name: upper(' Τάχιστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός
- ')
+ - name: _COLUMN_2
type: string
rows:
- [' τάχιστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός ', ' ΤΆΧΙΣΤΗ
@@ -114,11 +106,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Chuaigh bé mhórshách le dlúthspád fíorfhinn trí hata mo dhea-phorcáin
- bhig ')
+ - name: _COLUMN_1
type: string
- - name: upper(' Chuaigh bé mhórshách le dlúthspád fíorfhinn trí hata mo dhea-phorcáin
- bhig ')
+ - name: _COLUMN_2
type: string
rows:
- [' chuaigh bé mhórshách le dlúthspád fíorfhinn trí hata mo dhea-phorcáin bhig ',
@@ -130,9 +120,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Quiere la boca exhausta vid, kiwi, piña y fugaz jamón ')
+ - name: _COLUMN_1
type: string
- - name: upper(' Quiere la boca exhausta vid, kiwi, piña y fugaz jamón ')
+ - name: _COLUMN_2
type: string
rows:
- [' quiere la boca exhausta vid, kiwi, piña y fugaz jamón ', ' QUIERE LA
@@ -144,9 +134,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' 키스의 고유조건은 입술끼리 만나야 하고 특별한 기술은 필요치 않다 ')
+ - name: _COLUMN_1
type: string
- - name: upper(' 키스의 고유조건은 입술끼리 만나야 하고 특별한 기술은 필요치 않다 ')
+ - name: _COLUMN_2
type: string
rows:
- [' 키스의 고유조건은 입술끼리 만나야 하고 특별한 기술은 필요치 않다 ', ' 키스의 고유조건은 입술끼리 만나야 하고 특별한
@@ -158,9 +148,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Glāžšķūņa rūķīši dzērumā čiepj Baha koncertflīģeļu vākus ')
+ - name: _COLUMN_1
type: string
- - name: upper(' Glāžšķūņa rūķīši dzērumā čiepj Baha koncertflīģeļu vākus ')
+ - name: _COLUMN_2
type: string
rows:
- [' glāžšķūņa rūķīši dzērumā čiepj baha koncertflīģeļu vākus ', ' GLĀŽŠĶŪŅA
@@ -172,11 +162,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Zwölf große Boxkämpfer jagen Viktor quer über den Sylter Deich
- ')
+ - name: _COLUMN_1
type: string
- - name: upper(' Zwölf große Boxkämpfer jagen Viktor quer über den Sylter Deich
- ')
+ - name: _COLUMN_2
type: string
rows:
- [' zwölf große boxkämpfer jagen viktor quer über den sylter deich ', ' ZWÖLF
@@ -188,9 +176,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Pchnąć w tę łódź jeża lub ośm skrzyń fig. ')
+ - name: _COLUMN_1
type: string
- - name: upper(' Pchnąć w tę łódź jeża lub ośm skrzyń fig. ')
+ - name: _COLUMN_2
type: string
rows:
- [' pchnąć w tę łódź jeża lub ośm skrzyń fig. ', ' PCHNĄĆ W TĘ ŁÓDŹ JEŻA
@@ -202,9 +190,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Чуєш їх, доцю, га? Кумедна ж ти, прощайся без ґольфів! ')
+ - name: _COLUMN_1
type: string
- - name: upper(' Чуєш їх, доцю, га? Кумедна ж ти, прощайся без ґольфів! ')
+ - name: _COLUMN_2
type: string
rows:
- [' чуєш їх, доцю, га? кумедна ж ти, прощайся без ґольфів! ', ' ЧУЄШ ЇХ,
@@ -216,9 +204,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Příliš žluťoučký kůň úpěl ďábelské ódy ')
+ - name: _COLUMN_1
type: string
- - name: upper(' Příliš žluťoučký kůň úpěl ďábelské ódy ')
+ - name: _COLUMN_2
type: string
rows:
- [' příliš žluťoučký kůň úpěl ďábelské ódy ', ' PŘÍLIŠ ŽLUŤOUČKÝ KŮŇ ÚPĚL
@@ -230,11 +218,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Laŭ Ludoviko Zamenhof bongustas freŝa ĉeĥa manĝaĵo kun spicoj
- ')
+ - name: _COLUMN_1
type: string
- - name: upper(' Laŭ Ludoviko Zamenhof bongustas freŝa ĉeĥa manĝaĵo kun spicoj
- ')
+ - name: _COLUMN_2
type: string
rows:
- [' laŭ ludoviko zamenhof bongustas freŝa ĉeĥa manĝaĵo kun spicoj ', ' LAŬ
@@ -246,9 +232,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' いろはにほへと ちりぬるを わかよたれそ つねならむ うゐのおくやま けふこえて あさきゆめみし ゑひもせす ')
+ - name: _COLUMN_1
type: string
- - name: upper(' いろはにほへと ちりぬるを わかよたれそ つねならむ うゐのおくやま けふこえて あさきゆめみし ゑひもせす ')
+ - name: _COLUMN_2
type: string
rows:
- [' いろはにほへと ちりぬるを わかよたれそ つねならむ うゐのおくやま けふこえて あさきゆめみし ゑひもせす ', ' いろはにほへと
@@ -260,9 +246,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: 'lower('' Pijamalı hasta yağız şoföre çabucak güvendi. EXTRA: İ '')'
+ - name: _COLUMN_1
type: string
- - name: 'upper('' Pijamalı hasta yağız şoföre çabucak güvendi. EXTRA: İ '')'
+ - name: _COLUMN_2
type: string
rows:
- [' pijamalı hasta yağız şoföre çabucak güvendi. extra: i̇ ', ' PIJAMALI
diff --git a/test/sql/integer-overflow.result b/test/sql/integer-overflow.result
index 6269cb547..f9ec63785 100644
--- a/test/sql/integer-overflow.result
+++ b/test/sql/integer-overflow.result
@@ -19,7 +19,7 @@ box.execute('SELECT (2147483647 * 2147483647 * 2147483647);')
box.execute('SELECT (-9223372036854775808 / -1);')
---
- metadata:
- - name: (-9223372036854775808 / -1)
+ - name: _COLUMN_1
type: integer
rows:
- [9223372036854775808]
@@ -32,7 +32,7 @@ box.execute('SELECT (-9223372036854775808 - 1);')
box.execute('SELECT (9223372036854775807 + 1);')
---
- metadata:
- - name: (9223372036854775807 + 1)
+ - name: _COLUMN_1
type: integer
rows:
- [9223372036854775808]
@@ -50,7 +50,7 @@ box.execute('SELECT 18446744073709551615 * 2;')
box.execute('SELECT (-9223372036854775807 * (-2));')
---
- metadata:
- - name: (-9223372036854775807 * (-2))
+ - name: _COLUMN_1
type: integer
rows:
- [18446744073709551614]
@@ -60,7 +60,7 @@ box.execute('SELECT (-9223372036854775807 * (-2));')
box.execute('SELECT 9223372036854775808;')
---
- metadata:
- - name: '9223372036854775808'
+ - name: _COLUMN_1
type: integer
rows:
- [9223372036854775808]
@@ -74,7 +74,7 @@ box.execute('SELECT -9223372036854775809;')
box.execute('SELECT 9223372036854775808 - 1;')
---
- metadata:
- - name: 9223372036854775808 - 1
+ - name: _COLUMN_1
type: integer
rows:
- [9223372036854775807]
@@ -82,7 +82,7 @@ box.execute('SELECT 9223372036854775808 - 1;')
box.execute('SELECT 18446744073709551615;')
---
- metadata:
- - name: '18446744073709551615'
+ - name: _COLUMN_1
type: integer
rows:
- [18446744073709551615]
@@ -98,7 +98,7 @@ box.execute('SELECT 18446744073709551616;')
box.execute('SELECT CAST(\'9223372036854775808\' AS INTEGER);')
---
- metadata:
- - name: CAST('9223372036854775808' AS INTEGER)
+ - name: _COLUMN_1
type: integer
rows:
- [9223372036854775808]
diff --git a/test/sql/iproto.result b/test/sql/iproto.result
index 44ba499a0..554eb6f51 100644
--- a/test/sql/iproto.result
+++ b/test/sql/iproto.result
@@ -372,11 +372,11 @@ parameters[3] = 33
cn:execute('select $2, $1, $3', parameters)
---
- metadata:
- - name: $2
+ - name: _COLUMN_1
type: integer
- - name: $1
+ - name: _COLUMN_2
type: integer
- - name: $3
+ - name: _COLUMN_3
type: integer
rows:
- [22, 11, 33]
@@ -736,7 +736,7 @@ res.metadata
cn:execute("SELECT zeroblob(1);")
---
- metadata:
- - name: zeroblob(1)
+ - name: _COLUMN_1
type: varbinary
rows:
- ["\0"]
@@ -749,7 +749,7 @@ res = cn:execute("SELECT randomblob(1);")
...
res.metadata
---
-- - name: randomblob(1)
+- - name: _COLUMN_1
type: varbinary
...
-- Type set during compilation stage, and since min/max are accept
@@ -759,7 +759,7 @@ res.metadata
cn:execute("SELECT LEAST(1, 2, 3);")
---
- metadata:
- - name: LEAST(1, 2, 3)
+ - name: _COLUMN_1
type: scalar
rows:
- [1]
@@ -767,7 +767,7 @@ cn:execute("SELECT LEAST(1, 2, 3);")
cn:execute("SELECT GREATEST(1, 2, 3);")
---
- metadata:
- - name: GREATEST(1, 2, 3)
+ - name: _COLUMN_1
type: scalar
rows:
- [3]
@@ -803,7 +803,7 @@ s = box.prepare([[ SELECT ?; ]])
s:execute({42})
---
- metadata:
- - name: '?'
+ - name: _COLUMN_1
type: integer
rows:
- [42]
diff --git a/test/sql/max-on-index.result b/test/sql/max-on-index.result
index 1cd488f85..35665ce58 100644
--- a/test/sql/max-on-index.result
+++ b/test/sql/max-on-index.result
@@ -48,7 +48,7 @@ box.execute("INSERT INTO test2 VALUES(1, 2)");
box.execute("SELECT MAX(f1) FROM test1")
---
- metadata:
- - name: MAX(f1)
+ - name: _COLUMN_1
type: scalar
rows:
- [4]
@@ -56,7 +56,7 @@ box.execute("SELECT MAX(f1) FROM test1")
box.execute("SELECT MAX(f2) FROM test1")
---
- metadata:
- - name: MAX(f2)
+ - name: _COLUMN_1
type: scalar
rows:
- [3]
@@ -64,7 +64,7 @@ box.execute("SELECT MAX(f2) FROM test1")
box.execute("SELECT MAX(f1) FROM test2")
---
- metadata:
- - name: MAX(f1)
+ - name: _COLUMN_1
type: scalar
rows:
- [1]
diff --git a/test/sql/misc.result b/test/sql/misc.result
index 0190a5897..552c5196d 100644
--- a/test/sql/misc.result
+++ b/test/sql/misc.result
@@ -1,142 +1,148 @@
+-- test-run result file version 2
test_run = require('test_run').new()
----
-...
+ | ---
+ | ...
engine = test_run:get_cfg('engine')
----
-...
+ | ---
+ | ...
_ = box.space._session_settings:update('sql_default_engine', {{'=', 2, engine}})
----
-...
+ | ---
+ | ...
+
-- Forbid multistatement queries.
box.execute('select 1;')
----
-- metadata:
- - name: '1'
- type: integer
- rows:
- - [1]
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: integer
+ | rows:
+ | - [1]
+ | ...
box.execute('select 1; select 2;')
----
-- null
-- 'At line 1 at or near position 11: keyword ''select'' is reserved. Please use double
- quotes if ''select'' is an identifier.'
-...
+ | ---
+ | - null
+ | - 'At line 1 at or near position 11: keyword ''select'' is reserved. Please use double
+ | quotes if ''select'' is an identifier.'
+ | ...
box.execute('create table t1 (id INT primary key); select 100;')
----
-- null
-- 'At line 1 at or near position 39: keyword ''select'' is reserved. Please use double
- quotes if ''select'' is an identifier.'
-...
+ | ---
+ | - null
+ | - 'At line 1 at or near position 39: keyword ''select'' is reserved. Please use double
+ | quotes if ''select'' is an identifier.'
+ | ...
box.space.t1 == nil
----
-- true
-...
+ | ---
+ | - true
+ | ...
box.execute(';')
----
-- null
-- Failed to execute an empty SQL statement
-...
+ | ---
+ | - null
+ | - Failed to execute an empty SQL statement
+ | ...
box.execute('')
----
-- null
-- Failed to execute an empty SQL statement
-...
+ | ---
+ | - null
+ | - Failed to execute an empty SQL statement
+ | ...
box.execute(' ;')
----
-- null
-- Failed to execute an empty SQL statement
-...
+ | ---
+ | - null
+ | - Failed to execute an empty SQL statement
+ | ...
box.execute('\n\n\n\t\t\t ')
----
-- null
-- Failed to execute an empty SQL statement
-...
+ | ---
+ | - null
+ | - Failed to execute an empty SQL statement
+ | ...
+
-- gh-3820: only table constraints can have a name.
--
box.execute('CREATE TABLE test (id INTEGER PRIMARY KEY, b INTEGER CONSTRAINT c1 NULL)')
----
-- null
-- 'At line 1 at or near position 68: keyword ''NULL'' is reserved. Please use double
- quotes if ''NULL'' is an identifier.'
-...
+ | ---
+ | - null
+ | - 'At line 1 at or near position 68: keyword ''NULL'' is reserved. Please use double
+ | quotes if ''NULL'' is an identifier.'
+ | ...
box.execute('CREATE TABLE test (id INTEGER PRIMARY KEY, b INTEGER CONSTRAINT c1 DEFAULT 300)')
----
-- null
-- 'At line 1 at or near position 68: keyword ''DEFAULT'' is reserved. Please use double
- quotes if ''DEFAULT'' is an identifier.'
-...
+ | ---
+ | - null
+ | - 'At line 1 at or near position 68: keyword ''DEFAULT'' is reserved. Please use double
+ | quotes if ''DEFAULT'' is an identifier.'
+ | ...
box.execute('CREATE TABLE test (id INTEGER PRIMARY KEY, b TEXT CONSTRAINT c1 COLLATE "binary")')
----
-- null
-- 'At line 1 at or near position 65: keyword ''COLLATE'' is reserved. Please use double
- quotes if ''COLLATE'' is an identifier.'
-...
+ | ---
+ | - null
+ | - 'At line 1 at or near position 65: keyword ''COLLATE'' is reserved. Please use double
+ | quotes if ''COLLATE'' is an identifier.'
+ | ...
+
-- Make sure that type of literals in meta complies with its real
-- type. For instance, typeof(0.5) is number, not integer.
--
box.execute('SELECT 1;')
----
-- metadata:
- - name: '1'
- type: integer
- rows:
- - [1]
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: integer
+ | rows:
+ | - [1]
+ | ...
box.execute('SELECT 1.5;')
----
-- metadata:
- - name: '1.5'
- type: double
- rows:
- - [1.5]
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: double
+ | rows:
+ | - [1.5]
+ | ...
box.execute('SELECT 1.0;')
----
-- metadata:
- - name: '1.0'
- type: double
- rows:
- - [1]
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: double
+ | rows:
+ | - [1]
+ | ...
box.execute('SELECT \'abc\';')
----
-- metadata:
- - name: '''abc'''
- type: string
- rows:
- - ['abc']
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: string
+ | rows:
+ | - ['abc']
+ | ...
box.execute('SELECT X\'4D6564766564\'')
----
-- metadata:
- - name: X'4D6564766564'
- type: varbinary
- rows:
- - ['Medved']
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: varbinary
+ | rows:
+ | - ['Medved']
+ | ...
+
--
-- gh-4139: assertion when reading a temporary space.
--
format = {{name = 'id', type = 'integer'}}
----
-...
+ | ---
+ | ...
s = box.schema.space.create('s',{format=format, temporary=true})
----
-...
+ | ---
+ | ...
i = s:create_index('i')
----
-...
+ | ---
+ | ...
box.execute('select * from "s"')
----
-- metadata:
- - name: id
- type: integer
- rows: []
-...
+ | ---
+ | - metadata:
+ | - name: id
+ | type: integer
+ | rows: []
+ | ...
s:drop()
----
-...
+ | ---
+ | ...
+
--
-- gh-4267: Full power of vdbe_field_ref
-- Tarantool's SQL internally stores data offset for all acceded
@@ -151,56 +157,57 @@ s:drop()
-- beginning.
---
format = {}
----
-...
+ | ---
+ | ...
t = {}
----
-...
+ | ---
+ | ...
for i = 1, 70 do \
format[i] = {name = 'FIELD'..i, type = 'unsigned'} \
t[i] = i \
end
----
-...
+ | ---
+ | ...
s = box.schema.create_space('TEST', {format = format})
----
-...
+ | ---
+ | ...
pk = s:create_index('pk', {parts = {70}})
----
-...
+ | ---
+ | ...
s:insert(t)
----
-- [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
- 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
- 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
- 63, 64, 65, 66, 67, 68, 69, 70]
-...
+ | ---
+ | - [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+ | 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
+ | 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
+ | 63, 64, 65, 66, 67, 68, 69, 70]
+ | ...
box.execute('SELECT field70, field64 FROM test')
----
-- metadata:
- - name: FIELD70
- type: unsigned
- - name: FIELD64
- type: unsigned
- rows:
- - [70, 64]
-...
+ | ---
+ | - metadata:
+ | - name: FIELD70
+ | type: unsigned
+ | - name: FIELD64
+ | type: unsigned
+ | rows:
+ | - [70, 64]
+ | ...
+
-- In the case below described optimization works fine.
pk:alter({parts = {66}})
----
-...
+ | ---
+ | ...
box.execute('SELECT field66, field68, field70 FROM test')
----
-- metadata:
- - name: FIELD66
- type: unsigned
- - name: FIELD68
- type: unsigned
- - name: FIELD70
- type: unsigned
- rows:
- - [66, 68, 70]
-...
+ | ---
+ | - metadata:
+ | - name: FIELD66
+ | type: unsigned
+ | - name: FIELD68
+ | type: unsigned
+ | - name: FIELD70
+ | type: unsigned
+ | rows:
+ | - [66, 68, 70]
+ | ...
box.space.TEST:drop()
----
-...
+ | ---
+ | ...
diff --git a/test/sql/persistency.result b/test/sql/persistency.result
index 6d14d4c4e..307b5333b 100644
--- a/test/sql/persistency.result
+++ b/test/sql/persistency.result
@@ -1,475 +1,495 @@
+-- test-run result file version 2
env = require('test_run')
----
-...
+ | ---
+ | ...
test_run = env.new()
----
-...
+ | ---
+ | ...
engine = test_run:get_cfg('engine')
----
-...
+ | ---
+ | ...
_ = box.space._session_settings:update('sql_default_engine', {{'=', 2, engine}})
----
-...
+ | ---
+ | ...
+
-- create space
box.execute("CREATE TABLE foobar (foo INT PRIMARY KEY, bar TEXT)")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
+
-- prepare data
box.execute("INSERT INTO foobar VALUES (1, 'foo')")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
box.execute("INSERT INTO foobar VALUES (2, 'bar')")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
box.execute("INSERT INTO foobar VALUES (1000, 'foobar')")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
+
box.execute("INSERT INTO foobar VALUES (1, 'duplicate')")
----
-- null
-- Duplicate key exists in unique index 'pk_unnamed_FOOBAR_1' in space 'FOOBAR'
-...
+ | ---
+ | - null
+ | - Duplicate key exists in unique index 'pk_unnamed_FOOBAR_1' in space 'FOOBAR'
+ | ...
+
-- simple select
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['foo', 1, 42, 'awesome']
- - ['bar', 2, 42, 'awesome']
- - ['foobar', 1000, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows:
+ | - ['foo', 1, 42, 'awesome']
+ | - ['bar', 2, 42, 'awesome']
+ | - ['foobar', 1000, 42, 'awesome']
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar LIMIT 2")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['foo', 1, 42, 'awesome']
- - ['bar', 2, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows:
+ | - ['foo', 1, 42, 'awesome']
+ | - ['bar', 2, 42, 'awesome']
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo=2")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['bar', 2, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows:
+ | - ['bar', 2, 42, 'awesome']
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo>2")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['foobar', 1000, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows:
+ | - ['foobar', 1000, 42, 'awesome']
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo>=2")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['bar', 2, 42, 'awesome']
- - ['foobar', 1000, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows:
+ | - ['bar', 2, 42, 'awesome']
+ | - ['foobar', 1000, 42, 'awesome']
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo=10000")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows: []
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows: []
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo>10000")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows: []
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows: []
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<2")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['foo', 1, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows:
+ | - ['foo', 1, 42, 'awesome']
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<2.001")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['foo', 1, 42, 'awesome']
- - ['bar', 2, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows:
+ | - ['foo', 1, 42, 'awesome']
+ | - ['bar', 2, 42, 'awesome']
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<=2")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['foo', 1, 42, 'awesome']
- - ['bar', 2, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows:
+ | - ['foo', 1, 42, 'awesome']
+ | - ['bar', 2, 42, 'awesome']
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<100")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['foo', 1, 42, 'awesome']
- - ['bar', 2, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows:
+ | - ['foo', 1, 42, 'awesome']
+ | - ['bar', 2, 42, 'awesome']
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE bar='foo'")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['foo', 1, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows:
+ | - ['foo', 1, 42, 'awesome']
+ | ...
box.execute("SELECT count(*) FROM foobar")
----
-- metadata:
- - name: count(*)
- type: integer
- rows:
- - [3]
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: integer
+ | rows:
+ | - [3]
+ | ...
box.execute("SELECT count(*) FROM foobar WHERE bar='foo'")
----
-- metadata:
- - name: count(*)
- type: integer
- rows:
- - [1]
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: integer
+ | rows:
+ | - [1]
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar ORDER BY bar")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['bar', 2, 42, 'awesome']
- - ['foo', 1, 42, 'awesome']
- - ['foobar', 1000, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows:
+ | - ['bar', 2, 42, 'awesome']
+ | - ['foo', 1, 42, 'awesome']
+ | - ['foobar', 1000, 42, 'awesome']
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar ORDER BY bar DESC")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['foobar', 1000, 42, 'awesome']
- - ['foo', 1, 42, 'awesome']
- - ['bar', 2, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows:
+ | - ['foobar', 1000, 42, 'awesome']
+ | - ['foo', 1, 42, 'awesome']
+ | - ['bar', 2, 42, 'awesome']
+ | ...
+
-- updates
box.execute("REPLACE INTO foobar VALUES (1, 'cacodaemon')")
----
-- row_count: 2
-...
+ | ---
+ | - row_count: 2
+ | ...
box.execute("SELECT COUNT(*) FROM foobar WHERE foo=1")
----
-- metadata:
- - name: COUNT(*)
- type: integer
- rows:
- - [1]
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: integer
+ | rows:
+ | - [1]
+ | ...
box.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'")
----
-- metadata:
- - name: COUNT(*)
- type: integer
- rows:
- - [1]
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: integer
+ | rows:
+ | - [1]
+ | ...
box.execute("DELETE FROM foobar WHERE bar='cacodaemon'")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
box.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'")
----
-- metadata:
- - name: COUNT(*)
- type: integer
- rows:
- - [0]
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: integer
+ | rows:
+ | - [0]
+ | ...
+
-- multi-index
+
-- create space
box.execute("CREATE TABLE barfoo (bar TEXT, foo NUMBER PRIMARY KEY)")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
box.execute("CREATE UNIQUE INDEX barfoo2 ON barfoo(bar)")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
+
-- prepare data
box.execute("INSERT INTO barfoo VALUES ('foo', 1)")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
box.execute("INSERT INTO barfoo VALUES ('bar', 2)")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
box.execute("INSERT INTO barfoo VALUES ('foobar', 1000)")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
+
-- create a trigger
box.execute("CREATE TRIGGER tfoobar AFTER INSERT ON foobar FOR EACH ROW BEGIN INSERT INTO barfoo VALUES ('trigger test', 9999); END")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
box.execute("SELECT \"name\", \"opts\" FROM \"_trigger\"");
----
-- metadata:
- - name: name
- type: string
- - name: opts
- type: map
- rows:
- - ['TFOOBAR', {'sql': 'CREATE TRIGGER tfoobar AFTER INSERT ON foobar FOR EACH ROW
- BEGIN INSERT INTO barfoo VALUES (''trigger test'', 9999); END'}]
-...
+ | ---
+ | - metadata:
+ | - name: name
+ | type: string
+ | - name: opts
+ | type: map
+ | rows:
+ | - ['TFOOBAR', {'sql': 'CREATE TRIGGER tfoobar AFTER INSERT ON foobar FOR EACH ROW
+ | BEGIN INSERT INTO barfoo VALUES (''trigger test'', 9999); END'}]
+ | ...
+
-- Many entries
box.execute("CREATE TABLE t1(a INT,b INT,c INT,PRIMARY KEY(b,c));")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
box.execute("WITH RECURSIVE cnt(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM cnt WHERE x<1000) INSERT INTO t1 SELECT x, x%40, x/40 FROM cnt;")
----
-- row_count: 1000
-...
+ | ---
+ | - row_count: 1000
+ | ...
box.execute("SELECT a FROM t1 ORDER BY b, a LIMIT 10 OFFSET 20;");
----
-- metadata:
- - name: A
- type: integer
- rows:
- - [840]
- - [880]
- - [920]
- - [960]
- - [1000]
- - [1]
- - [41]
- - [81]
- - [121]
- - [161]
-...
+ | ---
+ | - metadata:
+ | - name: A
+ | type: integer
+ | rows:
+ | - [840]
+ | - [880]
+ | - [920]
+ | - [960]
+ | - [1000]
+ | - [1]
+ | - [41]
+ | - [81]
+ | - [121]
+ | - [161]
+ | ...
+
test_run:cmd('restart server default');
+ |
+
-- prove that trigger survived
box.execute("SELECT \"name\", \"opts\" FROM \"_trigger\"");
----
-- metadata:
- - name: name
- type: string
- - name: opts
- type: map
- rows:
- - ['TFOOBAR', {'sql': 'CREATE TRIGGER tfoobar AFTER INSERT ON foobar FOR EACH ROW
- BEGIN INSERT INTO barfoo VALUES (''trigger test'', 9999); END'}]
-...
+ | ---
+ | - metadata:
+ | - name: name
+ | type: string
+ | - name: opts
+ | type: map
+ | rows:
+ | - ['TFOOBAR', {'sql': 'CREATE TRIGGER tfoobar AFTER INSERT ON foobar FOR EACH ROW
+ | BEGIN INSERT INTO barfoo VALUES (''trigger test'', 9999); END'}]
+ | ...
+
-- ... functional
box.execute("INSERT INTO foobar VALUES ('foobar trigger test', 8888)")
----
-- null
-- 'Type mismatch: can not convert foobar trigger test to integer'
-...
+ | ---
+ | - null
+ | - 'Type mismatch: can not convert foobar trigger test to integer'
+ | ...
box.execute("SELECT * FROM barfoo WHERE foo = 9999");
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: number
- rows: []
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: number
+ | rows: []
+ | ...
+
-- and still persistent
box.execute("SELECT \"name\", \"opts\" FROM \"_trigger\"")
----
-- metadata:
- - name: name
- type: string
- - name: opts
- type: map
- rows:
- - ['TFOOBAR', {'sql': 'CREATE TRIGGER tfoobar AFTER INSERT ON foobar FOR EACH ROW
- BEGIN INSERT INTO barfoo VALUES (''trigger test'', 9999); END'}]
-...
+ | ---
+ | - metadata:
+ | - name: name
+ | type: string
+ | - name: opts
+ | type: map
+ | rows:
+ | - ['TFOOBAR', {'sql': 'CREATE TRIGGER tfoobar AFTER INSERT ON foobar FOR EACH ROW
+ | BEGIN INSERT INTO barfoo VALUES (''trigger test'', 9999); END'}]
+ | ...
+
-- and can be dropped just once
box.execute("DROP TRIGGER tfoobar")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
-- Should error
box.execute("DROP TRIGGER tfoobar")
----
-- null
-- Trigger 'TFOOBAR' doesn't exist
-...
+ | ---
+ | - null
+ | - Trigger 'TFOOBAR' doesn't exist
+ | ...
-- Should be empty
box.execute("SELECT \"name\", \"opts\" FROM \"_trigger\"")
----
-- metadata:
- - name: name
- type: string
- - name: opts
- type: map
- rows: []
-...
+ | ---
+ | - metadata:
+ | - name: name
+ | type: string
+ | - name: opts
+ | type: map
+ | rows: []
+ | ...
+
-- prove barfoo2 still exists
box.execute("INSERT INTO barfoo VALUES ('xfoo', 1)")
----
-- null
-- Duplicate key exists in unique index 'pk_unnamed_BARFOO_1' in space 'BARFOO'
-...
+ | ---
+ | - null
+ | - Duplicate key exists in unique index 'pk_unnamed_BARFOO_1' in space 'BARFOO'
+ | ...
+
box.execute("SELECT * FROM barfoo")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: number
- rows:
- - ['foo', 1]
- - ['bar', 2]
- - ['foobar', 1000]
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: number
+ | rows:
+ | - ['foo', 1]
+ | - ['bar', 2]
+ | - ['foobar', 1000]
+ | ...
box.execute("SELECT * FROM foobar");
----
-- metadata:
- - name: FOO
- type: integer
- - name: BAR
- type: string
- rows:
- - [2, 'bar']
- - [1000, 'foobar']
-...
+ | ---
+ | - metadata:
+ | - name: FOO
+ | type: integer
+ | - name: BAR
+ | type: string
+ | rows:
+ | - [2, 'bar']
+ | - [1000, 'foobar']
+ | ...
box.execute("SELECT a FROM t1 ORDER BY b, a LIMIT 10 OFFSET 20;");
----
-- metadata:
- - name: A
- type: integer
- rows:
- - [840]
- - [880]
- - [920]
- - [960]
- - [1000]
- - [1]
- - [41]
- - [81]
- - [121]
- - [161]
-...
+ | ---
+ | - metadata:
+ | - name: A
+ | type: integer
+ | rows:
+ | - [840]
+ | - [880]
+ | - [920]
+ | - [960]
+ | - [1000]
+ | - [1]
+ | - [41]
+ | - [81]
+ | - [121]
+ | - [161]
+ | ...
+
-- cleanup
box.execute("DROP TABLE foobar")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
box.execute("DROP TABLE barfoo")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
box.execute("DROP TABLE t1")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
diff --git a/test/sql/prepared.result b/test/sql/prepared.result
index 5a16ea3b1..f3f79954e 100644
--- a/test/sql/prepared.result
+++ b/test/sql/prepared.result
@@ -425,13 +425,13 @@ s = prepare("SELECT count(*), count(a - 3), max(b), abs(id) FROM test WHERE b =
execute(s.stmt_id)
| ---
| - metadata:
- | - name: count(*)
+ | - name: _COLUMN_1
| type: integer
- | - name: count(a - 3)
+ | - name: _COLUMN_2
| type: integer
- | - name: max(b)
+ | - name: _COLUMN_3
| type: scalar
- | - name: abs(id)
+ | - name: _COLUMN_4
| type: number
| rows:
| - [1, 1, '3', 1]
@@ -439,13 +439,13 @@ execute(s.stmt_id)
execute(s.stmt_id)
| ---
| - metadata:
- | - name: count(*)
+ | - name: _COLUMN_1
| type: integer
- | - name: count(a - 3)
+ | - name: _COLUMN_2
| type: integer
- | - name: max(b)
+ | - name: _COLUMN_3
| type: scalar
- | - name: abs(id)
+ | - name: _COLUMN_4
| type: number
| rows:
| - [1, 1, '3', 1]
@@ -480,7 +480,7 @@ res = execute(s.stmt_id)
| ...
res.metadata
| ---
- | - - name: group_concat(TRIM(TRAILING FROM t),x'0a')
+ | - - name: _COLUMN_1
| type: string
| ...
unprepare(s.stmt_id)
diff --git a/test/sql/row-count.result b/test/sql/row-count.result
index 02acd79b5..71b932285 100644
--- a/test/sql/row-count.result
+++ b/test/sql/row-count.result
@@ -16,7 +16,7 @@ box.execute("CREATE TABLE t1 (s1 VARCHAR(10) PRIMARY KEY);")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: _COLUMN_1
type: integer
rows:
- [1]
@@ -24,7 +24,7 @@ box.execute("SELECT ROW_COUNT();")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: _COLUMN_1
type: integer
rows:
- [0]
@@ -36,7 +36,7 @@ box.execute("CREATE TABLE t2 (s1 VARCHAR(10) PRIMARY KEY, s2 VARCHAR(10) REFEREN
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: _COLUMN_1
type: integer
rows:
- [1]
@@ -52,7 +52,7 @@ box.execute("INSERT INTO t3 VALUES (0, 0, 0);")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: _COLUMN_1
type: integer
rows:
- [1]
@@ -64,7 +64,7 @@ box.execute("CREATE TRIGGER x AFTER DELETE ON t1 FOR EACH ROW BEGIN UPDATE t3 SE
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: _COLUMN_1
type: integer
rows:
- [1]
@@ -76,7 +76,7 @@ box.execute("INSERT INTO t1 VALUES ('a');")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: _COLUMN_1
type: integer
rows:
- [1]
@@ -88,7 +88,7 @@ box.execute("INSERT INTO t2 VALUES ('a','a');")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: _COLUMN_1
type: integer
rows:
- [1]
@@ -100,7 +100,7 @@ box.execute("INSERT INTO t1 VALUES ('b'), ('c'), ('d');")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: _COLUMN_1
type: integer
rows:
- [3]
@@ -113,7 +113,7 @@ box.execute("REPLACE INTO t2 VALUES('a', 'c');")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: _COLUMN_1
type: integer
rows:
- [2]
@@ -125,7 +125,7 @@ box.execute("DELETE FROM t1;")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: _COLUMN_1
type: integer
rows:
- [4]
@@ -141,7 +141,7 @@ box.execute("TRUNCATE TABLE t3;")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: _COLUMN_1
type: integer
rows:
- [0]
@@ -157,7 +157,7 @@ box.execute("UPDATE t3 SET i2 = 666;")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: _COLUMN_1
type: integer
rows:
- [3]
@@ -172,7 +172,7 @@ box.execute("DELETE FROM t3 WHERE 0 = 0;")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: _COLUMN_1
type: integer
rows:
- [3]
@@ -188,7 +188,7 @@ box.execute("DELETE FROM t3")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: _COLUMN_1
type: integer
rows:
- [3]
@@ -222,7 +222,7 @@ box.execute("DELETE FROM tt1 WHERE id = 2;")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: _COLUMN_1
type: integer
rows:
- [1]
@@ -252,7 +252,7 @@ box.execute("START TRANSACTION;")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: _COLUMN_1
type: integer
rows:
- [0]
@@ -264,7 +264,7 @@ box.execute("COMMIT;")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: _COLUMN_1
type: integer
rows:
- [0]
@@ -277,7 +277,7 @@ box.execute("COMMIT;")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: _COLUMN_1
type: integer
rows:
- [0]
@@ -286,7 +286,7 @@ box.execute("SELECT ROW_COUNT();")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: _COLUMN_1
type: integer
rows:
- [0]
@@ -308,7 +308,7 @@ box.execute("EXPLAIN QUERY PLAN INSERT INTO t1 VALUES ('b'), ('c'), ('d');")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: _COLUMN_1
type: integer
rows:
- [0]
diff --git a/test/sql/transition.result b/test/sql/transition.result
index c14055b4e..0decc528c 100644
--- a/test/sql/transition.result
+++ b/test/sql/transition.result
@@ -38,9 +38,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: _COLUMN_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
type: string
rows:
- ['foo', 1, 42, 'awesome']
@@ -54,9 +54,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar LIMIT 2")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: _COLUMN_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
type: string
rows:
- ['foo', 1, 42, 'awesome']
@@ -69,9 +69,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo=2")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: _COLUMN_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
type: string
rows:
- ['bar', 2, 42, 'awesome']
@@ -83,9 +83,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo>2")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: _COLUMN_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
type: string
rows:
- ['foobar', 1000, 42, 'awesome']
@@ -97,9 +97,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo>=2")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: _COLUMN_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
type: string
rows:
- ['bar', 2, 42, 'awesome']
@@ -112,9 +112,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo=10000")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: _COLUMN_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
type: string
rows: []
...
@@ -125,9 +125,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo>10000")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: _COLUMN_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
type: string
rows: []
...
@@ -138,9 +138,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<2")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: _COLUMN_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
type: string
rows:
- ['foo', 1, 42, 'awesome']
@@ -152,9 +152,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<2.001")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: _COLUMN_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
type: string
rows:
- ['foo', 1, 42, 'awesome']
@@ -167,9 +167,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<=2")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: _COLUMN_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
type: string
rows:
- ['foo', 1, 42, 'awesome']
@@ -182,9 +182,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<100")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: _COLUMN_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
type: string
rows:
- ['foo', 1, 42, 'awesome']
@@ -197,9 +197,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE bar='foo'")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: _COLUMN_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
type: string
rows:
- ['foo', 1, 42, 'awesome']
@@ -207,7 +207,7 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE bar='foo'")
box.execute("SELECT count(*) FROM foobar")
---
- metadata:
- - name: count(*)
+ - name: _COLUMN_1
type: integer
rows:
- [3]
@@ -215,7 +215,7 @@ box.execute("SELECT count(*) FROM foobar")
box.execute("SELECT count(*) FROM foobar WHERE bar='foo'")
---
- metadata:
- - name: count(*)
+ - name: _COLUMN_1
type: integer
rows:
- [1]
@@ -227,9 +227,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar ORDER BY bar")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: _COLUMN_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
type: string
rows:
- ['bar', 2, 42, 'awesome']
@@ -243,9 +243,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar ORDER BY bar DESC")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: _COLUMN_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
type: string
rows:
- ['foobar', 1000, 42, 'awesome']
@@ -260,7 +260,7 @@ box.execute("REPLACE INTO foobar VALUES (1, 'cacodaemon')")
box.execute("SELECT COUNT(*) FROM foobar WHERE foo=1")
---
- metadata:
- - name: COUNT(*)
+ - name: _COLUMN_1
type: integer
rows:
- [1]
@@ -268,7 +268,7 @@ box.execute("SELECT COUNT(*) FROM foobar WHERE foo=1")
box.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'")
---
- metadata:
- - name: COUNT(*)
+ - name: _COLUMN_1
type: integer
rows:
- [1]
@@ -280,7 +280,7 @@ box.execute("DELETE FROM foobar WHERE bar='cacodaemon'")
box.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'")
---
- metadata:
- - name: COUNT(*)
+ - name: _COLUMN_1
type: integer
rows:
- [0]
diff --git a/test/sql/types.result b/test/sql/types.result
index 38e4385ad..3520220a0 100644
--- a/test/sql/types.result
+++ b/test/sql/types.result
@@ -54,8 +54,8 @@ box.execute("CREATE VIEW v1 AS SELECT b + a, b - a FROM t1;")
...
box.space.V1:format()
---
-- [{'type': 'number', 'nullable_action': 'none', 'name': 'b + a', 'is_nullable': true},
- {'type': 'number', 'nullable_action': 'none', 'name': 'b - a', 'is_nullable': true}]
+- [{'type': 'number', 'nullable_action': 'none', 'name': '_COLUMN_1', 'is_nullable': true},
+ {'type': 'number', 'nullable_action': 'none', 'name': '_COLUMN_2', 'is_nullable': true}]
...
-- gh-2494: index's part also features correct declared type.
--
@@ -197,7 +197,7 @@ box.execute("SELECT randomblob(5) || 'x';")
box.execute("VALUES (TYPEOF(randomblob(5) || zeroblob(5)));")
---
- metadata:
- - name: column1
+ - name: _COLUMN_1
type: string
rows:
- ['varbinary']
@@ -230,7 +230,7 @@ box.execute("SELECT * FROM t1 WHERE 'blob' LIKE x'0000';")
box.execute("SELECT s LIKE NULL FROM t1;")
---
- metadata:
- - name: s LIKE NULL
+ - name: _COLUMN_1
type: integer
rows:
- [null]
@@ -256,7 +256,7 @@ box.execute("SELECT * FROM t1 WHERE 'int' LIKE 4;")
box.execute("SELECT NULL LIKE s FROM t1;")
---
- metadata:
- - name: NULL LIKE s
+ - name: _COLUMN_1
type: integer
rows:
- [null]
@@ -270,7 +270,7 @@ box.space.T1:drop()
box.execute("SELECT CAST('1.123' AS INTEGER);")
---
- metadata:
- - name: CAST('1.123' AS INTEGER)
+ - name: _COLUMN_1
type: integer
rows:
- [1]
@@ -286,7 +286,7 @@ box.execute("INSERT INTO t1 VALUES('0.0'), ('1.5'), ('3.9312453');")
box.execute("SELECT CAST(f AS INTEGER) FROM t1;")
---
- metadata:
- - name: CAST(f AS INTEGER)
+ - name: _COLUMN_1
type: integer
rows:
- [0]
@@ -303,7 +303,7 @@ box.space.T1:drop()
box.execute('SELECT 1 + 1;')
---
- metadata:
- - name: 1 + 1
+ - name: _COLUMN_1
type: integer
rows:
- [2]
@@ -311,7 +311,7 @@ box.execute('SELECT 1 + 1;')
box.execute('SELECT 1 + 1.1;')
---
- metadata:
- - name: 1 + 1.1
+ - name: _COLUMN_1
type: double
rows:
- [2.1]
@@ -319,7 +319,7 @@ box.execute('SELECT 1 + 1.1;')
box.execute('SELECT \'9223372036854\' + 1;')
---
- metadata:
- - name: '''9223372036854'' + 1'
+ - name: _COLUMN_1
type: integer
rows:
- [9223372036855]
@@ -328,7 +328,7 @@ box.execute('SELECT \'9223372036854\' + 1;')
box.execute('SELECT ?', {true})
---
- metadata:
- - name: '?'
+ - name: _COLUMN_1
type: boolean
rows:
- [true]
@@ -489,7 +489,7 @@ s:drop()
box.execute("SELECT 18446744073709551615 > 18446744073709551614;")
---
- metadata:
- - name: 18446744073709551615 > 18446744073709551614
+ - name: _COLUMN_1
type: boolean
rows:
- [true]
@@ -497,7 +497,7 @@ box.execute("SELECT 18446744073709551615 > 18446744073709551614;")
box.execute("SELECT 18446744073709551615 > -9223372036854775808;")
---
- metadata:
- - name: 18446744073709551615 > -9223372036854775808
+ - name: _COLUMN_1
type: boolean
rows:
- [true]
@@ -505,7 +505,7 @@ box.execute("SELECT 18446744073709551615 > -9223372036854775808;")
box.execute("SELECT -1 < 18446744073709551615;")
---
- metadata:
- - name: -1 < 18446744073709551615
+ - name: _COLUMN_1
type: boolean
rows:
- [true]
@@ -513,7 +513,7 @@ box.execute("SELECT -1 < 18446744073709551615;")
box.execute("SELECT 1.5 < 18446744073709551615")
---
- metadata:
- - name: 1.5 < 18446744073709551615
+ - name: _COLUMN_1
type: boolean
rows:
- [true]
@@ -521,7 +521,7 @@ box.execute("SELECT 1.5 < 18446744073709551615")
box.execute("SELECT 1.5 > 18446744073709551615")
---
- metadata:
- - name: 1.5 > 18446744073709551615
+ - name: _COLUMN_1
type: boolean
rows:
- [false]
@@ -529,7 +529,7 @@ box.execute("SELECT 1.5 > 18446744073709551615")
box.execute("SELECT 18446744073709551615 > 1.5")
---
- metadata:
- - name: 18446744073709551615 > 1.5
+ - name: _COLUMN_1
type: boolean
rows:
- [true]
@@ -537,7 +537,7 @@ box.execute("SELECT 18446744073709551615 > 1.5")
box.execute("SELECT 18446744073709551615 < 1.5")
---
- metadata:
- - name: 18446744073709551615 < 1.5
+ - name: _COLUMN_1
type: boolean
rows:
- [false]
@@ -545,7 +545,7 @@ box.execute("SELECT 18446744073709551615 < 1.5")
box.execute("SELECT 18446744073709551615 = 18446744073709551615;")
---
- metadata:
- - name: 18446744073709551615 = 18446744073709551615
+ - name: _COLUMN_1
type: boolean
rows:
- [true]
@@ -553,7 +553,7 @@ box.execute("SELECT 18446744073709551615 = 18446744073709551615;")
box.execute("SELECT 18446744073709551615 > -9223372036854775808;")
---
- metadata:
- - name: 18446744073709551615 > -9223372036854775808
+ - name: _COLUMN_1
type: boolean
rows:
- [true]
@@ -561,7 +561,7 @@ box.execute("SELECT 18446744073709551615 > -9223372036854775808;")
box.execute("SELECT 18446744073709551615 < -9223372036854775808;")
---
- metadata:
- - name: 18446744073709551615 < -9223372036854775808
+ - name: _COLUMN_1
type: boolean
rows:
- [false]
@@ -569,7 +569,7 @@ box.execute("SELECT 18446744073709551615 < -9223372036854775808;")
box.execute("SELECT -1 < 18446744073709551615;")
---
- metadata:
- - name: -1 < 18446744073709551615
+ - name: _COLUMN_1
type: boolean
rows:
- [true]
@@ -577,7 +577,7 @@ box.execute("SELECT -1 < 18446744073709551615;")
box.execute("SELECT -1 > 18446744073709551615;")
---
- metadata:
- - name: -1 > 18446744073709551615
+ - name: _COLUMN_1
type: boolean
rows:
- [false]
@@ -585,7 +585,7 @@ box.execute("SELECT -1 > 18446744073709551615;")
box.execute("SELECT 18446744073709551610 - 18446744073709551615;")
---
- metadata:
- - name: 18446744073709551610 - 18446744073709551615
+ - name: _COLUMN_1
type: integer
rows:
- [-5]
@@ -593,7 +593,7 @@ box.execute("SELECT 18446744073709551610 - 18446744073709551615;")
box.execute("SELECT 18446744073709551615 = null;")
---
- metadata:
- - name: 18446744073709551615 = null
+ - name: _COLUMN_1
type: boolean
rows:
- [null]
@@ -601,7 +601,7 @@ box.execute("SELECT 18446744073709551615 = null;")
box.execute("SELECT 18446744073709551615 = 18446744073709551615.0;")
---
- metadata:
- - name: 18446744073709551615 = 18446744073709551615.0
+ - name: _COLUMN_1
type: boolean
rows:
- [false]
@@ -609,7 +609,7 @@ box.execute("SELECT 18446744073709551615 = 18446744073709551615.0;")
box.execute("SELECT 18446744073709551615.0 > 18446744073709551615")
---
- metadata:
- - name: 18446744073709551615.0 > 18446744073709551615
+ - name: _COLUMN_1
type: boolean
rows:
- [true]
@@ -617,7 +617,7 @@ box.execute("SELECT 18446744073709551615.0 > 18446744073709551615")
box.execute("SELECT 18446744073709551615 IN ('18446744073709551615', 18446744073709551615.0)")
---
- metadata:
- - name: 18446744073709551615 IN ('18446744073709551615', 18446744073709551615.0)
+ - name: _COLUMN_1
type: boolean
rows:
- [true]
@@ -625,7 +625,7 @@ box.execute("SELECT 18446744073709551615 IN ('18446744073709551615', 18446744073
box.execute("SELECT 1 LIMIT 18446744073709551615;")
---
- metadata:
- - name: '1'
+ - name: _COLUMN_1
type: integer
rows:
- [1]
@@ -633,7 +633,7 @@ box.execute("SELECT 1 LIMIT 18446744073709551615;")
box.execute("SELECT 1 LIMIT 1 OFFSET 18446744073709551614;")
---
- metadata:
- - name: '1'
+ - name: _COLUMN_1
type: integer
rows: []
...
@@ -645,7 +645,7 @@ box.execute("SELECT CAST('18446744073' || '709551616' AS INTEGER);")
box.execute("SELECT CAST('18446744073' || '709551615' AS INTEGER);")
---
- metadata:
- - name: CAST('18446744073' || '709551615' AS INTEGER)
+ - name: _COLUMN_1
type: integer
rows:
- [18446744073709551615]
@@ -653,7 +653,7 @@ box.execute("SELECT CAST('18446744073' || '709551615' AS INTEGER);")
box.execute("SELECT 18446744073709551610 + 5;")
---
- metadata:
- - name: 18446744073709551610 + 5
+ - name: _COLUMN_1
type: integer
rows:
- [18446744073709551615]
@@ -661,7 +661,7 @@ box.execute("SELECT 18446744073709551610 + 5;")
box.execute("SELECT 18446744073709551615 * 1;")
---
- metadata:
- - name: 18446744073709551615 * 1
+ - name: _COLUMN_1
type: integer
rows:
- [18446744073709551615]
@@ -669,7 +669,7 @@ box.execute("SELECT 18446744073709551615 * 1;")
box.execute("SELECT 1 / 18446744073709551615;")
---
- metadata:
- - name: 1 / 18446744073709551615
+ - name: _COLUMN_1
type: integer
rows:
- [0]
@@ -677,7 +677,7 @@ box.execute("SELECT 1 / 18446744073709551615;")
box.execute("SELECT 18446744073709551615 / 18446744073709551615;")
---
- metadata:
- - name: 18446744073709551615 / 18446744073709551615
+ - name: _COLUMN_1
type: integer
rows:
- [1]
@@ -685,7 +685,7 @@ box.execute("SELECT 18446744073709551615 / 18446744073709551615;")
box.execute("SELECT 18446744073709551615 / -9223372036854775808;")
---
- metadata:
- - name: 18446744073709551615 / -9223372036854775808
+ - name: _COLUMN_1
type: integer
rows:
- [-1]
@@ -779,7 +779,7 @@ box.execute("INSERT INTO t VALUES (2, -1);")
box.execute("SELECT sum(i) FROM t;")
---
- metadata:
- - name: sum(i)
+ - name: _COLUMN_1
type: number
rows:
- [18446744073709551613]
@@ -787,7 +787,7 @@ box.execute("SELECT sum(i) FROM t;")
box.execute("SELECT avg(i) FROM t;")
---
- metadata:
- - name: avg(i)
+ - name: _COLUMN_1
type: number
rows:
- [6148914691236516864]
@@ -795,7 +795,7 @@ box.execute("SELECT avg(i) FROM t;")
box.execute("SELECT total(i) FROM t;")
---
- metadata:
- - name: total(i)
+ - name: _COLUMN_1
type: number
rows:
- [1.844674407371e+19]
@@ -803,7 +803,7 @@ box.execute("SELECT total(i) FROM t;")
box.execute("SELECT min(i) FROM t;")
---
- metadata:
- - name: min(i)
+ - name: _COLUMN_1
type: scalar
rows:
- [-1]
@@ -811,7 +811,7 @@ box.execute("SELECT min(i) FROM t;")
box.execute("SELECT max(i) FROM t;")
---
- metadata:
- - name: max(i)
+ - name: _COLUMN_1
type: scalar
rows:
- [18446744073709551613]
@@ -819,7 +819,7 @@ box.execute("SELECT max(i) FROM t;")
box.execute("SELECT count(i) FROM t;")
---
- metadata:
- - name: count(i)
+ - name: _COLUMN_1
type: integer
rows:
- [3]
@@ -827,7 +827,7 @@ box.execute("SELECT count(i) FROM t;")
box.execute("SELECT group_concat(i) FROM t;")
---
- metadata:
- - name: group_concat(i)
+ - name: _COLUMN_1
type: string
rows:
- ['1,-1,18446744073709551613']
@@ -839,7 +839,7 @@ box.execute("DELETE FROM t WHERE i < 18446744073709551613;")
box.execute("SELECT lower(i) FROM t;")
---
- metadata:
- - name: lower(i)
+ - name: _COLUMN_1
type: string
rows:
- ['18446744073709551613']
@@ -847,7 +847,7 @@ box.execute("SELECT lower(i) FROM t;")
box.execute("SELECT upper(i) FROM t;")
---
- metadata:
- - name: upper(i)
+ - name: _COLUMN_1
type: string
rows:
- ['18446744073709551613']
@@ -855,7 +855,7 @@ box.execute("SELECT upper(i) FROM t;")
box.execute("SELECT abs(i) FROM t;")
---
- metadata:
- - name: abs(i)
+ - name: _COLUMN_1
type: number
rows:
- [18446744073709551613]
@@ -863,7 +863,7 @@ box.execute("SELECT abs(i) FROM t;")
box.execute("SELECT typeof(i) FROM t;")
---
- metadata:
- - name: typeof(i)
+ - name: _COLUMN_1
type: string
rows:
- ['integer']
@@ -871,7 +871,7 @@ box.execute("SELECT typeof(i) FROM t;")
box.execute("SELECT quote(i) FROM t;")
---
- metadata:
- - name: quote(i)
+ - name: _COLUMN_1
type: string
rows:
- [18446744073709551613]
@@ -879,7 +879,7 @@ box.execute("SELECT quote(i) FROM t;")
box.execute("SELECT LEAST(-1, i) FROM t;")
---
- metadata:
- - name: LEAST(-1, i)
+ - name: _COLUMN_1
type: scalar
rows:
- [-1]
@@ -887,7 +887,7 @@ box.execute("SELECT LEAST(-1, i) FROM t;")
box.execute("SELECT quote(i) FROM t;")
---
- metadata:
- - name: quote(i)
+ - name: _COLUMN_1
type: string
rows:
- [18446744073709551613]
@@ -1020,7 +1020,7 @@ box.space.T1:drop()
box.execute("SELECT CAST(18446744073709551615 AS NUMBER);")
---
- metadata:
- - name: CAST(18446744073709551615 AS NUMBER)
+ - name: _COLUMN_1
type: number
rows:
- [18446744073709551615]
@@ -1028,7 +1028,7 @@ box.execute("SELECT CAST(18446744073709551615 AS NUMBER);")
box.execute("SELECT CAST(18446744073709551615 AS TEXT);")
---
- metadata:
- - name: CAST(18446744073709551615 AS TEXT)
+ - name: _COLUMN_1
type: string
rows:
- ['18446744073709551615']
@@ -1036,7 +1036,7 @@ box.execute("SELECT CAST(18446744073709551615 AS TEXT);")
box.execute("SELECT CAST(18446744073709551615 AS SCALAR);")
---
- metadata:
- - name: CAST(18446744073709551615 AS SCALAR)
+ - name: _COLUMN_1
type: scalar
rows:
- [18446744073709551615]
@@ -1044,7 +1044,7 @@ box.execute("SELECT CAST(18446744073709551615 AS SCALAR);")
box.execute("SELECT CAST(18446744073709551615 AS BOOLEAN);")
---
- metadata:
- - name: CAST(18446744073709551615 AS BOOLEAN)
+ - name: _COLUMN_1
type: boolean
rows:
- [true]
@@ -1052,7 +1052,7 @@ box.execute("SELECT CAST(18446744073709551615 AS BOOLEAN);")
box.execute("SELECT CAST('18446744073709551615' AS INTEGER);")
---
- metadata:
- - name: CAST('18446744073709551615' AS INTEGER)
+ - name: _COLUMN_1
type: integer
rows:
- [18446744073709551615]
@@ -1085,7 +1085,7 @@ box.execute("SELECT id FROM t1;")
box.execute("SELECT CAST(123 AS UNSIGNED);")
---
- metadata:
- - name: CAST(123 AS UNSIGNED)
+ - name: _COLUMN_1
type: unsigned
rows:
- [123]
@@ -1098,7 +1098,7 @@ box.execute("SELECT CAST(-123 AS UNSIGNED);")
box.execute("SELECT CAST(1.5 AS UNSIGNED);")
---
- metadata:
- - name: CAST(1.5 AS UNSIGNED)
+ - name: _COLUMN_1
type: unsigned
rows:
- [1]
@@ -1111,7 +1111,7 @@ box.execute("SELECT CAST(-1.5 AS UNSIGNED);")
box.execute("SELECT CAST(true AS UNSIGNED);")
---
- metadata:
- - name: CAST(true AS UNSIGNED)
+ - name: _COLUMN_1
type: unsigned
rows:
- [1]
@@ -1119,7 +1119,7 @@ box.execute("SELECT CAST(true AS UNSIGNED);")
box.execute("SELECT CAST('123' AS UNSIGNED);")
---
- metadata:
- - name: CAST('123' AS UNSIGNED)
+ - name: _COLUMN_1
type: unsigned
rows:
- [123]
@@ -1151,7 +1151,7 @@ box.space.T:drop()
box.execute("SELECT CASE 1 WHEN 1 THEN x'0000000000' WHEN 2 THEN 'str' END")
---
- metadata:
- - name: CASE 1 WHEN 1 THEN x'0000000000' WHEN 2 THEN 'str' END
+ - name: _COLUMN_1
type: scalar
rows:
- ["\0\0\0\0\0"]
@@ -1159,7 +1159,7 @@ box.execute("SELECT CASE 1 WHEN 1 THEN x'0000000000' WHEN 2 THEN 'str' END")
box.execute("SELECT CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 END")
---
- metadata:
- - name: CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 END
+ - name: _COLUMN_1
type: integer
rows:
- [666]
@@ -1167,7 +1167,7 @@ box.execute("SELECT CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 END")
box.execute("SELECT CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 ELSE 321 END")
---
- metadata:
- - name: CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 ELSE 321 END
+ - name: _COLUMN_1
type: integer
rows:
- [666]
@@ -1175,7 +1175,7 @@ box.execute("SELECT CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 ELSE 321 END")
box.execute("SELECT CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 ELSE 'asd' END")
---
- metadata:
- - name: CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 ELSE 'asd' END
+ - name: _COLUMN_1
type: scalar
rows:
- [666]
@@ -1183,8 +1183,7 @@ box.execute("SELECT CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 ELSE 'asd' END")
box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN 'd' THEN 4 WHEN 'e' THEN 5 WHEN 'f' THEN 6 END;")
---
- metadata:
- - name: CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN 'd' THEN 4
- WHEN 'e' THEN 5 WHEN 'f' THEN 6 END
+ - name: _COLUMN_1
type: integer
rows:
- [1]
@@ -1192,8 +1191,7 @@ box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHE
box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN 'd' THEN 4 WHEN 'e' THEN 5 WHEN 'f' THEN 'asd' END;")
---
- metadata:
- - name: CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN 'd' THEN 4
- WHEN 'e' THEN 5 WHEN 'f' THEN 'asd' END
+ - name: _COLUMN_1
type: scalar
rows:
- [1]
@@ -1201,8 +1199,7 @@ box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHE
box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN 'd' THEN 4 WHEN 'e' THEN 5 WHEN 'f' THEN 6 ELSE 'asd' END;")
---
- metadata:
- - name: CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN 'd' THEN 4
- WHEN 'e' THEN 5 WHEN 'f' THEN 6 ELSE 'asd' END
+ - name: _COLUMN_1
type: scalar
rows:
- [1]
@@ -1210,8 +1207,7 @@ box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHE
box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN 'd' THEN 4 WHEN 'e' THEN 5 WHEN 'f' THEN 6 ELSE 7 END;")
---
- metadata:
- - name: CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN 'd' THEN 4
- WHEN 'e' THEN 5 WHEN 'f' THEN 6 ELSE 7 END
+ - name: _COLUMN_1
type: integer
rows:
- [1]
@@ -1289,7 +1285,7 @@ box.execute("SELECT total(v) FROM t;")
box.execute("SELECT min(v) FROM t;")
---
- metadata:
- - name: min(v)
+ - name: _COLUMN_1
type: scalar
rows:
- ['abc']
@@ -1297,7 +1293,7 @@ box.execute("SELECT min(v) FROM t;")
box.execute("SELECT max(v) FROM t;")
---
- metadata:
- - name: max(v)
+ - name: _COLUMN_1
type: scalar
rows:
- ['abc']
@@ -1305,7 +1301,7 @@ box.execute("SELECT max(v) FROM t;")
box.execute("SELECT count(v) FROM t;")
---
- metadata:
- - name: count(v)
+ - name: _COLUMN_1
type: integer
rows:
- [1]
@@ -1313,7 +1309,7 @@ box.execute("SELECT count(v) FROM t;")
box.execute("SELECT group_concat(v) FROM t;")
---
- metadata:
- - name: group_concat(v)
+ - name: _COLUMN_1
type: string
rows:
- ['abc']
@@ -1336,7 +1332,7 @@ box.execute("SELECT abs(v) FROM t;")
box.execute("SELECT typeof(v) FROM t;")
---
- metadata:
- - name: typeof(v)
+ - name: _COLUMN_1
type: string
rows:
- ['varbinary']
@@ -1344,7 +1340,7 @@ box.execute("SELECT typeof(v) FROM t;")
box.execute("SELECT quote(v) FROM t;")
---
- metadata:
- - name: quote(v)
+ - name: _COLUMN_1
type: string
rows:
- ['X''616263''']
@@ -1352,7 +1348,7 @@ box.execute("SELECT quote(v) FROM t;")
box.execute("SELECT LEAST(v, x'') FROM t;")
---
- metadata:
- - name: LEAST(v, x'')
+ - name: _COLUMN_1
type: scalar
rows:
- ['']
@@ -1472,7 +1468,7 @@ box.execute("SELECT CAST(true AS VARBINARY);")
box.execute("SELECT CAST('asd' AS VARBINARY);")
---
- metadata:
- - name: CAST('asd' AS VARBINARY)
+ - name: _COLUMN_1
type: varbinary
rows:
- ['asd']
@@ -1480,7 +1476,7 @@ box.execute("SELECT CAST('asd' AS VARBINARY);")
box.execute("SELECT CAST(x'' AS VARBINARY);")
---
- metadata:
- - name: CAST(x'' AS VARBINARY)
+ - name: _COLUMN_1
type: varbinary
rows:
- ['']
@@ -1499,9 +1495,9 @@ box.execute("INSERT INTO t VALUES (1, 1, 1), (2, NULL, NULL);")
box.execute("SELECT typeof(a), typeof(s) FROM t;")
---
- metadata:
- - name: typeof(a)
+ - name: _COLUMN_1
type: string
- - name: typeof(s)
+ - name: _COLUMN_2
type: string
rows:
- ['integer', 'integer']
@@ -1518,7 +1514,7 @@ box.execute('INSERT INTO t1 VALUES (1, NULL, NULL);')
box.execute('SELECT typeof(a & b) FROM t1;')
---
- metadata:
- - name: typeof(a & b)
+ - name: _COLUMN_1
type: string
rows:
- ['integer']
@@ -1526,11 +1522,11 @@ box.execute('SELECT typeof(a & b) FROM t1;')
box.execute('SELECT typeof(a), typeof(b), typeof(a & b) FROM t1')
---
- metadata:
- - name: typeof(a)
+ - name: _COLUMN_1
type: string
- - name: typeof(b)
+ - name: _COLUMN_2
type: string
- - name: typeof(a & b)
+ - name: _COLUMN_3
type: string
rows:
- ['integer', 'integer', 'integer']
@@ -1538,7 +1534,7 @@ box.execute('SELECT typeof(a), typeof(b), typeof(a & b) FROM t1')
box.execute("SELECT typeof(CAST(0 AS UNSIGNED));")
---
- metadata:
- - name: typeof(CAST(0 AS UNSIGNED))
+ - name: _COLUMN_1
type: string
rows:
- ['unsigned']
@@ -1698,7 +1694,7 @@ box.execute('DROP TABLE t1;')
box.execute("SELECT 1.0;")
---
- metadata:
- - name: '1.0'
+ - name: _COLUMN_1
type: double
rows:
- [1]
@@ -1706,7 +1702,7 @@ box.execute("SELECT 1.0;")
box.execute("SELECT .01;")
---
- metadata:
- - name: '.01'
+ - name: _COLUMN_1
type: double
rows:
- [0.01]
@@ -1714,7 +1710,7 @@ box.execute("SELECT .01;")
box.execute("SELECT CAST(1 AS DOUBLE);")
---
- metadata:
- - name: CAST(1 AS DOUBLE)
+ - name: _COLUMN_1
type: double
rows:
- [1]
@@ -1722,7 +1718,7 @@ box.execute("SELECT CAST(1 AS DOUBLE);")
box.execute("SELECT CAST(1.123 AS DOUBLE);")
---
- metadata:
- - name: CAST(1.123 AS DOUBLE)
+ - name: _COLUMN_1
type: double
rows:
- [1.123]
@@ -1740,7 +1736,7 @@ box.execute("SELECT CAST('asd' AS DOUBLE);")
box.execute("SELECT CAST('1' AS DOUBLE);")
---
- metadata:
- - name: CAST('1' AS DOUBLE)
+ - name: _COLUMN_1
type: double
rows:
- [1]
@@ -1748,7 +1744,7 @@ box.execute("SELECT CAST('1' AS DOUBLE);")
box.execute("SELECT CAST('1.123' AS DOUBLE);")
---
- metadata:
- - name: CAST('1.123' AS DOUBLE)
+ - name: _COLUMN_1
type: double
rows:
- [1.123]
@@ -1766,7 +1762,7 @@ box.execute("SELECT CAST(x'35' AS DOUBLE);")
box.execute("SELECT CAST(CAST(x'35' AS STRING) AS DOUBLE);")
---
- metadata:
- - name: CAST(CAST(x'35' AS STRING) AS DOUBLE)
+ - name: _COLUMN_1
type: double
rows:
- [5]
@@ -1800,7 +1796,7 @@ box.execute('SELECT * FROM t;')
box.execute('SELECT d / 100 FROM t;')
---
- metadata:
- - name: d / 100
+ - name: _COLUMN_1
type: double
rows:
- [0.1]
@@ -1833,7 +1829,7 @@ box.execute('SELECT * from t WHERE d = 3.3;')
box.execute("SELECT sum(d) FROM t;")
---
- metadata:
- - name: sum(d)
+ - name: _COLUMN_1
type: number
rows:
- [18000000000000000000]
@@ -1841,7 +1837,7 @@ box.execute("SELECT sum(d) FROM t;")
box.execute("SELECT avg(d) FROM t;")
---
- metadata:
- - name: avg(d)
+ - name: _COLUMN_1
type: number
rows:
- [4500000000000000000]
@@ -1849,7 +1845,7 @@ box.execute("SELECT avg(d) FROM t;")
box.execute("SELECT total(d) FROM t;")
---
- metadata:
- - name: total(d)
+ - name: _COLUMN_1
type: number
rows:
- [18000000000000000000]
@@ -1857,7 +1853,7 @@ box.execute("SELECT total(d) FROM t;")
box.execute("SELECT min(d) FROM t;")
---
- metadata:
- - name: min(d)
+ - name: _COLUMN_1
type: scalar
rows:
- [-2]
@@ -1865,7 +1861,7 @@ box.execute("SELECT min(d) FROM t;")
box.execute("SELECT max(d) FROM t;")
---
- metadata:
- - name: max(d)
+ - name: _COLUMN_1
type: scalar
rows:
- [18000000000000000000]
@@ -1873,7 +1869,7 @@ box.execute("SELECT max(d) FROM t;")
box.execute("SELECT count(d) FROM t;")
---
- metadata:
- - name: count(d)
+ - name: _COLUMN_1
type: integer
rows:
- [4]
@@ -1881,7 +1877,7 @@ box.execute("SELECT count(d) FROM t;")
box.execute("SELECT group_concat(d) FROM t;")
---
- metadata:
- - name: group_concat(d)
+ - name: _COLUMN_1
type: string
rows:
- ['10.0,-2.0,3.3,1.8e+19']
@@ -1889,7 +1885,7 @@ box.execute("SELECT group_concat(d) FROM t;")
box.execute("SELECT lower(d) FROM t;")
---
- metadata:
- - name: lower(d)
+ - name: _COLUMN_1
type: string
rows:
- ['10.0']
@@ -1900,7 +1896,7 @@ box.execute("SELECT lower(d) FROM t;")
box.execute("SELECT upper(d) FROM t;")
---
- metadata:
- - name: upper(d)
+ - name: _COLUMN_1
type: string
rows:
- ['10.0']
@@ -1911,7 +1907,7 @@ box.execute("SELECT upper(d) FROM t;")
box.execute("SELECT abs(d) FROM t;")
---
- metadata:
- - name: abs(d)
+ - name: _COLUMN_1
type: number
rows:
- [10]
@@ -1922,7 +1918,7 @@ box.execute("SELECT abs(d) FROM t;")
box.execute("SELECT typeof(d) FROM t;")
---
- metadata:
- - name: typeof(d)
+ - name: _COLUMN_1
type: string
rows:
- ['double']
@@ -1933,7 +1929,7 @@ box.execute("SELECT typeof(d) FROM t;")
box.execute("SELECT quote(d) FROM t;")
---
- metadata:
- - name: quote(d)
+ - name: _COLUMN_1
type: string
rows:
- ['10.0']
@@ -1944,7 +1940,7 @@ box.execute("SELECT quote(d) FROM t;")
box.execute("SELECT LEAST(d, 0) FROM t;")
---
- metadata:
- - name: LEAST(d, 0)
+ - name: _COLUMN_1
type: scalar
rows:
- [0]
@@ -2086,9 +2082,9 @@ box.execute("DROP TABLE t4;")
box.execute("SELECT 1.0, typeof(1.0);")
---
- metadata:
- - name: '1.0'
+ - name: _COLUMN_1
type: double
- - name: typeof(1.0)
+ - name: _COLUMN_2
type: string
rows:
- [1, 'double']
@@ -2096,9 +2092,9 @@ box.execute("SELECT 1.0, typeof(1.0);")
box.execute("SELECT CAST(2 AS DOUBLE), typeof(CAST(2 AS DOUBLE));")
---
- metadata:
- - name: CAST(2 AS DOUBLE)
+ - name: _COLUMN_1
type: double
- - name: typeof(CAST(2 AS DOUBLE))
+ - name: _COLUMN_2
type: string
rows:
- [2, 'double']
@@ -2106,9 +2102,9 @@ box.execute("SELECT CAST(2 AS DOUBLE), typeof(CAST(2 AS DOUBLE));")
box.execute("SELECT 3e3, typeof(3e3);")
---
- metadata:
- - name: '3e3'
+ - name: _COLUMN_1
type: double
- - name: typeof(3e3)
+ - name: _COLUMN_2
type: string
rows:
- [3000, 'double']
@@ -2126,7 +2122,7 @@ box.execute("SELECT d, TYPEOF(d) FROM t5;")
- metadata:
- name: D
type: double
- - name: TYPEOF(d)
+ - name: _COLUMN_2
type: string
rows:
- [4, 'double']
--
2.21.0 (Apple Git-122)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Tarantool-patches] [PATCH] sql: use unify pattern for column names
2020-03-09 15:02 [Tarantool-patches] [PATCH] sql: use unify pattern for column names Roman Khabibov
@ 2020-03-09 15:04 ` Roman Khabibov
2020-03-12 0:14 ` Vladislav Shpilevoy
0 siblings, 1 reply; 9+ messages in thread
From: Roman Khabibov @ 2020-03-09 15:04 UTC (permalink / raw)
To: tarantool-patches; +Cc: Vladislav Shpilevoy
Sorry, forgot.
Branch: https://github.com/tarantool/tarantool/tree/romanhabibov/gh-3962-column
Issue: https://github.com/tarantool/tarantool/issues/3962
> On Mar 9, 2020, at 18:02, Roman Khabibov <roman.habibov@tarantool.org> wrote:
>
> Name resulting columns generated by an expression or <VALUES>
> construction by the "_COLUMN_N" pattern.
>
> Closes #3962
>
> @TarantoolBot document
> Title: Column naming in SQL
>
> Now, every auto generated column is named by the "_COLUMN_N"
> pattern, where N is the number of column in a query. Auto
> generated column is a column in a query result generated by an
> expression or a column from <VALUES> construction.
> ---
> src/box/sql/select.c | 11 +-
> src/box/sql/sqlInt.h | 13 +
> test/box/function1.result | 12 +-
> test/sql-tap/colname.test.lua | 6 +-
> test/sql-tap/select1.test.lua | 21 +-
> test/sql-tap/select6.test.lua | 22 +-
> test/sql-tap/view.test.lua | 4 +-
> test/sql/bind.result | 42 +-
> test/sql/boolean.result | 354 ++++-----
> test/sql/collation.result | 14 +-
> test/sql/errinj.result | 2 +-
> test/sql/foreign-keys.result | 4 +-
> test/sql/full_metadata.result | 10 +-
> test/sql/func-recreate.result | 2 +-
> test/sql/gh-3199-no-mem-leaks.result | 24 +-
> test/sql/gh-3888-values-blob-assert.result | 125 ++--
> test/sql/icu-upper-lower.result | 82 +-
> test/sql/integer-overflow.result | 14 +-
> test/sql/iproto.result | 16 +-
> test/sql/max-on-index.result | 6 +-
> test/sql/misc.result | 299 ++++----
> test/sql/persistency.result | 826 +++++++++++----------
> test/sql/prepared.result | 18 +-
> test/sql/row-count.result | 40 +-
> test/sql/transition.result | 66 +-
> test/sql/types.result | 226 +++---
> 26 files changed, 1143 insertions(+), 1116 deletions(-)
>
> diff --git a/src/box/sql/select.c b/src/box/sql/select.c
> index 65e41f219..54b6f83d8 100644
> --- a/src/box/sql/select.c
> +++ b/src/box/sql/select.c
> @@ -1852,12 +1852,10 @@ generate_column_metadata(struct Parse *pParse, struct SrcList *pTabList,
> const char *z = NULL;
> if (colname != NULL)
> z = colname;
> - else if (span != NULL)
> - z = span;
> else
> - z = tt_sprintf("column%d", i + 1);
> + z = sql_generate_column_name(i + 1);
> vdbe_metadata_set_col_name(v, i, z);
> - if (is_full_meta && colname != NULL)
> + if (is_full_meta)
> vdbe_metadata_set_col_span(v, i, span);
> }
> }
> @@ -1946,13 +1944,10 @@ sqlColumnsFromExprList(Parse * parse, ExprList * expr_list,
> } else if (pColExpr->op == TK_ID) {
> assert(!ExprHasProperty(pColExpr, EP_IntValue));
> zName = pColExpr->u.zToken;
> - } else {
> - /* Use the original text of the column expression as its name */
> - zName = expr_list->a[i].zSpan;
> }
> }
> if (zName == NULL)
> - zName = "_auto_field_";
> + zName = sql_generate_column_name(i + 1);
> zName = sqlMPrintf(db, "%s", zName);
>
> /* Make sure the column name is unique. If the name is not unique,
> diff --git a/src/box/sql/sqlInt.h b/src/box/sql/sqlInt.h
> index 1579cc92e..8c9708cf6 100644
> --- a/src/box/sql/sqlInt.h
> +++ b/src/box/sql/sqlInt.h
> @@ -4513,4 +4513,17 @@ int
> sql_fieldno_by_name(struct Parse *parse_context, struct Expr *field_name,
> uint32_t *fieldno);
>
> +/**
> + * Return a string of the form "_COLUMN_N", where N is @a number.
> + *
> + * @param number Number of column.
> + *
> + * @retval string success.
> + */
> +static inline char *
> +sql_generate_column_name(uint32_t number)
> +{
> + return (char *) tt_sprintf("_COLUMN_%d", number);
> +}
> +
> #endif /* sqlINT_H */
> diff --git a/test/box/function1.result b/test/box/function1.result
> index b91d63c51..86cea4f3b 100644
> --- a/test/box/function1.result
> +++ b/test/box/function1.result
> @@ -449,7 +449,7 @@ box.execute('SELECT "function1.divide"(6, 3, 3)')
> box.execute('SELECT "function1.divide"(6, 3)')
> ---
> - metadata:
> - - name: '"function1.divide"(6, 3)'
> + - name: _COLUMN_1
> type: number
> rows:
> - [2]
> @@ -457,7 +457,7 @@ box.execute('SELECT "function1.divide"(6, 3)')
> box.execute('SELECT "function1.divide"(5, 2)')
> ---
> - metadata:
> - - name: '"function1.divide"(5, 2)'
> + - name: _COLUMN_1
> type: number
> rows:
> - [2.5]
> @@ -482,7 +482,7 @@ test_run:cmd("setopt delimiter ''");
> box.execute('SELECT summarize(1, 2)')
> ---
> - metadata:
> - - name: summarize(1, 2)
> + - name: _COLUMN_1
> type: number
> rows:
> - [3]
> @@ -505,7 +505,7 @@ test_run:cmd("setopt delimiter ''");
> box.execute('SELECT summarize(1, 2)')
> ---
> - metadata:
> - - name: summarize(1, 2)
> + - name: _COLUMN_1
> type: number
> rows:
> - [3]
> @@ -519,7 +519,7 @@ box.func.SUMMARIZE:drop()
> box.execute('SELECT lua(\'return 1 + 1\')')
> ---
> - metadata:
> - - name: lua('return 1 + 1')
> + - name: _COLUMN_1
> type: any
> rows:
> - [2]
> @@ -537,7 +537,7 @@ box.execute('SELECT lua(\'return box.cfg()\')')
> box.execute('SELECT lua(\'return box.cfg.memtx_memory\')')
> ---
> - metadata:
> - - name: lua('return box.cfg.memtx_memory')
> + - name: _COLUMN_1
> type: any
> rows:
> - [107374182]
> diff --git a/test/sql-tap/colname.test.lua b/test/sql-tap/colname.test.lua
> index caa61a07a..f8cd5cc0e 100755
> --- a/test/sql-tap/colname.test.lua
> +++ b/test/sql-tap/colname.test.lua
> @@ -94,7 +94,7 @@ test:do_execsql2_test(
> SELECT +tabc.a, -tabc.b, tabc.c, * FROM tabc
> ]], {
> -- <colname-2.3>
> - "+tabc.a",1,"-tabc.b",-2,"C",3,"A",1,"B",2,"C",3
> + "_COLUMN_1",1,"_COLUMN_2",-2,"C",3,"A",1,"B",2,"C",3
> -- </colname-2.3>
> })
>
> @@ -194,7 +194,7 @@ test:do_execsql2_test(
> SELECT +tabc.a, -tabc.b, tabc.c FROM tabc
> ]], {
> -- <colname-3.3>
> - "+tabc.a", 1, "-tabc.b", -2, "C", 3
> + "_COLUMN_1",1,"_COLUMN_2",-2,"C",3
> -- </colname-3.3>
> })
>
> @@ -314,7 +314,7 @@ test:do_execsql2_test(
> SELECT +tabc.a, -tabc.b, tabc.c FROM tabc
> ]], {
> -- <colname-4.3>
> - "+tabc.a", 1, "-tabc.b", -2, "TABC.C", 3
> + "_COLUMN_1",1,"_COLUMN_2",-2,"TABC.C",3
> -- </colname-4.3>
> })
>
> diff --git a/test/sql-tap/select1.test.lua b/test/sql-tap/select1.test.lua
> index fbebfab37..2c5f90479 100755
> --- a/test/sql-tap/select1.test.lua
> +++ b/test/sql-tap/select1.test.lua
> @@ -1032,7 +1032,7 @@ test:do_catchsql2_test(
> SELECT f1+F2 FROM test1 ORDER BY f2
> ]], {
> -- <select1-6.4a>
> - 0, {"f1+F2", 33, "f1+F2", 77}
> + 0, {"_COLUMN_1",33,"_COLUMN_1",77}
> -- </select1-6.4a>
> })
>
> @@ -1042,7 +1042,7 @@ test:do_catchsql2_test(
> SELECT test1.f1+F2 FROM test1 ORDER BY f2
> ]], {
> -- <select1-6.5>
> - 0, {"test1.f1+F2", 33, "test1.f1+F2", 77}
> + 0, {"_COLUMN_1",33,"_COLUMN_1",77}
> -- </select1-6.5>
> })
>
> @@ -1059,7 +1059,7 @@ test:do_test(
> return table.insert(v,msg) or v
> end, {
> -- <select1-6.5.1>
> - 0, {'test1.f1+F2', 33, 'test1.f1+F2', 77}
> + 0, {"_COLUMN_1",33,"_COLUMN_1",77}
> -- </select1-6.5.1>
> })
>
> @@ -1068,7 +1068,7 @@ test:do_catchsql2_test(
> [[SELECT test1.f1+F2, t1 FROM test1, test2
> ORDER BY f2]], {
> -- <select1-6.6>
> - 0, {"test1.f1+F2", 33, "T1", "abc", "test1.f1+F2", 77, "T1", "abc"}
> + 0, {"_COLUMN_1",33,"T1","abc","_COLUMN_1",77,"T1","abc"}
> -- </select1-6.6>
> })
>
> @@ -1161,7 +1161,7 @@ test:do_test(
> ]]
> end, {
> -- <select1-6.9.5>
> - "123.45", 123.45
> + "_COLUMN_1",123.45
> -- </select1-6.9.5>
> })
>
> @@ -1189,7 +1189,8 @@ test:do_test(
> return x
> end, {
> -- <select1-6.9.7>
> - "A.F1", 11, "A.F2", 22, "sql_subquery.5", 5, "sql_subquery.6", 6
> + "A.F1", 11, "A.F2", 22, "sql_subquery._COLUMN_1", 5,
> + "sql_subquery._COLUMN_2", 6
> -- </select1-6.9.7>
> })
>
> @@ -1816,7 +1817,7 @@ test:do_execsql2_test(
> SELECT * FROM t3, (SELECT max(a), max(b) FROM t4) as "tx"
> ]], {
> -- <select1-11.14>
> - "ID", 0, "A", "1", "B", "2", "max(a)", 3, "max(b)", "4"
> + "ID", 0, "A", "1", "B", "2", "_COLUMN_1", 3, "_COLUMN_2", "4"
> -- </select1-11.14>
> })
>
> @@ -1826,7 +1827,7 @@ test:do_execsql2_test(
> SELECT y.*, t3.* FROM t3, (SELECT max(a), max(b) FROM t4) AS y
> ]], {
> -- <select1-11.15>
> - "max(a)", 3, "max(b)", "4", "ID", 0, "A", "1", "B", "2"
> + "_COLUMN_1", 3, "_COLUMN_2", "4", "ID", 0, "A", "1", "B", "2"
> -- </select1-11.15>
> })
>
> @@ -1850,7 +1851,7 @@ test:do_execsql2_test(
> SELECT 1+2+3
> ]], {
> -- <select1-12.1>
> - "1+2+3", 6
> + "_COLUMN_1",6
> -- </select1-12.1>
> })
>
> @@ -1860,7 +1861,7 @@ test:do_execsql2_test(
> SELECT 1,'hello',2
> ]], {
> -- <select1-12.2>
> - '1', 1, "'hello'", "hello", '2', 2
> + "_COLUMN_1",1,"_COLUMN_2","hello","_COLUMN_3",2
> -- </select1-12.2>
> })
>
> diff --git a/test/sql-tap/select6.test.lua b/test/sql-tap/select6.test.lua
> index c9960dc29..e99260505 100755
> --- a/test/sql-tap/select6.test.lua
> +++ b/test/sql-tap/select6.test.lua
> @@ -128,9 +128,9 @@ test:do_execsql_test(
> test:do_execsql_test(
> "select6-1.7",
> [=[
> - SELECT a.y, a."count(*)", "max(x)", "count(*)"
> - FROM (SELECT count(*),y FROM t1 GROUP BY y) AS a,
> - (SELECT max(x),y FROM t1 GROUP BY y) as b
> + SELECT a.y, a.count, max, count
> + FROM (SELECT count(*) AS count, y FROM t1 GROUP BY y) AS a,
> + (SELECT max(x) AS max, y FROM t1 GROUP BY y) as b
> WHERE a.y=b.y ORDER BY a.y
> ]=], {
> -- <select6-1.7>
> @@ -154,9 +154,9 @@ test:do_execsql_test(
> test:do_execsql_test(
> "select6-1.9",
> [=[
> - SELECT q, p, r, b."min(x)+y"
> + SELECT q, p, r, min
> FROM (SELECT count(*) as p , y as q FROM t1 GROUP BY y) AS a,
> - (SELECT max(x) as r, y as s, min(x)+y FROM t1 GROUP BY y) as b
> + (SELECT max(x) as r, y as s, min(x)+y AS min FROM t1 GROUP BY y) as b
> WHERE q=s ORDER BY s
> ]=], {
> -- <select6-1.9>
> @@ -247,9 +247,9 @@ test:do_execsql_test(
> test:do_execsql_test(
> "select6-2.7",
> [=[
> - SELECT a.b, a."count(*)", "max(a)", "count(*)"
> - FROM (SELECT count(*),b FROM t2 GROUP BY b) AS a,
> - (SELECT max(a),b FROM t2 GROUP BY b) as b
> + SELECT a.b, a.count, max, count
> + FROM (SELECT count(*) AS count, b FROM t2 GROUP BY b) AS a,
> + (SELECT max(a) AS max, b FROM t2 GROUP BY b) as b
> WHERE a.b=b.b ORDER BY a.b
> ]=], {
> -- <select6-2.7>
> @@ -432,8 +432,8 @@ test:do_execsql_test(
> test:do_execsql_test(
> "select6-3.14",
> [=[
> - SELECT "count(*)",y FROM (SELECT count(*), y FROM t1 GROUP BY y)
> - ORDER BY "count(*)"
> + SELECT count, y FROM (SELECT count(*) AS count, y FROM t1 GROUP BY y)
> + ORDER BY count
> ]=], {
> -- <select6-3.14>
> 1, 1, 2, 2, 4, 3, 5, 5, 8, 4
> @@ -443,7 +443,7 @@ test:do_execsql_test(
> test:do_execsql_test(
> "select6-3.15",
> [=[
> - SELECT "count(*)",y FROM (SELECT count(*), y FROM t1 GROUP BY y)
> + SELECT count, y FROM (SELECT count(*) AS count, y FROM t1 GROUP BY y)
> ORDER BY y
> ]=], {
> -- <select6-3.15>
> diff --git a/test/sql-tap/view.test.lua b/test/sql-tap/view.test.lua
> index e553b91c7..6c7671537 100755
> --- a/test/sql-tap/view.test.lua
> +++ b/test/sql-tap/view.test.lua
> @@ -265,7 +265,7 @@ test:do_execsql2_test(
> SELECT * FROM v1 LIMIT 1
> ]], {
> -- <view-3.3.1>
> - "XYZ", 2, "PQR", 7, "c-b", 1
> + "XYZ", 2, "PQR", 7, "_COLUMN_3", 1
> -- </view-3.3.1>
> })
>
> @@ -276,7 +276,7 @@ test:do_execsql2_test(
> SELECT * FROM v1b LIMIT 1
> ]], {
> -- <view-3.3.2>
> - "A", 2, "b+c", 7, "C", 4
> + "A", 2, "_COLUMN_2", 7, "C", 4
> -- </view-3.3.2>
> })
>
> diff --git a/test/sql/bind.result b/test/sql/bind.result
> index b24094052..fd6eac834 100644
> --- a/test/sql/bind.result
> +++ b/test/sql/bind.result
> @@ -77,11 +77,11 @@ execute('SELECT * FROM test WHERE id = :value', parameters)
> execute('SELECT ?, ?, ?', {1, 2, 3})
> ---
> - metadata:
> - - name: '?'
> + - name: _COLUMN_1
> type: integer
> - - name: '?'
> + - name: _COLUMN_2
> type: integer
> - - name: '?'
> + - name: _COLUMN_3
> type: integer
> rows:
> - [1, 2, 3]
> @@ -107,11 +107,11 @@ parameters[3][':value1'] = 11
> execute('SELECT ?, :value1, @value2', parameters)
> ---
> - metadata:
> - - name: '?'
> + - name: _COLUMN_1
> type: integer
> - - name: :value1
> + - name: _COLUMN_2
> type: integer
> - - name: '@value2'
> + - name: _COLUMN_3
> type: integer
> rows:
> - [10, 11, 12]
> @@ -149,22 +149,22 @@ parameters[6]['@value2'] = 6
> execute('SELECT :value3, ?, :value1, ?, ?, @value2, ?, :value3', parameters)
> ---
> - metadata:
> - - name: :value3
> + - name: _COLUMN_1
> type: integer
> - - name: '?'
> + - name: _COLUMN_2
> type: integer
> - - name: :value1
> + - name: _COLUMN_3
> type: integer
> - - name: '?'
> + - name: _COLUMN_4
> type: integer
> - - name: '?'
> + - name: _COLUMN_5
> type: integer
> - - name: '@value2'
> + - name: _COLUMN_6
> type: integer
> - - name: '?'
> + - name: _COLUMN_7
> + type: boolean
> + - name: _COLUMN_8
> type: boolean
> - - name: :value3
> - type: integer
> rows:
> - [1, 2, 3, 4, 5, 6, null, 1]
> ...
> @@ -175,15 +175,15 @@ msgpack = require('msgpack')
> execute('SELECT ?, ?, ?, ?, ?', {'abc', -123.456, msgpack.NULL, true, false})
> ---
> - metadata:
> - - name: '?'
> + - name: _COLUMN_1
> type: text
> - - name: '?'
> + - name: _COLUMN_2
> type: numeric
> - - name: '?'
> + - name: _COLUMN_3
> type: boolean
> - - name: '?'
> + - name: _COLUMN_4
> type: boolean
> - - name: '?'
> + - name: _COLUMN_5
> type: boolean
> rows:
> - ['abc', -123.456, null, true, false]
> @@ -290,7 +290,7 @@ execute('SELECT :value', parameters)
> execute('SELECT ? ', {18446744073709551615ULL})
> ---
> - metadata:
> - - name: '?'
> + - name: _COLUMN_1
> type: integer
> rows:
> - [18446744073709551615]
> diff --git a/test/sql/boolean.result b/test/sql/boolean.result
> index 112e41a12..3c273f2cd 100644
> --- a/test/sql/boolean.result
> +++ b/test/sql/boolean.result
> @@ -241,7 +241,7 @@ i > 0
> SELECT return_type(a) FROM t;
> | ---
> | - metadata:
> - | - name: return_type(a)
> + | - name: _COLUMN_1
> | type: string
> | rows:
> | - ['boolean']
> @@ -250,7 +250,7 @@ SELECT return_type(a) FROM t;
> SELECT return_type('false');
> | ---
> | - metadata:
> - | - name: return_type('false')
> + | - name: _COLUMN_1
> | type: string
> | rows:
> | - ['string']
> @@ -258,7 +258,7 @@ SELECT return_type('false');
> SELECT is_boolean(a) FROM t LIMIT 1;
> | ---
> | - metadata:
> - | - name: is_boolean(a)
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [true]
> @@ -266,7 +266,7 @@ SELECT is_boolean(a) FROM t LIMIT 1;
> SELECT is_boolean('true');
> | ---
> | - metadata:
> - | - name: is_boolean('true')
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -281,7 +281,7 @@ SELECT abs(a) FROM t0;
> SELECT lower(a) FROM t0;
> | ---
> | - metadata:
> - | - name: lower(a)
> + | - name: _COLUMN_1
> | type: string
> | rows:
> | - ['false']
> @@ -292,7 +292,7 @@ SELECT lower(a) FROM t0;
> SELECT upper(a) FROM t0;
> | ---
> | - metadata:
> - | - name: upper(a)
> + | - name: _COLUMN_1
> | type: string
> | rows:
> | - ['FALSE']
> @@ -303,7 +303,7 @@ SELECT upper(a) FROM t0;
> SELECT quote(a) FROM t0;
> | ---
> | - metadata:
> - | - name: quote(a)
> + | - name: _COLUMN_1
> | type: string
> | rows:
> | - ['FALSE']
> @@ -315,7 +315,7 @@ SELECT quote(a) FROM t0;
> SELECT length(a) FROM t0;
> | ---
> | - metadata:
> - | - name: length(a)
> + | - name: _COLUMN_1
> | type: integer
> | rows:
> | - [5]
> @@ -326,7 +326,7 @@ SELECT length(a) FROM t0;
> SELECT typeof(a) FROM t0;
> | ---
> | - metadata:
> - | - name: typeof(a)
> + | - name: _COLUMN_1
> | type: string
> | rows:
> | - ['boolean']
> @@ -344,7 +344,7 @@ SELECT AVG(a) FROM t0;
> SELECT MIN(a) FROM t0;
> | ---
> | - metadata:
> - | - name: MIN(a)
> + | - name: _COLUMN_1
> | type: scalar
> | rows:
> | - [false]
> @@ -352,7 +352,7 @@ SELECT MIN(a) FROM t0;
> SELECT MAX(a) FROM t0;
> | ---
> | - metadata:
> - | - name: MAX(a)
> + | - name: _COLUMN_1
> | type: scalar
> | rows:
> | - [true]
> @@ -365,7 +365,7 @@ SELECT SUM(a) FROM t0;
> SELECT COUNT(a) FROM t0;
> | ---
> | - metadata:
> - | - name: COUNT(a)
> + | - name: _COLUMN_1
> | type: integer
> | rows:
> | - [2]
> @@ -378,7 +378,7 @@ SELECT TOTAL(a) FROM t0;
> SELECT GROUP_CONCAT(a, ' +++ ') FROM t0;
> | ---
> | - metadata:
> - | - name: GROUP_CONCAT(a, ' +++ ')
> + | - name: _COLUMN_1
> | type: string
> | rows:
> | - ['FALSE +++ TRUE']
> @@ -392,13 +392,13 @@ SELECT GROUP_CONCAT(a, ' +++ ') FROM t0;
> box.execute('SELECT ?, ?, return_type($1), typeof($2);', {true, false})
> | ---
> | - metadata:
> - | - name: '?'
> + | - name: _COLUMN_1
> | type: boolean
> - | - name: '?'
> + | - name: _COLUMN_2
> | type: boolean
> - | - name: return_type($1)
> + | - name: _COLUMN_3
> | type: string
> - | - name: typeof($2)
> + | - name: _COLUMN_4
> | type: string
> | rows:
> | - [true, false, 'boolean', 'boolean']
> @@ -422,9 +422,9 @@ parameters[2][':value1'] = false
> box.execute('SELECT :value1, @value2;', parameters)
> | ---
> | - metadata:
> - | - name: :value1
> + | - name: _COLUMN_1
> | type: boolean
> - | - name: '@value2'
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [false, true]
> @@ -501,9 +501,9 @@ INSERT INTO t3 VALUES (4, false)
> SELECT cast(true AS INTEGER), cast(false AS INTEGER);
> | ---
> | - metadata:
> - | - name: cast(true AS INTEGER)
> + | - name: _COLUMN_1
> | type: integer
> - | - name: cast(false AS INTEGER)
> + | - name: _COLUMN_2
> | type: integer
> | rows:
> | - [1, 0]
> @@ -511,9 +511,9 @@ SELECT cast(true AS INTEGER), cast(false AS INTEGER);
> SELECT cast(true AS NUMBER), cast(false AS NUMBER);
> | ---
> | - metadata:
> - | - name: cast(true AS NUMBER)
> + | - name: _COLUMN_1
> | type: number
> - | - name: cast(false AS NUMBER)
> + | - name: _COLUMN_2
> | type: number
> | rows:
> | - [1, 0]
> @@ -522,9 +522,9 @@ SELECT cast(true AS NUMBER), cast(false AS NUMBER);
> SELECT cast(true AS TEXT), cast(false AS TEXT);
> | ---
> | - metadata:
> - | - name: cast(true AS TEXT)
> + | - name: _COLUMN_1
> | type: string
> - | - name: cast(false AS TEXT)
> + | - name: _COLUMN_2
> | type: string
> | rows:
> | - ['TRUE', 'FALSE']
> @@ -532,9 +532,9 @@ SELECT cast(true AS TEXT), cast(false AS TEXT);
> SELECT cast(true AS BOOLEAN), cast(false AS BOOLEAN);
> | ---
> | - metadata:
> - | - name: cast(true AS BOOLEAN)
> + | - name: _COLUMN_1
> | type: boolean
> - | - name: cast(false AS BOOLEAN)
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [true, false]
> @@ -544,11 +544,11 @@ SELECT cast(true AS BOOLEAN), cast(false AS BOOLEAN);
> SELECT cast(100 AS BOOLEAN), cast(1 AS BOOLEAN), cast(0 AS BOOLEAN);
> | ---
> | - metadata:
> - | - name: cast(100 AS BOOLEAN)
> + | - name: _COLUMN_1
> | type: boolean
> - | - name: cast(1 AS BOOLEAN)
> + | - name: _COLUMN_2
> | type: boolean
> - | - name: cast(0 AS BOOLEAN)
> + | - name: _COLUMN_3
> | type: boolean
> | rows:
> | - [true, true, false]
> @@ -556,9 +556,9 @@ SELECT cast(100 AS BOOLEAN), cast(1 AS BOOLEAN), cast(0 AS BOOLEAN);
> SELECT cast(0.123 AS BOOLEAN), cast(0.0 AS BOOLEAN);
> | ---
> | - metadata:
> - | - name: cast(0.123 AS BOOLEAN)
> + | - name: _COLUMN_1
> | type: boolean
> - | - name: cast(0.0 AS BOOLEAN)
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [true, false]
> @@ -566,9 +566,9 @@ SELECT cast(0.123 AS BOOLEAN), cast(0.0 AS BOOLEAN);
> SELECT cast('true' AS BOOLEAN), cast('false' AS BOOLEAN);
> | ---
> | - metadata:
> - | - name: cast('true' AS BOOLEAN)
> + | - name: _COLUMN_1
> | type: boolean
> - | - name: cast('false' AS BOOLEAN)
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [true, false]
> @@ -576,9 +576,9 @@ SELECT cast('true' AS BOOLEAN), cast('false' AS BOOLEAN);
> SELECT cast('TRUE' AS BOOLEAN), cast('FALSE' AS BOOLEAN);
> | ---
> | - metadata:
> - | - name: cast('TRUE' AS BOOLEAN)
> + | - name: _COLUMN_1
> | type: boolean
> - | - name: cast('FALSE' AS BOOLEAN)
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [true, false]
> @@ -887,7 +887,7 @@ SELECT a, COUNT(*) FROM (SELECT * FROM t4 UNION SELECT * FROM t5) GROUP BY a;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: COUNT(*)
> + | - name: _COLUMN_2
> | type: integer
> | rows:
> | - [false, 3]
> @@ -907,7 +907,7 @@ INSERT INTO t6 VALUES (true, false), (false, true);
> SELECT NOT true;
> | ---
> | - metadata:
> - | - name: NOT true
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -915,7 +915,7 @@ SELECT NOT true;
> SELECT NOT false;
> | ---
> | - metadata:
> - | - name: NOT false
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [true]
> @@ -925,7 +925,7 @@ SELECT a, NOT a FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: NOT a
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [false, true]
> @@ -935,7 +935,7 @@ SELECT a, NOT a FROM t;
> SELECT true AND true;
> | ---
> | - metadata:
> - | - name: true AND true
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [true]
> @@ -943,7 +943,7 @@ SELECT true AND true;
> SELECT true AND false;
> | ---
> | - metadata:
> - | - name: true AND false
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -951,7 +951,7 @@ SELECT true AND false;
> SELECT false AND true;
> | ---
> | - metadata:
> - | - name: false AND true
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -959,7 +959,7 @@ SELECT false AND true;
> SELECT false AND false;
> | ---
> | - metadata:
> - | - name: false AND false
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -967,7 +967,7 @@ SELECT false AND false;
> SELECT true OR true;
> | ---
> | - metadata:
> - | - name: true OR true
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [true]
> @@ -975,7 +975,7 @@ SELECT true OR true;
> SELECT true OR false;
> | ---
> | - metadata:
> - | - name: true OR false
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [true]
> @@ -983,7 +983,7 @@ SELECT true OR false;
> SELECT false OR true;
> | ---
> | - metadata:
> - | - name: false OR true
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [true]
> @@ -991,7 +991,7 @@ SELECT false OR true;
> SELECT false OR false;
> | ---
> | - metadata:
> - | - name: false OR false
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -1002,7 +1002,7 @@ SELECT a, true AND a FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: true AND a
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [false, false]
> @@ -1013,7 +1013,7 @@ SELECT a, false AND a FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: false AND a
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [false, false]
> @@ -1024,7 +1024,7 @@ SELECT a, true OR a FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: true OR a
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [false, true]
> @@ -1035,7 +1035,7 @@ SELECT a, false OR a FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: false OR a
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [false, false]
> @@ -1046,7 +1046,7 @@ SELECT a, a AND true FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: a AND true
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [false, false]
> @@ -1057,7 +1057,7 @@ SELECT a, a AND false FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: a AND false
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [false, false]
> @@ -1068,7 +1068,7 @@ SELECT a, a OR true FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: a OR true
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [false, true]
> @@ -1079,7 +1079,7 @@ SELECT a, a OR false FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: a OR false
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [false, false]
> @@ -1093,7 +1093,7 @@ SELECT a, a1, a AND a1 FROM t, t6;
> | type: boolean
> | - name: A1
> | type: boolean
> - | - name: a AND a1
> + | - name: _COLUMN_3
> | type: boolean
> | rows:
> | - [false, false, false]
> @@ -1108,7 +1108,7 @@ SELECT a, a1, a OR a1 FROM t, t6;
> | type: boolean
> | - name: A1
> | type: boolean
> - | - name: a OR a1
> + | - name: _COLUMN_3
> | type: boolean
> | rows:
> | - [false, false, false]
> @@ -1622,7 +1622,7 @@ SELECT a1, a2, a2 || a2 FROM t6;
> SELECT true > true;
> | ---
> | - metadata:
> - | - name: true > true
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -1630,7 +1630,7 @@ SELECT true > true;
> SELECT true > false;
> | ---
> | - metadata:
> - | - name: true > false
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [true]
> @@ -1638,7 +1638,7 @@ SELECT true > false;
> SELECT false > true;
> | ---
> | - metadata:
> - | - name: false > true
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -1646,7 +1646,7 @@ SELECT false > true;
> SELECT false > false;
> | ---
> | - metadata:
> - | - name: false > false
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -1654,7 +1654,7 @@ SELECT false > false;
> SELECT true < true;
> | ---
> | - metadata:
> - | - name: true < true
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -1662,7 +1662,7 @@ SELECT true < true;
> SELECT true < false;
> | ---
> | - metadata:
> - | - name: true < false
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -1670,7 +1670,7 @@ SELECT true < false;
> SELECT false < true;
> | ---
> | - metadata:
> - | - name: false < true
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [true]
> @@ -1678,7 +1678,7 @@ SELECT false < true;
> SELECT false < false;
> | ---
> | - metadata:
> - | - name: false < false
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -1689,7 +1689,7 @@ SELECT a, true > a FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: true > a
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [false, true]
> @@ -1700,7 +1700,7 @@ SELECT a, false > a FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: false > a
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [false, false]
> @@ -1711,7 +1711,7 @@ SELECT a, true < a FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: true < a
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [false, false]
> @@ -1722,7 +1722,7 @@ SELECT a, false < a FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: false < a
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [false, false]
> @@ -1733,7 +1733,7 @@ SELECT a, a > true FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: a > true
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [false, false]
> @@ -1744,7 +1744,7 @@ SELECT a, a > false FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: a > false
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [false, false]
> @@ -1755,7 +1755,7 @@ SELECT a, a < true FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: a < true
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [false, true]
> @@ -1766,7 +1766,7 @@ SELECT a, a < false FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: a < false
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [false, false]
> @@ -1780,7 +1780,7 @@ SELECT a, a1, a > a1 FROM t, t6;
> | type: boolean
> | - name: A1
> | type: boolean
> - | - name: a > a1
> + | - name: _COLUMN_3
> | type: boolean
> | rows:
> | - [false, false, false]
> @@ -1795,7 +1795,7 @@ SELECT a, a1, a < a1 FROM t, t6;
> | type: boolean
> | - name: A1
> | type: boolean
> - | - name: a < a1
> + | - name: _COLUMN_3
> | type: boolean
> | rows:
> | - [false, false, false]
> @@ -1807,7 +1807,7 @@ SELECT a, a1, a < a1 FROM t, t6;
> SELECT true >= true;
> | ---
> | - metadata:
> - | - name: true >= true
> + | - name: _COLUMN_1
> | type: any
> | rows:
> | - [true]
> @@ -1815,7 +1815,7 @@ SELECT true >= true;
> SELECT true >= false;
> | ---
> | - metadata:
> - | - name: true >= false
> + | - name: _COLUMN_1
> | type: any
> | rows:
> | - [true]
> @@ -1823,7 +1823,7 @@ SELECT true >= false;
> SELECT false >= true;
> | ---
> | - metadata:
> - | - name: false >= true
> + | - name: _COLUMN_1
> | type: any
> | rows:
> | - [false]
> @@ -1831,7 +1831,7 @@ SELECT false >= true;
> SELECT false >= false;
> | ---
> | - metadata:
> - | - name: false >= false
> + | - name: _COLUMN_1
> | type: any
> | rows:
> | - [true]
> @@ -1839,7 +1839,7 @@ SELECT false >= false;
> SELECT true <= true;
> | ---
> | - metadata:
> - | - name: true <= true
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [true]
> @@ -1847,7 +1847,7 @@ SELECT true <= true;
> SELECT true <= false;
> | ---
> | - metadata:
> - | - name: true <= false
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -1855,7 +1855,7 @@ SELECT true <= false;
> SELECT false <= true;
> | ---
> | - metadata:
> - | - name: false <= true
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [true]
> @@ -1863,7 +1863,7 @@ SELECT false <= true;
> SELECT false <= false;
> | ---
> | - metadata:
> - | - name: false <= false
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [true]
> @@ -1874,7 +1874,7 @@ SELECT a, true >= a FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: true >= a
> + | - name: _COLUMN_2
> | type: any
> | rows:
> | - [false, true]
> @@ -1885,7 +1885,7 @@ SELECT a, false >= a FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: false >= a
> + | - name: _COLUMN_2
> | type: any
> | rows:
> | - [false, true]
> @@ -1896,7 +1896,7 @@ SELECT a, true <= a FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: true <= a
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [false, false]
> @@ -1907,7 +1907,7 @@ SELECT a, false <= a FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: false <= a
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [false, true]
> @@ -1918,7 +1918,7 @@ SELECT a, a >= true FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: a >= true
> + | - name: _COLUMN_2
> | type: any
> | rows:
> | - [false, false]
> @@ -1929,7 +1929,7 @@ SELECT a, a >= false FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: a >= false
> + | - name: _COLUMN_2
> | type: any
> | rows:
> | - [false, true]
> @@ -1940,7 +1940,7 @@ SELECT a, a <= true FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: a <= true
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [false, true]
> @@ -1951,7 +1951,7 @@ SELECT a, a <= false FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: a <= false
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [false, true]
> @@ -1965,7 +1965,7 @@ SELECT a, a1, a >= a1 FROM t, t6;
> | type: boolean
> | - name: A1
> | type: boolean
> - | - name: a >= a1
> + | - name: _COLUMN_3
> | type: any
> | rows:
> | - [false, false, true]
> @@ -1980,7 +1980,7 @@ SELECT a, a1, a <= a1 FROM t, t6;
> | type: boolean
> | - name: A1
> | type: boolean
> - | - name: a <= a1
> + | - name: _COLUMN_3
> | type: boolean
> | rows:
> | - [false, false, true]
> @@ -1992,7 +1992,7 @@ SELECT a, a1, a <= a1 FROM t, t6;
> SELECT true == true;
> | ---
> | - metadata:
> - | - name: true == true
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [true]
> @@ -2000,7 +2000,7 @@ SELECT true == true;
> SELECT true == false;
> | ---
> | - metadata:
> - | - name: true == false
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -2008,7 +2008,7 @@ SELECT true == false;
> SELECT false == true;
> | ---
> | - metadata:
> - | - name: false == true
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -2016,7 +2016,7 @@ SELECT false == true;
> SELECT false == false;
> | ---
> | - metadata:
> - | - name: false == false
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [true]
> @@ -2024,7 +2024,7 @@ SELECT false == false;
> SELECT true != true;
> | ---
> | - metadata:
> - | - name: true != true
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -2032,7 +2032,7 @@ SELECT true != true;
> SELECT true != false;
> | ---
> | - metadata:
> - | - name: true != false
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [true]
> @@ -2040,7 +2040,7 @@ SELECT true != false;
> SELECT false != true;
> | ---
> | - metadata:
> - | - name: false != true
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [true]
> @@ -2048,7 +2048,7 @@ SELECT false != true;
> SELECT false != false;
> | ---
> | - metadata:
> - | - name: false != false
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -2059,7 +2059,7 @@ SELECT a, true == a FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: true == a
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [false, false]
> @@ -2070,7 +2070,7 @@ SELECT a, false == a FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: false == a
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [false, true]
> @@ -2081,7 +2081,7 @@ SELECT a, true != a FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: true != a
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [false, true]
> @@ -2092,7 +2092,7 @@ SELECT a, false != a FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: false != a
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [false, false]
> @@ -2103,7 +2103,7 @@ SELECT a, a == true FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: a == true
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [false, false]
> @@ -2114,7 +2114,7 @@ SELECT a, a == false FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: a == false
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [false, true]
> @@ -2125,7 +2125,7 @@ SELECT a, a != true FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: a != true
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [false, true]
> @@ -2136,7 +2136,7 @@ SELECT a, a != false FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: a != false
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [false, false]
> @@ -2150,7 +2150,7 @@ SELECT a, a1, a == a1 FROM t, t6;
> | type: boolean
> | - name: A1
> | type: boolean
> - | - name: a == a1
> + | - name: _COLUMN_3
> | type: boolean
> | rows:
> | - [false, false, true]
> @@ -2165,7 +2165,7 @@ SELECT a, a1, a != a1 FROM t, t6;
> | type: boolean
> | - name: A1
> | type: boolean
> - | - name: a != a1
> + | - name: _COLUMN_3
> | type: boolean
> | rows:
> | - [false, false, false]
> @@ -2177,7 +2177,7 @@ SELECT a, a1, a != a1 FROM t, t6;
> SELECT true IN (true);
> | ---
> | - metadata:
> - | - name: true IN (true)
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [true]
> @@ -2185,7 +2185,7 @@ SELECT true IN (true);
> SELECT false IN (true);
> | ---
> | - metadata:
> - | - name: false IN (true)
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -2193,7 +2193,7 @@ SELECT false IN (true);
> SELECT true IN (false);
> | ---
> | - metadata:
> - | - name: true IN (false)
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -2201,7 +2201,7 @@ SELECT true IN (false);
> SELECT false IN (false);
> | ---
> | - metadata:
> - | - name: false IN (false)
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [true]
> @@ -2209,7 +2209,7 @@ SELECT false IN (false);
> SELECT true IN (true, false);
> | ---
> | - metadata:
> - | - name: true IN (true, false)
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [true]
> @@ -2217,7 +2217,7 @@ SELECT true IN (true, false);
> SELECT false IN (true, false);
> | ---
> | - metadata:
> - | - name: false IN (true, false)
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [true]
> @@ -2225,7 +2225,7 @@ SELECT false IN (true, false);
> SELECT true IN (SELECT a1 FROM t6);
> | ---
> | - metadata:
> - | - name: true IN (SELECT a1 FROM t6)
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [true]
> @@ -2233,7 +2233,7 @@ SELECT true IN (SELECT a1 FROM t6);
> SELECT false IN (SELECT a1 FROM t6);
> | ---
> | - metadata:
> - | - name: false IN (SELECT a1 FROM t6)
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [true]
> @@ -2241,7 +2241,7 @@ SELECT false IN (SELECT a1 FROM t6);
> SELECT true IN (SELECT a1 FROM t6 LIMIT 1);
> | ---
> | - metadata:
> - | - name: true IN (SELECT a1 FROM t6 LIMIT 1)
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -2249,7 +2249,7 @@ SELECT true IN (SELECT a1 FROM t6 LIMIT 1);
> SELECT false IN (SELECT a1 FROM t6 LIMIT 1);
> | ---
> | - metadata:
> - | - name: false IN (SELECT a1 FROM t6 LIMIT 1)
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [true]
> @@ -2257,7 +2257,7 @@ SELECT false IN (SELECT a1 FROM t6 LIMIT 1);
> SELECT true IN (1, 1.2, 'true', false);
> | ---
> | - metadata:
> - | - name: true IN (1, 1.2, 'true', false)
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -2265,7 +2265,7 @@ SELECT true IN (1, 1.2, 'true', false);
> SELECT false IN (1, 1.2, 'true', false);
> | ---
> | - metadata:
> - | - name: false IN (1, 1.2, 'true', false)
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [true]
> @@ -2276,7 +2276,7 @@ SELECT a, a IN (true) FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: a IN (true)
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [false, false]
> @@ -2287,7 +2287,7 @@ SELECT a, a IN (false) FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: a IN (false)
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [false, true]
> @@ -2298,7 +2298,7 @@ SELECT a, a IN (true, false) FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: a IN (true, false)
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [false, true]
> @@ -2309,7 +2309,7 @@ SELECT a, a IN (SELECT a1 FROM t6 LIMIT 1) FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: a IN (SELECT a1 FROM t6 LIMIT 1)
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [false, true]
> @@ -2320,7 +2320,7 @@ SELECT a, a IN (SELECT a1 FROM t6) FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: a IN (SELECT a1 FROM t6)
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [false, true]
> @@ -2331,7 +2331,7 @@ SELECT a, a IN (1, 1.2, 'true', false) FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: a IN (1, 1.2, 'true', false)
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [false, true]
> @@ -2341,7 +2341,7 @@ SELECT a, a IN (1, 1.2, 'true', false) FROM t;
> SELECT true BETWEEN true AND true;
> | ---
> | - metadata:
> - | - name: true BETWEEN true AND true
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [true]
> @@ -2349,7 +2349,7 @@ SELECT true BETWEEN true AND true;
> SELECT false BETWEEN true AND true;
> | ---
> | - metadata:
> - | - name: false BETWEEN true AND true
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -2357,7 +2357,7 @@ SELECT false BETWEEN true AND true;
> SELECT true BETWEEN false AND false;
> | ---
> | - metadata:
> - | - name: true BETWEEN false AND false
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -2365,7 +2365,7 @@ SELECT true BETWEEN false AND false;
> SELECT false BETWEEN false AND false;
> | ---
> | - metadata:
> - | - name: false BETWEEN false AND false
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [true]
> @@ -2373,7 +2373,7 @@ SELECT false BETWEEN false AND false;
> SELECT true BETWEEN true AND false;
> | ---
> | - metadata:
> - | - name: true BETWEEN true AND false
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -2381,7 +2381,7 @@ SELECT true BETWEEN true AND false;
> SELECT false BETWEEN true AND false;
> | ---
> | - metadata:
> - | - name: false BETWEEN true AND false
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -2389,7 +2389,7 @@ SELECT false BETWEEN true AND false;
> SELECT true BETWEEN false AND true;
> | ---
> | - metadata:
> - | - name: true BETWEEN false AND true
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [true]
> @@ -2397,7 +2397,7 @@ SELECT true BETWEEN false AND true;
> SELECT false BETWEEN false AND true;
> | ---
> | - metadata:
> - | - name: false BETWEEN false AND true
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [true]
> @@ -2408,7 +2408,7 @@ SELECT a, a BETWEEN true AND true FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: a BETWEEN true AND true
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [false, false]
> @@ -2419,7 +2419,7 @@ SELECT a, a BETWEEN false AND false FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: a BETWEEN false AND false
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [false, true]
> @@ -2430,7 +2430,7 @@ SELECT a, a BETWEEN true AND false FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: a BETWEEN true AND false
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [false, false]
> @@ -2441,7 +2441,7 @@ SELECT a, a BETWEEN false AND true FROM t;
> | - metadata:
> | - name: A
> | type: boolean
> - | - name: a BETWEEN false AND true
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [false, true]
> @@ -2466,7 +2466,7 @@ SELECT true AND 2;
> SELECT false AND 2;
> | ---
> | - metadata:
> - | - name: false AND 2
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -2489,7 +2489,7 @@ SELECT 2 AND true;
> SELECT 2 AND false;
> | ---
> | - metadata:
> - | - name: 2 AND false
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -2556,7 +2556,7 @@ SELECT b, false AND b FROM t7;
> | - metadata:
> | - name: B
> | type: integer
> - | - name: false AND b
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [123, false]
> @@ -2581,7 +2581,7 @@ SELECT b, b AND false FROM t7;
> | - metadata:
> | - name: B
> | type: integer
> - | - name: b AND false
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [123, false]
> @@ -3861,7 +3861,7 @@ SELECT a2, b, b != a2 FROM t6, t7;
> SELECT true IN (0, 1, 2, 3);
> | ---
> | - metadata:
> - | - name: true IN (0, 1, 2, 3)
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -3869,7 +3869,7 @@ SELECT true IN (0, 1, 2, 3);
> SELECT false IN (0, 1, 2, 3);
> | ---
> | - metadata:
> - | - name: false IN (0, 1, 2, 3)
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -3889,7 +3889,7 @@ SELECT a1, a1 IN (0, 1, 2, 3) FROM t6
> | - metadata:
> | - name: A1
> | type: boolean
> - | - name: a1 IN (0, 1, 2, 3)
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [false, false]
> @@ -3935,7 +3935,7 @@ SELECT true AND 2.3;
> SELECT false AND 2.3;
> | ---
> | - metadata:
> - | - name: false AND 2.3
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -3958,7 +3958,7 @@ SELECT 2.3 AND true;
> SELECT 2.3 AND false;
> | ---
> | - metadata:
> - | - name: 2.3 AND false
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -4025,7 +4025,7 @@ SELECT c, false AND c FROM t8;
> | - metadata:
> | - name: C
> | type: number
> - | - name: false AND c
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [4.56, false]
> @@ -4050,7 +4050,7 @@ SELECT c, c AND false FROM t8;
> | - metadata:
> | - name: C
> | type: number
> - | - name: c AND false
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - [4.56, false]
> @@ -5006,7 +5006,7 @@ SELECT a2, c, c != a2 FROM t6, t8;
> SELECT true IN (0.1, 1.2, 2.3, 3.4);
> | ---
> | - metadata:
> - | - name: true IN (0.1, 1.2, 2.3, 3.4)
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -5014,7 +5014,7 @@ SELECT true IN (0.1, 1.2, 2.3, 3.4);
> SELECT false IN (0.1, 1.2, 2.3, 3.4);
> | ---
> | - metadata:
> - | - name: false IN (0.1, 1.2, 2.3, 3.4)
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -5022,7 +5022,7 @@ SELECT false IN (0.1, 1.2, 2.3, 3.4);
> SELECT a1 IN (0.1, 1.2, 2.3, 3.4) FROM t6 LIMIT 1;
> | ---
> | - metadata:
> - | - name: a1 IN (0.1, 1.2, 2.3, 3.4)
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -5030,7 +5030,7 @@ SELECT a1 IN (0.1, 1.2, 2.3, 3.4) FROM t6 LIMIT 1;
> SELECT a2 IN (0.1, 1.2, 2.3, 3.4) FROM t6 LIMIT 1;
> | ---
> | - metadata:
> - | - name: a2 IN (0.1, 1.2, 2.3, 3.4)
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -5095,7 +5095,7 @@ SELECT true AND 'abc';
> SELECT false AND 'abc';
> | ---
> | - metadata:
> - | - name: false AND 'abc'
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -5118,7 +5118,7 @@ SELECT 'abc' AND true;
> SELECT 'abc' AND false;
> | ---
> | - metadata:
> - | - name: '''abc'' AND false'
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -5185,7 +5185,7 @@ SELECT d, false AND d FROM t9;
> | - metadata:
> | - name: D
> | type: string
> - | - name: false AND d
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - ['AsdF', false]
> @@ -5210,7 +5210,7 @@ SELECT d, d AND false FROM t9;
> | - metadata:
> | - name: D
> | type: string
> - | - name: d AND false
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - ['AsdF', false]
> @@ -5470,7 +5470,7 @@ SELECT true AND 'TRUE';
> SELECT false AND 'TRUE';
> | ---
> | - metadata:
> - | - name: false AND 'TRUE'
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -5493,7 +5493,7 @@ SELECT 'TRUE' AND true;
> SELECT 'TRUE' AND false;
> | ---
> | - metadata:
> - | - name: '''TRUE'' AND false'
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -5560,7 +5560,7 @@ SELECT d, false AND d FROM t9 WHERE d = 'TRUE';
> | - metadata:
> | - name: D
> | type: string
> - | - name: false AND d
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - ['TRUE', false]
> @@ -5585,7 +5585,7 @@ SELECT d, d AND false FROM t9 WHERE d = 'TRUE';
> | - metadata:
> | - name: D
> | type: string
> - | - name: d AND false
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - ['TRUE', false]
> @@ -5650,7 +5650,7 @@ SELECT true AND 'true';
> SELECT false AND 'true';
> | ---
> | - metadata:
> - | - name: false AND 'true'
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -5673,7 +5673,7 @@ SELECT 'true' AND true;
> SELECT 'true' AND false;
> | ---
> | - metadata:
> - | - name: '''true'' AND false'
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -5740,7 +5740,7 @@ SELECT d, false AND d FROM t9 WHERE d = 'true';
> | - metadata:
> | - name: D
> | type: string
> - | - name: false AND d
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - ['true', false]
> @@ -5765,7 +5765,7 @@ SELECT d, d AND false FROM t9 WHERE d = 'true';
> | - metadata:
> | - name: D
> | type: string
> - | - name: d AND false
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - ['true', false]
> @@ -5830,7 +5830,7 @@ SELECT true AND 'FALSE';
> SELECT false AND 'FALSE';
> | ---
> | - metadata:
> - | - name: false AND 'FALSE'
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -5853,7 +5853,7 @@ SELECT 'FALSE' AND true;
> SELECT 'FALSE' AND false;
> | ---
> | - metadata:
> - | - name: '''FALSE'' AND false'
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -5920,7 +5920,7 @@ SELECT d, false AND d FROM t9 WHERE d = 'FALSE';
> | - metadata:
> | - name: D
> | type: string
> - | - name: false AND d
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - ['FALSE', false]
> @@ -5945,7 +5945,7 @@ SELECT d, d AND false FROM t9 WHERE d = 'FALSE';
> | - metadata:
> | - name: D
> | type: string
> - | - name: d AND false
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - ['FALSE', false]
> @@ -6010,7 +6010,7 @@ SELECT true AND 'false';
> SELECT false AND 'false';
> | ---
> | - metadata:
> - | - name: false AND 'false'
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -6033,7 +6033,7 @@ SELECT 'false' AND true;
> SELECT 'false' AND false;
> | ---
> | - metadata:
> - | - name: '''false'' AND false'
> + | - name: _COLUMN_1
> | type: boolean
> | rows:
> | - [false]
> @@ -6100,7 +6100,7 @@ SELECT d, false AND d FROM t9 WHERE d = 'false';
> | - metadata:
> | - name: D
> | type: string
> - | - name: false AND d
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - ['false', false]
> @@ -6125,7 +6125,7 @@ SELECT d, d AND false FROM t9 WHERE d = 'false';
> | - metadata:
> | - name: D
> | type: string
> - | - name: d AND false
> + | - name: _COLUMN_2
> | type: boolean
> | rows:
> | - ['false', false]
> diff --git a/test/sql/collation.result b/test/sql/collation.result
> index 4e4c27ef0..b1035d569 100644
> --- a/test/sql/collation.result
> +++ b/test/sql/collation.result
> @@ -111,7 +111,7 @@ box.execute([[SELECT descriptor, upper(letter), letter FROM tu where UPPER(lette
> - metadata:
> - name: DESCRIPTOR
> type: string
> - - name: upper(letter)
> + - name: _COLUMN_2
> type: string
> - name: LETTER
> type: string
> @@ -124,7 +124,7 @@ box.execute([[SELECT descriptor, upper(letter COLLATE "GERMAN"), letter FROM tu
> - metadata:
> - name: DESCRIPTOR
> type: string
> - - name: upper(letter COLLATE "GERMAN")
> + - name: _COLUMN_2
> type: string
> - name: LETTER
> type: string
> @@ -335,14 +335,14 @@ box.execute("SELECT a FROM t UNION SELECT c FROM t;")
> box.execute("SELECT c COLLATE \"binary\" FROM t UNION SELECT a FROM t;")
> ---
> - metadata:
> - - name: c COLLATE "binary"
> + - name: _COLUMN_1
> type: string
> rows: []
> ...
> box.execute("SELECT b COLLATE \"unicode\" FROM t UNION SELECT a FROM t;")
> ---
> - metadata:
> - - name: b COLLATE "unicode"
> + - name: _COLUMN_1
> type: string
> rows: []
> ...
> @@ -1128,7 +1128,7 @@ box.execute("INSERT INTO jj VALUES (1,'A'), (2,'a')")
> box.execute("SELECT DISTINCT trim(s2) FROM jj;")
> ---
> - metadata:
> - - name: trim(s2)
> + - name: _COLUMN_1
> type: string
> rows:
> - ['A']
> @@ -1140,7 +1140,7 @@ box.execute("INSERT INTO jj VALUES (3, 'aS'), (4, 'AS');")
> box.execute("SELECT DISTINCT replace(s2, 'S', 's') FROM jj;")
> ---
> - metadata:
> - - name: replace(s2, 'S', 's')
> + - name: _COLUMN_1
> type: string
> rows:
> - ['A']
> @@ -1149,7 +1149,7 @@ box.execute("SELECT DISTINCT replace(s2, 'S', 's') FROM jj;")
> box.execute("SELECT DISTINCT substr(s2, 1, 1) FROM jj;")
> ---
> - metadata:
> - - name: substr(s2, 1, 1)
> + - name: _COLUMN_1
> type: string
> rows:
> - ['A']
> diff --git a/test/sql/errinj.result b/test/sql/errinj.result
> index 68c001f28..c41739bb7 100644
> --- a/test/sql/errinj.result
> +++ b/test/sql/errinj.result
> @@ -120,7 +120,7 @@ insert_res
> select_res
> ---
> - metadata:
> - - name: '1'
> + - name: _COLUMN_1
> type: integer
> rows:
> - [1]
> diff --git a/test/sql/foreign-keys.result b/test/sql/foreign-keys.result
> index f1d973443..3093b5852 100644
> --- a/test/sql/foreign-keys.result
> +++ b/test/sql/foreign-keys.result
> @@ -357,7 +357,7 @@ box.execute('ALTER TABLE tc ADD CONSTRAINT fk1 FOREIGN KEY (id) REFERENCES tp(id
> box.execute('SELECT row_count();')
> ---
> - metadata:
> - - name: row_count()
> + - name: _COLUMN_1
> type: integer
> rows:
> - [1]
> @@ -374,7 +374,7 @@ box.execute('ALTER TABLE tc DROP CONSTRAINT fk1;')
> box.execute('SELECT row_count();')
> ---
> - metadata:
> - - name: row_count()
> + - name: _COLUMN_1
> type: integer
> rows:
> - [1]
> diff --git a/test/sql/full_metadata.result b/test/sql/full_metadata.result
> index 5a93c41ec..31bea3786 100644
> --- a/test/sql/full_metadata.result
> +++ b/test/sql/full_metadata.result
> @@ -57,7 +57,7 @@ execute("SELECT 'aSd' COLLATE \"unicode_ci\";")
> | - metadata:
> | - type: string
> | span: '''aSd'' COLLATE "unicode_ci"'
> - | name: '''aSd'' COLLATE "unicode_ci"'
> + | name: _COLUMN_1
> | collation: unicode_ci
> | rows:
> | - ['aSd']
> @@ -78,7 +78,7 @@ execute("SELECT c COLLATE \"unicode\" FROM t;")
> | - metadata:
> | - type: string
> | span: c COLLATE "unicode"
> - | name: c COLLATE "unicode"
> + | name: _COLUMN_1
> | collation: unicode
> | rows:
> | - ['aSd']
> @@ -165,7 +165,7 @@ execute("SELECT *, id + 1 AS x, a AS y, c || 'abc' FROM t;")
> | is_nullable: false
> | - type: string
> | span: c || 'abc'
> - | name: c || 'abc'
> + | name: _COLUMN_6
> | rows:
> | - [1, 1, 'aSd', 2, 1, 'aSdabc']
> | ...
> @@ -185,8 +185,8 @@ execute("SELECT * FROM v;")
> | name: Y
> | is_nullable: false
> | - type: string
> - | span: c || 'abc'
> - | name: c || 'abc'
> + | span: _COLUMN_3
> + | name: _COLUMN_3
> | rows:
> | - [2, 1, 'aSdabc']
> | ...
> diff --git a/test/sql/func-recreate.result b/test/sql/func-recreate.result
> index 3709df787..36e6b1fc4 100644
> --- a/test/sql/func-recreate.result
> +++ b/test/sql/func-recreate.result
> @@ -48,7 +48,7 @@ test_run:cmd("setopt delimiter ''");
> ch:get()
> ---
> - metadata:
> - - name: WAITFOR(0.2)
> + - name: _COLUMN_1
> type: number
> rows:
> - [0.2]
> diff --git a/test/sql/gh-3199-no-mem-leaks.result b/test/sql/gh-3199-no-mem-leaks.result
> index d8590779a..dcd05c534 100644
> --- a/test/sql/gh-3199-no-mem-leaks.result
> +++ b/test/sql/gh-3199-no-mem-leaks.result
> @@ -32,7 +32,7 @@ box.execute('SELECT x, y, x + y FROM test ORDER BY y')
> type: integer
> - name: Y
> type: integer
> - - name: x + y
> + - name: _COLUMN_3
> type: integer
> rows:
> - [1, 1, 2]
> @@ -49,7 +49,7 @@ box.execute('SELECT x, y, x + y FROM test ORDER BY y')
> type: integer
> - name: Y
> type: integer
> - - name: x + y
> + - name: _COLUMN_3
> type: integer
> rows:
> - [1, 1, 2]
> @@ -62,7 +62,7 @@ box.execute('SELECT x, y, x + y FROM test ORDER BY y')
> type: integer
> - name: Y
> type: integer
> - - name: x + y
> + - name: _COLUMN_3
> type: integer
> rows:
> - [1, 1, 2]
> @@ -75,7 +75,7 @@ box.execute('SELECT x, y, x + y FROM test ORDER BY y')
> type: integer
> - name: Y
> type: integer
> - - name: x + y
> + - name: _COLUMN_3
> type: integer
> rows:
> - [1, 1, 2]
> @@ -88,7 +88,7 @@ box.execute('SELECT x, y, x + y FROM test ORDER BY y')
> type: integer
> - name: Y
> type: integer
> - - name: x + y
> + - name: _COLUMN_3
> type: integer
> rows:
> - [1, 1, 2]
> @@ -115,7 +115,7 @@ box.execute('SELECT a, id + 2, b FROM test2 WHERE b < id * 2 ORDER BY a ')
> - metadata:
> - name: A
> type: string
> - - name: id + 2
> + - name: _COLUMN_2
> type: integer
> - name: B
> type: integer
> @@ -134,7 +134,7 @@ box.execute('SELECT a, id + 2 * b, a FROM test2 WHERE b < id * 2 ORDER BY a ')
> - metadata:
> - name: A
> type: string
> - - name: id + 2 * b
> + - name: _COLUMN_2
> type: integer
> - name: A
> type: string
> @@ -149,7 +149,7 @@ box.execute('SELECT a, id + 2 * b, a FROM test2 WHERE b < id * 2 ORDER BY a ')
> - metadata:
> - name: A
> type: string
> - - name: id + 2 * b
> + - name: _COLUMN_2
> type: integer
> - name: A
> type: string
> @@ -164,7 +164,7 @@ box.execute('SELECT a, id + 2 * b, a FROM test2 WHERE b < id * 2 ORDER BY a ')
> - metadata:
> - name: A
> type: string
> - - name: id + 2 * b
> + - name: _COLUMN_2
> type: integer
> - name: A
> type: string
> @@ -183,7 +183,7 @@ box.execute('SELECT x, y + 3 * b, b FROM test2, test WHERE b = x')
> - metadata:
> - name: X
> type: integer
> - - name: y + 3 * b
> + - name: _COLUMN_2
> type: integer
> - name: B
> type: integer
> @@ -196,7 +196,7 @@ box.execute('SELECT x, y + 3 * b, b FROM test2, test WHERE b = x')
> - metadata:
> - name: X
> type: integer
> - - name: y + 3 * b
> + - name: _COLUMN_2
> type: integer
> - name: B
> type: integer
> @@ -209,7 +209,7 @@ box.execute('SELECT x, y + 3 * b, b FROM test2, test WHERE b = x')
> - metadata:
> - name: X
> type: integer
> - - name: y + 3 * b
> + - name: _COLUMN_2
> type: integer
> - name: B
> type: integer
> diff --git a/test/sql/gh-3888-values-blob-assert.result b/test/sql/gh-3888-values-blob-assert.result
> index 0a1af28f2..d2e27efd9 100644
> --- a/test/sql/gh-3888-values-blob-assert.result
> +++ b/test/sql/gh-3888-values-blob-assert.result
> @@ -1,3 +1,4 @@
> +-- test-run result file version 2
> -- sql: assertion fault on VALUES #3888
> --
> -- Make sure that tokens representing values of integer, float,
> @@ -5,79 +6,87 @@
> -- keywords of the same names.
> --
> test_run = require('test_run').new()
> ----
> -...
> + | ---
> + | ...
> engine = test_run:get_cfg('engine')
> ----
> -...
> + | ---
> + | ...
> _ = box.space._session_settings:update('sql_default_engine', {{'=', 2, engine}})
> ----
> -...
> + | ---
> + | ...
> +
> -- check 'VALUES' against typedef keywords (should fail)
> box.execute('VALUES(scalar)')
> ----
> -- null
> -- Syntax error at line 1 near 'scalar'
> -...
> + | ---
> + | - null
> + | - Syntax error at line 1 near 'scalar'
> + | ...
> box.execute('VALUES(float)')
> ----
> -- null
> -- Syntax error at line 1 near 'float'
> -...
> + | ---
> + | - null
> + | - Syntax error at line 1 near 'float'
> + | ...
> +
> -- check 'SELECT' against typedef keywords (should fail)
> box.execute('SELECT scalar')
> ----
> -- null
> -- Syntax error at line 1 near 'scalar'
> -...
> + | ---
> + | - null
> + | - Syntax error at line 1 near 'scalar'
> + | ...
> box.execute('SELECT float')
> ----
> -- null
> -- Syntax error at line 1 near 'float'
> -...
> + | ---
> + | - null
> + | - Syntax error at line 1 near 'float'
> + | ...
> +
> -- check 'VALUES' against ID (should fail)
> box.execute('VALUES(TheColumnName)')
> ----
> -- null
> -- Can’t resolve field 'THECOLUMNNAME'
> -...
> + | ---
> + | - null
> + | - Can’t resolve field 'THECOLUMNNAME'
> + | ...
> +
> -- check 'SELECT' against ID (should fail)
> box.execute('SELECT TheColumnName')
> ----
> -- null
> -- Can’t resolve field 'THECOLUMNNAME'
> -...
> + | ---
> + | - null
> + | - Can’t resolve field 'THECOLUMNNAME'
> + | ...
> +
> -- check 'VALUES' well-formed expression (returns value)
> box.execute('VALUES(-0.5e-2)')
> ----
> -- metadata:
> - - name: column1
> - type: double
> - rows:
> - - [-0.005]
> -...
> + | ---
> + | - metadata:
> + | - name: _COLUMN_1
> + | type: double
> + | rows:
> + | - [-0.005]
> + | ...
> box.execute('SELECT X\'507265766564\'')
> ----
> -- metadata:
> - - name: X'507265766564'
> - type: varbinary
> - rows:
> - - ['Preved']
> -...
> + | ---
> + | - metadata:
> + | - name: _COLUMN_1
> + | type: varbinary
> + | rows:
> + | - ['Preved']
> + | ...
> +
> -- check 'SELECT' well-formed expression (return value)
> box.execute('SELECT 3.14')
> ----
> -- metadata:
> - - name: '3.14'
> - type: double
> - rows:
> - - [3.14]
> -...
> + | ---
> + | - metadata:
> + | - name: _COLUMN_1
> + | type: double
> + | rows:
> + | - [3.14]
> + | ...
> box.execute('SELECT X\'4D6564766564\'')
> ----
> -- metadata:
> - - name: X'4D6564766564'
> - type: varbinary
> - rows:
> - - ['Medved']
> -...
> + | ---
> + | - metadata:
> + | - name: _COLUMN_1
> + | type: varbinary
> + | rows:
> + | - ['Medved']
> + | ...
> +
> +
> diff --git a/test/sql/icu-upper-lower.result b/test/sql/icu-upper-lower.result
> index f7b9dfa38..8acaed2d4 100644
> --- a/test/sql/icu-upper-lower.result
> +++ b/test/sql/icu-upper-lower.result
> @@ -23,11 +23,9 @@ upper_lower_test([[
> ]]);
> ---
> - metadata:
> - - name: lower(' Zəfər, jaketini də, papağını da götür, bu axşam hava çox soyuq
> - olacaq. ')
> + - name: _COLUMN_1
> type: string
> - - name: upper(' Zəfər, jaketini də, papağını da götür, bu axşam hava çox soyuq
> - olacaq. ')
> + - name: _COLUMN_2
> type: string
> rows:
> - [' zəfər, jaketini də, papağını da götür, bu axşam hava çox soyuq olacaq. ',
> @@ -38,9 +36,9 @@ upper_lower_test([[
> ]]);
> ---
> - metadata:
> - - name: lower(' The quick brown fox jumps over the lazy dog. ')
> + - name: _COLUMN_1
> type: string
> - - name: upper(' The quick brown fox jumps over the lazy dog. ')
> + - name: _COLUMN_2
> type: string
> rows:
> - [' the quick brown fox jumps over the lazy dog. ', ' THE QUICK BROWN FOX
> @@ -52,9 +50,9 @@ upper_lower_test([[
> ]]);
> ---
> - metadata:
> - - name: lower(' The quick brown fox jumps over the lazy dog. ')
> + - name: _COLUMN_1
> type: string
> - - name: upper(' The quick brown fox jumps over the lazy dog. ')
> + - name: _COLUMN_2
> type: string
> rows:
> - [' the quick brown fox jumps over the lazy dog. ', ' THE QUICK BROWN FOX
> @@ -66,11 +64,9 @@ upper_lower_test([[
> ]]);
> ---
> - metadata:
> - - name: lower(' Բել դղյակի ձախ ժամն օֆ ազգությանը ցպահանջ չճշտած վնաս էր եւ
> - փառք ')
> + - name: _COLUMN_1
> type: string
> - - name: upper(' Բել դղյակի ձախ ժամն օֆ ազգությանը ցպահանջ չճշտած վնաս էր եւ
> - փառք ')
> + - name: _COLUMN_2
> type: string
> rows:
> - [' բել դղյակի ձախ ժամն օֆ ազգությանը ցպահանջ չճշտած վնաս էր եւ փառք ', ' ԲԵԼ
> @@ -82,11 +78,9 @@ upper_lower_test([[
> ]]);
> ---
> - metadata:
> - - name: lower(' У Іўі худы жвавы чорт у зялёнай камізэльцы пабег пад’есці фаршу
> - з юшкай ')
> + - name: _COLUMN_1
> type: string
> - - name: upper(' У Іўі худы жвавы чорт у зялёнай камізэльцы пабег пад’есці фаршу
> - з юшкай ')
> + - name: _COLUMN_2
> type: string
> rows:
> - [' у іўі худы жвавы чорт у зялёнай камізэльцы пабег пад’есці фаршу з юшкай ',
> @@ -98,11 +92,9 @@ upper_lower_test([[
> ]]);
> ---
> - metadata:
> - - name: lower(' Τάχιστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός
> - ')
> + - name: _COLUMN_1
> type: string
> - - name: upper(' Τάχιστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός
> - ')
> + - name: _COLUMN_2
> type: string
> rows:
> - [' τάχιστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός ', ' ΤΆΧΙΣΤΗ
> @@ -114,11 +106,9 @@ upper_lower_test([[
> ]]);
> ---
> - metadata:
> - - name: lower(' Chuaigh bé mhórshách le dlúthspád fíorfhinn trí hata mo dhea-phorcáin
> - bhig ')
> + - name: _COLUMN_1
> type: string
> - - name: upper(' Chuaigh bé mhórshách le dlúthspád fíorfhinn trí hata mo dhea-phorcáin
> - bhig ')
> + - name: _COLUMN_2
> type: string
> rows:
> - [' chuaigh bé mhórshách le dlúthspád fíorfhinn trí hata mo dhea-phorcáin bhig ',
> @@ -130,9 +120,9 @@ upper_lower_test([[
> ]]);
> ---
> - metadata:
> - - name: lower(' Quiere la boca exhausta vid, kiwi, piña y fugaz jamón ')
> + - name: _COLUMN_1
> type: string
> - - name: upper(' Quiere la boca exhausta vid, kiwi, piña y fugaz jamón ')
> + - name: _COLUMN_2
> type: string
> rows:
> - [' quiere la boca exhausta vid, kiwi, piña y fugaz jamón ', ' QUIERE LA
> @@ -144,9 +134,9 @@ upper_lower_test([[
> ]]);
> ---
> - metadata:
> - - name: lower(' 키스의 고유조건은 입술끼리 만나야 하고 특별한 기술은 필요치 않다 ')
> + - name: _COLUMN_1
> type: string
> - - name: upper(' 키스의 고유조건은 입술끼리 만나야 하고 특별한 기술은 필요치 않다 ')
> + - name: _COLUMN_2
> type: string
> rows:
> - [' 키스의 고유조건은 입술끼리 만나야 하고 특별한 기술은 필요치 않다 ', ' 키스의 고유조건은 입술끼리 만나야 하고 특별한
> @@ -158,9 +148,9 @@ upper_lower_test([[
> ]]);
> ---
> - metadata:
> - - name: lower(' Glāžšķūņa rūķīši dzērumā čiepj Baha koncertflīģeļu vākus ')
> + - name: _COLUMN_1
> type: string
> - - name: upper(' Glāžšķūņa rūķīši dzērumā čiepj Baha koncertflīģeļu vākus ')
> + - name: _COLUMN_2
> type: string
> rows:
> - [' glāžšķūņa rūķīši dzērumā čiepj baha koncertflīģeļu vākus ', ' GLĀŽŠĶŪŅA
> @@ -172,11 +162,9 @@ upper_lower_test([[
> ]]);
> ---
> - metadata:
> - - name: lower(' Zwölf große Boxkämpfer jagen Viktor quer über den Sylter Deich
> - ')
> + - name: _COLUMN_1
> type: string
> - - name: upper(' Zwölf große Boxkämpfer jagen Viktor quer über den Sylter Deich
> - ')
> + - name: _COLUMN_2
> type: string
> rows:
> - [' zwölf große boxkämpfer jagen viktor quer über den sylter deich ', ' ZWÖLF
> @@ -188,9 +176,9 @@ upper_lower_test([[
> ]]);
> ---
> - metadata:
> - - name: lower(' Pchnąć w tę łódź jeża lub ośm skrzyń fig. ')
> + - name: _COLUMN_1
> type: string
> - - name: upper(' Pchnąć w tę łódź jeża lub ośm skrzyń fig. ')
> + - name: _COLUMN_2
> type: string
> rows:
> - [' pchnąć w tę łódź jeża lub ośm skrzyń fig. ', ' PCHNĄĆ W TĘ ŁÓDŹ JEŻA
> @@ -202,9 +190,9 @@ upper_lower_test([[
> ]]);
> ---
> - metadata:
> - - name: lower(' Чуєш їх, доцю, га? Кумедна ж ти, прощайся без ґольфів! ')
> + - name: _COLUMN_1
> type: string
> - - name: upper(' Чуєш їх, доцю, га? Кумедна ж ти, прощайся без ґольфів! ')
> + - name: _COLUMN_2
> type: string
> rows:
> - [' чуєш їх, доцю, га? кумедна ж ти, прощайся без ґольфів! ', ' ЧУЄШ ЇХ,
> @@ -216,9 +204,9 @@ upper_lower_test([[
> ]]);
> ---
> - metadata:
> - - name: lower(' Příliš žluťoučký kůň úpěl ďábelské ódy ')
> + - name: _COLUMN_1
> type: string
> - - name: upper(' Příliš žluťoučký kůň úpěl ďábelské ódy ')
> + - name: _COLUMN_2
> type: string
> rows:
> - [' příliš žluťoučký kůň úpěl ďábelské ódy ', ' PŘÍLIŠ ŽLUŤOUČKÝ KŮŇ ÚPĚL
> @@ -230,11 +218,9 @@ upper_lower_test([[
> ]]);
> ---
> - metadata:
> - - name: lower(' Laŭ Ludoviko Zamenhof bongustas freŝa ĉeĥa manĝaĵo kun spicoj
> - ')
> + - name: _COLUMN_1
> type: string
> - - name: upper(' Laŭ Ludoviko Zamenhof bongustas freŝa ĉeĥa manĝaĵo kun spicoj
> - ')
> + - name: _COLUMN_2
> type: string
> rows:
> - [' laŭ ludoviko zamenhof bongustas freŝa ĉeĥa manĝaĵo kun spicoj ', ' LAŬ
> @@ -246,9 +232,9 @@ upper_lower_test([[
> ]]);
> ---
> - metadata:
> - - name: lower(' いろはにほへと ちりぬるを わかよたれそ つねならむ うゐのおくやま けふこえて あさきゆめみし ゑひもせす ')
> + - name: _COLUMN_1
> type: string
> - - name: upper(' いろはにほへと ちりぬるを わかよたれそ つねならむ うゐのおくやま けふこえて あさきゆめみし ゑひもせす ')
> + - name: _COLUMN_2
> type: string
> rows:
> - [' いろはにほへと ちりぬるを わかよたれそ つねならむ うゐのおくやま けふこえて あさきゆめみし ゑひもせす ', ' いろはにほへと
> @@ -260,9 +246,9 @@ upper_lower_test([[
> ]]);
> ---
> - metadata:
> - - name: 'lower('' Pijamalı hasta yağız şoföre çabucak güvendi. EXTRA: İ '')'
> + - name: _COLUMN_1
> type: string
> - - name: 'upper('' Pijamalı hasta yağız şoföre çabucak güvendi. EXTRA: İ '')'
> + - name: _COLUMN_2
> type: string
> rows:
> - [' pijamalı hasta yağız şoföre çabucak güvendi. extra: i̇ ', ' PIJAMALI
> diff --git a/test/sql/integer-overflow.result b/test/sql/integer-overflow.result
> index 6269cb547..f9ec63785 100644
> --- a/test/sql/integer-overflow.result
> +++ b/test/sql/integer-overflow.result
> @@ -19,7 +19,7 @@ box.execute('SELECT (2147483647 * 2147483647 * 2147483647);')
> box.execute('SELECT (-9223372036854775808 / -1);')
> ---
> - metadata:
> - - name: (-9223372036854775808 / -1)
> + - name: _COLUMN_1
> type: integer
> rows:
> - [9223372036854775808]
> @@ -32,7 +32,7 @@ box.execute('SELECT (-9223372036854775808 - 1);')
> box.execute('SELECT (9223372036854775807 + 1);')
> ---
> - metadata:
> - - name: (9223372036854775807 + 1)
> + - name: _COLUMN_1
> type: integer
> rows:
> - [9223372036854775808]
> @@ -50,7 +50,7 @@ box.execute('SELECT 18446744073709551615 * 2;')
> box.execute('SELECT (-9223372036854775807 * (-2));')
> ---
> - metadata:
> - - name: (-9223372036854775807 * (-2))
> + - name: _COLUMN_1
> type: integer
> rows:
> - [18446744073709551614]
> @@ -60,7 +60,7 @@ box.execute('SELECT (-9223372036854775807 * (-2));')
> box.execute('SELECT 9223372036854775808;')
> ---
> - metadata:
> - - name: '9223372036854775808'
> + - name: _COLUMN_1
> type: integer
> rows:
> - [9223372036854775808]
> @@ -74,7 +74,7 @@ box.execute('SELECT -9223372036854775809;')
> box.execute('SELECT 9223372036854775808 - 1;')
> ---
> - metadata:
> - - name: 9223372036854775808 - 1
> + - name: _COLUMN_1
> type: integer
> rows:
> - [9223372036854775807]
> @@ -82,7 +82,7 @@ box.execute('SELECT 9223372036854775808 - 1;')
> box.execute('SELECT 18446744073709551615;')
> ---
> - metadata:
> - - name: '18446744073709551615'
> + - name: _COLUMN_1
> type: integer
> rows:
> - [18446744073709551615]
> @@ -98,7 +98,7 @@ box.execute('SELECT 18446744073709551616;')
> box.execute('SELECT CAST(\'9223372036854775808\' AS INTEGER);')
> ---
> - metadata:
> - - name: CAST('9223372036854775808' AS INTEGER)
> + - name: _COLUMN_1
> type: integer
> rows:
> - [9223372036854775808]
> diff --git a/test/sql/iproto.result b/test/sql/iproto.result
> index 44ba499a0..554eb6f51 100644
> --- a/test/sql/iproto.result
> +++ b/test/sql/iproto.result
> @@ -372,11 +372,11 @@ parameters[3] = 33
> cn:execute('select $2, $1, $3', parameters)
> ---
> - metadata:
> - - name: $2
> + - name: _COLUMN_1
> type: integer
> - - name: $1
> + - name: _COLUMN_2
> type: integer
> - - name: $3
> + - name: _COLUMN_3
> type: integer
> rows:
> - [22, 11, 33]
> @@ -736,7 +736,7 @@ res.metadata
> cn:execute("SELECT zeroblob(1);")
> ---
> - metadata:
> - - name: zeroblob(1)
> + - name: _COLUMN_1
> type: varbinary
> rows:
> - ["\0"]
> @@ -749,7 +749,7 @@ res = cn:execute("SELECT randomblob(1);")
> ...
> res.metadata
> ---
> -- - name: randomblob(1)
> +- - name: _COLUMN_1
> type: varbinary
> ...
> -- Type set during compilation stage, and since min/max are accept
> @@ -759,7 +759,7 @@ res.metadata
> cn:execute("SELECT LEAST(1, 2, 3);")
> ---
> - metadata:
> - - name: LEAST(1, 2, 3)
> + - name: _COLUMN_1
> type: scalar
> rows:
> - [1]
> @@ -767,7 +767,7 @@ cn:execute("SELECT LEAST(1, 2, 3);")
> cn:execute("SELECT GREATEST(1, 2, 3);")
> ---
> - metadata:
> - - name: GREATEST(1, 2, 3)
> + - name: _COLUMN_1
> type: scalar
> rows:
> - [3]
> @@ -803,7 +803,7 @@ s = box.prepare([[ SELECT ?; ]])
> s:execute({42})
> ---
> - metadata:
> - - name: '?'
> + - name: _COLUMN_1
> type: integer
> rows:
> - [42]
> diff --git a/test/sql/max-on-index.result b/test/sql/max-on-index.result
> index 1cd488f85..35665ce58 100644
> --- a/test/sql/max-on-index.result
> +++ b/test/sql/max-on-index.result
> @@ -48,7 +48,7 @@ box.execute("INSERT INTO test2 VALUES(1, 2)");
> box.execute("SELECT MAX(f1) FROM test1")
> ---
> - metadata:
> - - name: MAX(f1)
> + - name: _COLUMN_1
> type: scalar
> rows:
> - [4]
> @@ -56,7 +56,7 @@ box.execute("SELECT MAX(f1) FROM test1")
> box.execute("SELECT MAX(f2) FROM test1")
> ---
> - metadata:
> - - name: MAX(f2)
> + - name: _COLUMN_1
> type: scalar
> rows:
> - [3]
> @@ -64,7 +64,7 @@ box.execute("SELECT MAX(f2) FROM test1")
> box.execute("SELECT MAX(f1) FROM test2")
> ---
> - metadata:
> - - name: MAX(f1)
> + - name: _COLUMN_1
> type: scalar
> rows:
> - [1]
> diff --git a/test/sql/misc.result b/test/sql/misc.result
> index 0190a5897..552c5196d 100644
> --- a/test/sql/misc.result
> +++ b/test/sql/misc.result
> @@ -1,142 +1,148 @@
> +-- test-run result file version 2
> test_run = require('test_run').new()
> ----
> -...
> + | ---
> + | ...
> engine = test_run:get_cfg('engine')
> ----
> -...
> + | ---
> + | ...
> _ = box.space._session_settings:update('sql_default_engine', {{'=', 2, engine}})
> ----
> -...
> + | ---
> + | ...
> +
> -- Forbid multistatement queries.
> box.execute('select 1;')
> ----
> -- metadata:
> - - name: '1'
> - type: integer
> - rows:
> - - [1]
> -...
> + | ---
> + | - metadata:
> + | - name: _COLUMN_1
> + | type: integer
> + | rows:
> + | - [1]
> + | ...
> box.execute('select 1; select 2;')
> ----
> -- null
> -- 'At line 1 at or near position 11: keyword ''select'' is reserved. Please use double
> - quotes if ''select'' is an identifier.'
> -...
> + | ---
> + | - null
> + | - 'At line 1 at or near position 11: keyword ''select'' is reserved. Please use double
> + | quotes if ''select'' is an identifier.'
> + | ...
> box.execute('create table t1 (id INT primary key); select 100;')
> ----
> -- null
> -- 'At line 1 at or near position 39: keyword ''select'' is reserved. Please use double
> - quotes if ''select'' is an identifier.'
> -...
> + | ---
> + | - null
> + | - 'At line 1 at or near position 39: keyword ''select'' is reserved. Please use double
> + | quotes if ''select'' is an identifier.'
> + | ...
> box.space.t1 == nil
> ----
> -- true
> -...
> + | ---
> + | - true
> + | ...
> box.execute(';')
> ----
> -- null
> -- Failed to execute an empty SQL statement
> -...
> + | ---
> + | - null
> + | - Failed to execute an empty SQL statement
> + | ...
> box.execute('')
> ----
> -- null
> -- Failed to execute an empty SQL statement
> -...
> + | ---
> + | - null
> + | - Failed to execute an empty SQL statement
> + | ...
> box.execute(' ;')
> ----
> -- null
> -- Failed to execute an empty SQL statement
> -...
> + | ---
> + | - null
> + | - Failed to execute an empty SQL statement
> + | ...
> box.execute('\n\n\n\t\t\t ')
> ----
> -- null
> -- Failed to execute an empty SQL statement
> -...
> + | ---
> + | - null
> + | - Failed to execute an empty SQL statement
> + | ...
> +
> -- gh-3820: only table constraints can have a name.
> --
> box.execute('CREATE TABLE test (id INTEGER PRIMARY KEY, b INTEGER CONSTRAINT c1 NULL)')
> ----
> -- null
> -- 'At line 1 at or near position 68: keyword ''NULL'' is reserved. Please use double
> - quotes if ''NULL'' is an identifier.'
> -...
> + | ---
> + | - null
> + | - 'At line 1 at or near position 68: keyword ''NULL'' is reserved. Please use double
> + | quotes if ''NULL'' is an identifier.'
> + | ...
> box.execute('CREATE TABLE test (id INTEGER PRIMARY KEY, b INTEGER CONSTRAINT c1 DEFAULT 300)')
> ----
> -- null
> -- 'At line 1 at or near position 68: keyword ''DEFAULT'' is reserved. Please use double
> - quotes if ''DEFAULT'' is an identifier.'
> -...
> + | ---
> + | - null
> + | - 'At line 1 at or near position 68: keyword ''DEFAULT'' is reserved. Please use double
> + | quotes if ''DEFAULT'' is an identifier.'
> + | ...
> box.execute('CREATE TABLE test (id INTEGER PRIMARY KEY, b TEXT CONSTRAINT c1 COLLATE "binary")')
> ----
> -- null
> -- 'At line 1 at or near position 65: keyword ''COLLATE'' is reserved. Please use double
> - quotes if ''COLLATE'' is an identifier.'
> -...
> + | ---
> + | - null
> + | - 'At line 1 at or near position 65: keyword ''COLLATE'' is reserved. Please use double
> + | quotes if ''COLLATE'' is an identifier.'
> + | ...
> +
> -- Make sure that type of literals in meta complies with its real
> -- type. For instance, typeof(0.5) is number, not integer.
> --
> box.execute('SELECT 1;')
> ----
> -- metadata:
> - - name: '1'
> - type: integer
> - rows:
> - - [1]
> -...
> + | ---
> + | - metadata:
> + | - name: _COLUMN_1
> + | type: integer
> + | rows:
> + | - [1]
> + | ...
> box.execute('SELECT 1.5;')
> ----
> -- metadata:
> - - name: '1.5'
> - type: double
> - rows:
> - - [1.5]
> -...
> + | ---
> + | - metadata:
> + | - name: _COLUMN_1
> + | type: double
> + | rows:
> + | - [1.5]
> + | ...
> box.execute('SELECT 1.0;')
> ----
> -- metadata:
> - - name: '1.0'
> - type: double
> - rows:
> - - [1]
> -...
> + | ---
> + | - metadata:
> + | - name: _COLUMN_1
> + | type: double
> + | rows:
> + | - [1]
> + | ...
> box.execute('SELECT \'abc\';')
> ----
> -- metadata:
> - - name: '''abc'''
> - type: string
> - rows:
> - - ['abc']
> -...
> + | ---
> + | - metadata:
> + | - name: _COLUMN_1
> + | type: string
> + | rows:
> + | - ['abc']
> + | ...
> box.execute('SELECT X\'4D6564766564\'')
> ----
> -- metadata:
> - - name: X'4D6564766564'
> - type: varbinary
> - rows:
> - - ['Medved']
> -...
> + | ---
> + | - metadata:
> + | - name: _COLUMN_1
> + | type: varbinary
> + | rows:
> + | - ['Medved']
> + | ...
> +
> --
> -- gh-4139: assertion when reading a temporary space.
> --
> format = {{name = 'id', type = 'integer'}}
> ----
> -...
> + | ---
> + | ...
> s = box.schema.space.create('s',{format=format, temporary=true})
> ----
> -...
> + | ---
> + | ...
> i = s:create_index('i')
> ----
> -...
> + | ---
> + | ...
> box.execute('select * from "s"')
> ----
> -- metadata:
> - - name: id
> - type: integer
> - rows: []
> -...
> + | ---
> + | - metadata:
> + | - name: id
> + | type: integer
> + | rows: []
> + | ...
> s:drop()
> ----
> -...
> + | ---
> + | ...
> +
> --
> -- gh-4267: Full power of vdbe_field_ref
> -- Tarantool's SQL internally stores data offset for all acceded
> @@ -151,56 +157,57 @@ s:drop()
> -- beginning.
> ---
> format = {}
> ----
> -...
> + | ---
> + | ...
> t = {}
> ----
> -...
> + | ---
> + | ...
> for i = 1, 70 do \
> format[i] = {name = 'FIELD'..i, type = 'unsigned'} \
> t[i] = i \
> end
> ----
> -...
> + | ---
> + | ...
> s = box.schema.create_space('TEST', {format = format})
> ----
> -...
> + | ---
> + | ...
> pk = s:create_index('pk', {parts = {70}})
> ----
> -...
> + | ---
> + | ...
> s:insert(t)
> ----
> -- [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
> - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
> - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
> - 63, 64, 65, 66, 67, 68, 69, 70]
> -...
> + | ---
> + | - [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
> + | 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
> + | 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
> + | 63, 64, 65, 66, 67, 68, 69, 70]
> + | ...
> box.execute('SELECT field70, field64 FROM test')
> ----
> -- metadata:
> - - name: FIELD70
> - type: unsigned
> - - name: FIELD64
> - type: unsigned
> - rows:
> - - [70, 64]
> -...
> + | ---
> + | - metadata:
> + | - name: FIELD70
> + | type: unsigned
> + | - name: FIELD64
> + | type: unsigned
> + | rows:
> + | - [70, 64]
> + | ...
> +
> -- In the case below described optimization works fine.
> pk:alter({parts = {66}})
> ----
> -...
> + | ---
> + | ...
> box.execute('SELECT field66, field68, field70 FROM test')
> ----
> -- metadata:
> - - name: FIELD66
> - type: unsigned
> - - name: FIELD68
> - type: unsigned
> - - name: FIELD70
> - type: unsigned
> - rows:
> - - [66, 68, 70]
> -...
> + | ---
> + | - metadata:
> + | - name: FIELD66
> + | type: unsigned
> + | - name: FIELD68
> + | type: unsigned
> + | - name: FIELD70
> + | type: unsigned
> + | rows:
> + | - [66, 68, 70]
> + | ...
> box.space.TEST:drop()
> ----
> -...
> + | ---
> + | ...
> diff --git a/test/sql/persistency.result b/test/sql/persistency.result
> index 6d14d4c4e..307b5333b 100644
> --- a/test/sql/persistency.result
> +++ b/test/sql/persistency.result
> @@ -1,475 +1,495 @@
> +-- test-run result file version 2
> env = require('test_run')
> ----
> -...
> + | ---
> + | ...
> test_run = env.new()
> ----
> -...
> + | ---
> + | ...
> engine = test_run:get_cfg('engine')
> ----
> -...
> + | ---
> + | ...
> _ = box.space._session_settings:update('sql_default_engine', {{'=', 2, engine}})
> ----
> -...
> + | ---
> + | ...
> +
> -- create space
> box.execute("CREATE TABLE foobar (foo INT PRIMARY KEY, bar TEXT)")
> ----
> -- row_count: 1
> -...
> + | ---
> + | - row_count: 1
> + | ...
> +
> -- prepare data
> box.execute("INSERT INTO foobar VALUES (1, 'foo')")
> ----
> -- row_count: 1
> -...
> + | ---
> + | - row_count: 1
> + | ...
> box.execute("INSERT INTO foobar VALUES (2, 'bar')")
> ----
> -- row_count: 1
> -...
> + | ---
> + | - row_count: 1
> + | ...
> box.execute("INSERT INTO foobar VALUES (1000, 'foobar')")
> ----
> -- row_count: 1
> -...
> + | ---
> + | - row_count: 1
> + | ...
> +
> box.execute("INSERT INTO foobar VALUES (1, 'duplicate')")
> ----
> -- null
> -- Duplicate key exists in unique index 'pk_unnamed_FOOBAR_1' in space 'FOOBAR'
> -...
> + | ---
> + | - null
> + | - Duplicate key exists in unique index 'pk_unnamed_FOOBAR_1' in space 'FOOBAR'
> + | ...
> +
> -- simple select
> box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar")
> ----
> -- metadata:
> - - name: BAR
> - type: string
> - - name: FOO
> - type: integer
> - - name: '42'
> - type: integer
> - - name: '''awesome'''
> - type: string
> - rows:
> - - ['foo', 1, 42, 'awesome']
> - - ['bar', 2, 42, 'awesome']
> - - ['foobar', 1000, 42, 'awesome']
> -...
> + | ---
> + | - metadata:
> + | - name: BAR
> + | type: string
> + | - name: FOO
> + | type: integer
> + | - name: _COLUMN_3
> + | type: integer
> + | - name: _COLUMN_4
> + | type: string
> + | rows:
> + | - ['foo', 1, 42, 'awesome']
> + | - ['bar', 2, 42, 'awesome']
> + | - ['foobar', 1000, 42, 'awesome']
> + | ...
> box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar LIMIT 2")
> ----
> -- metadata:
> - - name: BAR
> - type: string
> - - name: FOO
> - type: integer
> - - name: '42'
> - type: integer
> - - name: '''awesome'''
> - type: string
> - rows:
> - - ['foo', 1, 42, 'awesome']
> - - ['bar', 2, 42, 'awesome']
> -...
> + | ---
> + | - metadata:
> + | - name: BAR
> + | type: string
> + | - name: FOO
> + | type: integer
> + | - name: _COLUMN_3
> + | type: integer
> + | - name: _COLUMN_4
> + | type: string
> + | rows:
> + | - ['foo', 1, 42, 'awesome']
> + | - ['bar', 2, 42, 'awesome']
> + | ...
> box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo=2")
> ----
> -- metadata:
> - - name: BAR
> - type: string
> - - name: FOO
> - type: integer
> - - name: '42'
> - type: integer
> - - name: '''awesome'''
> - type: string
> - rows:
> - - ['bar', 2, 42, 'awesome']
> -...
> + | ---
> + | - metadata:
> + | - name: BAR
> + | type: string
> + | - name: FOO
> + | type: integer
> + | - name: _COLUMN_3
> + | type: integer
> + | - name: _COLUMN_4
> + | type: string
> + | rows:
> + | - ['bar', 2, 42, 'awesome']
> + | ...
> box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo>2")
> ----
> -- metadata:
> - - name: BAR
> - type: string
> - - name: FOO
> - type: integer
> - - name: '42'
> - type: integer
> - - name: '''awesome'''
> - type: string
> - rows:
> - - ['foobar', 1000, 42, 'awesome']
> -...
> + | ---
> + | - metadata:
> + | - name: BAR
> + | type: string
> + | - name: FOO
> + | type: integer
> + | - name: _COLUMN_3
> + | type: integer
> + | - name: _COLUMN_4
> + | type: string
> + | rows:
> + | - ['foobar', 1000, 42, 'awesome']
> + | ...
> box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo>=2")
> ----
> -- metadata:
> - - name: BAR
> - type: string
> - - name: FOO
> - type: integer
> - - name: '42'
> - type: integer
> - - name: '''awesome'''
> - type: string
> - rows:
> - - ['bar', 2, 42, 'awesome']
> - - ['foobar', 1000, 42, 'awesome']
> -...
> + | ---
> + | - metadata:
> + | - name: BAR
> + | type: string
> + | - name: FOO
> + | type: integer
> + | - name: _COLUMN_3
> + | type: integer
> + | - name: _COLUMN_4
> + | type: string
> + | rows:
> + | - ['bar', 2, 42, 'awesome']
> + | - ['foobar', 1000, 42, 'awesome']
> + | ...
> box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo=10000")
> ----
> -- metadata:
> - - name: BAR
> - type: string
> - - name: FOO
> - type: integer
> - - name: '42'
> - type: integer
> - - name: '''awesome'''
> - type: string
> - rows: []
> -...
> + | ---
> + | - metadata:
> + | - name: BAR
> + | type: string
> + | - name: FOO
> + | type: integer
> + | - name: _COLUMN_3
> + | type: integer
> + | - name: _COLUMN_4
> + | type: string
> + | rows: []
> + | ...
> box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo>10000")
> ----
> -- metadata:
> - - name: BAR
> - type: string
> - - name: FOO
> - type: integer
> - - name: '42'
> - type: integer
> - - name: '''awesome'''
> - type: string
> - rows: []
> -...
> + | ---
> + | - metadata:
> + | - name: BAR
> + | type: string
> + | - name: FOO
> + | type: integer
> + | - name: _COLUMN_3
> + | type: integer
> + | - name: _COLUMN_4
> + | type: string
> + | rows: []
> + | ...
> box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<2")
> ----
> -- metadata:
> - - name: BAR
> - type: string
> - - name: FOO
> - type: integer
> - - name: '42'
> - type: integer
> - - name: '''awesome'''
> - type: string
> - rows:
> - - ['foo', 1, 42, 'awesome']
> -...
> + | ---
> + | - metadata:
> + | - name: BAR
> + | type: string
> + | - name: FOO
> + | type: integer
> + | - name: _COLUMN_3
> + | type: integer
> + | - name: _COLUMN_4
> + | type: string
> + | rows:
> + | - ['foo', 1, 42, 'awesome']
> + | ...
> box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<2.001")
> ----
> -- metadata:
> - - name: BAR
> - type: string
> - - name: FOO
> - type: integer
> - - name: '42'
> - type: integer
> - - name: '''awesome'''
> - type: string
> - rows:
> - - ['foo', 1, 42, 'awesome']
> - - ['bar', 2, 42, 'awesome']
> -...
> + | ---
> + | - metadata:
> + | - name: BAR
> + | type: string
> + | - name: FOO
> + | type: integer
> + | - name: _COLUMN_3
> + | type: integer
> + | - name: _COLUMN_4
> + | type: string
> + | rows:
> + | - ['foo', 1, 42, 'awesome']
> + | - ['bar', 2, 42, 'awesome']
> + | ...
> box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<=2")
> ----
> -- metadata:
> - - name: BAR
> - type: string
> - - name: FOO
> - type: integer
> - - name: '42'
> - type: integer
> - - name: '''awesome'''
> - type: string
> - rows:
> - - ['foo', 1, 42, 'awesome']
> - - ['bar', 2, 42, 'awesome']
> -...
> + | ---
> + | - metadata:
> + | - name: BAR
> + | type: string
> + | - name: FOO
> + | type: integer
> + | - name: _COLUMN_3
> + | type: integer
> + | - name: _COLUMN_4
> + | type: string
> + | rows:
> + | - ['foo', 1, 42, 'awesome']
> + | - ['bar', 2, 42, 'awesome']
> + | ...
> box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<100")
> ----
> -- metadata:
> - - name: BAR
> - type: string
> - - name: FOO
> - type: integer
> - - name: '42'
> - type: integer
> - - name: '''awesome'''
> - type: string
> - rows:
> - - ['foo', 1, 42, 'awesome']
> - - ['bar', 2, 42, 'awesome']
> -...
> + | ---
> + | - metadata:
> + | - name: BAR
> + | type: string
> + | - name: FOO
> + | type: integer
> + | - name: _COLUMN_3
> + | type: integer
> + | - name: _COLUMN_4
> + | type: string
> + | rows:
> + | - ['foo', 1, 42, 'awesome']
> + | - ['bar', 2, 42, 'awesome']
> + | ...
> box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE bar='foo'")
> ----
> -- metadata:
> - - name: BAR
> - type: string
> - - name: FOO
> - type: integer
> - - name: '42'
> - type: integer
> - - name: '''awesome'''
> - type: string
> - rows:
> - - ['foo', 1, 42, 'awesome']
> -...
> + | ---
> + | - metadata:
> + | - name: BAR
> + | type: string
> + | - name: FOO
> + | type: integer
> + | - name: _COLUMN_3
> + | type: integer
> + | - name: _COLUMN_4
> + | type: string
> + | rows:
> + | - ['foo', 1, 42, 'awesome']
> + | ...
> box.execute("SELECT count(*) FROM foobar")
> ----
> -- metadata:
> - - name: count(*)
> - type: integer
> - rows:
> - - [3]
> -...
> + | ---
> + | - metadata:
> + | - name: _COLUMN_1
> + | type: integer
> + | rows:
> + | - [3]
> + | ...
> box.execute("SELECT count(*) FROM foobar WHERE bar='foo'")
> ----
> -- metadata:
> - - name: count(*)
> - type: integer
> - rows:
> - - [1]
> -...
> + | ---
> + | - metadata:
> + | - name: _COLUMN_1
> + | type: integer
> + | rows:
> + | - [1]
> + | ...
> box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar ORDER BY bar")
> ----
> -- metadata:
> - - name: BAR
> - type: string
> - - name: FOO
> - type: integer
> - - name: '42'
> - type: integer
> - - name: '''awesome'''
> - type: string
> - rows:
> - - ['bar', 2, 42, 'awesome']
> - - ['foo', 1, 42, 'awesome']
> - - ['foobar', 1000, 42, 'awesome']
> -...
> + | ---
> + | - metadata:
> + | - name: BAR
> + | type: string
> + | - name: FOO
> + | type: integer
> + | - name: _COLUMN_3
> + | type: integer
> + | - name: _COLUMN_4
> + | type: string
> + | rows:
> + | - ['bar', 2, 42, 'awesome']
> + | - ['foo', 1, 42, 'awesome']
> + | - ['foobar', 1000, 42, 'awesome']
> + | ...
> box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar ORDER BY bar DESC")
> ----
> -- metadata:
> - - name: BAR
> - type: string
> - - name: FOO
> - type: integer
> - - name: '42'
> - type: integer
> - - name: '''awesome'''
> - type: string
> - rows:
> - - ['foobar', 1000, 42, 'awesome']
> - - ['foo', 1, 42, 'awesome']
> - - ['bar', 2, 42, 'awesome']
> -...
> + | ---
> + | - metadata:
> + | - name: BAR
> + | type: string
> + | - name: FOO
> + | type: integer
> + | - name: _COLUMN_3
> + | type: integer
> + | - name: _COLUMN_4
> + | type: string
> + | rows:
> + | - ['foobar', 1000, 42, 'awesome']
> + | - ['foo', 1, 42, 'awesome']
> + | - ['bar', 2, 42, 'awesome']
> + | ...
> +
> -- updates
> box.execute("REPLACE INTO foobar VALUES (1, 'cacodaemon')")
> ----
> -- row_count: 2
> -...
> + | ---
> + | - row_count: 2
> + | ...
> box.execute("SELECT COUNT(*) FROM foobar WHERE foo=1")
> ----
> -- metadata:
> - - name: COUNT(*)
> - type: integer
> - rows:
> - - [1]
> -...
> + | ---
> + | - metadata:
> + | - name: _COLUMN_1
> + | type: integer
> + | rows:
> + | - [1]
> + | ...
> box.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'")
> ----
> -- metadata:
> - - name: COUNT(*)
> - type: integer
> - rows:
> - - [1]
> -...
> + | ---
> + | - metadata:
> + | - name: _COLUMN_1
> + | type: integer
> + | rows:
> + | - [1]
> + | ...
> box.execute("DELETE FROM foobar WHERE bar='cacodaemon'")
> ----
> -- row_count: 1
> -...
> + | ---
> + | - row_count: 1
> + | ...
> box.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'")
> ----
> -- metadata:
> - - name: COUNT(*)
> - type: integer
> - rows:
> - - [0]
> -...
> + | ---
> + | - metadata:
> + | - name: _COLUMN_1
> + | type: integer
> + | rows:
> + | - [0]
> + | ...
> +
> -- multi-index
> +
> -- create space
> box.execute("CREATE TABLE barfoo (bar TEXT, foo NUMBER PRIMARY KEY)")
> ----
> -- row_count: 1
> -...
> + | ---
> + | - row_count: 1
> + | ...
> box.execute("CREATE UNIQUE INDEX barfoo2 ON barfoo(bar)")
> ----
> -- row_count: 1
> -...
> + | ---
> + | - row_count: 1
> + | ...
> +
> -- prepare data
> box.execute("INSERT INTO barfoo VALUES ('foo', 1)")
> ----
> -- row_count: 1
> -...
> + | ---
> + | - row_count: 1
> + | ...
> box.execute("INSERT INTO barfoo VALUES ('bar', 2)")
> ----
> -- row_count: 1
> -...
> + | ---
> + | - row_count: 1
> + | ...
> box.execute("INSERT INTO barfoo VALUES ('foobar', 1000)")
> ----
> -- row_count: 1
> -...
> + | ---
> + | - row_count: 1
> + | ...
> +
> -- create a trigger
> box.execute("CREATE TRIGGER tfoobar AFTER INSERT ON foobar FOR EACH ROW BEGIN INSERT INTO barfoo VALUES ('trigger test', 9999); END")
> ----
> -- row_count: 1
> -...
> + | ---
> + | - row_count: 1
> + | ...
> box.execute("SELECT \"name\", \"opts\" FROM \"_trigger\"");
> ----
> -- metadata:
> - - name: name
> - type: string
> - - name: opts
> - type: map
> - rows:
> - - ['TFOOBAR', {'sql': 'CREATE TRIGGER tfoobar AFTER INSERT ON foobar FOR EACH ROW
> - BEGIN INSERT INTO barfoo VALUES (''trigger test'', 9999); END'}]
> -...
> + | ---
> + | - metadata:
> + | - name: name
> + | type: string
> + | - name: opts
> + | type: map
> + | rows:
> + | - ['TFOOBAR', {'sql': 'CREATE TRIGGER tfoobar AFTER INSERT ON foobar FOR EACH ROW
> + | BEGIN INSERT INTO barfoo VALUES (''trigger test'', 9999); END'}]
> + | ...
> +
> -- Many entries
> box.execute("CREATE TABLE t1(a INT,b INT,c INT,PRIMARY KEY(b,c));")
> ----
> -- row_count: 1
> -...
> + | ---
> + | - row_count: 1
> + | ...
> box.execute("WITH RECURSIVE cnt(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM cnt WHERE x<1000) INSERT INTO t1 SELECT x, x%40, x/40 FROM cnt;")
> ----
> -- row_count: 1000
> -...
> + | ---
> + | - row_count: 1000
> + | ...
> box.execute("SELECT a FROM t1 ORDER BY b, a LIMIT 10 OFFSET 20;");
> ----
> -- metadata:
> - - name: A
> - type: integer
> - rows:
> - - [840]
> - - [880]
> - - [920]
> - - [960]
> - - [1000]
> - - [1]
> - - [41]
> - - [81]
> - - [121]
> - - [161]
> -...
> + | ---
> + | - metadata:
> + | - name: A
> + | type: integer
> + | rows:
> + | - [840]
> + | - [880]
> + | - [920]
> + | - [960]
> + | - [1000]
> + | - [1]
> + | - [41]
> + | - [81]
> + | - [121]
> + | - [161]
> + | ...
> +
> test_run:cmd('restart server default');
> + |
> +
> -- prove that trigger survived
> box.execute("SELECT \"name\", \"opts\" FROM \"_trigger\"");
> ----
> -- metadata:
> - - name: name
> - type: string
> - - name: opts
> - type: map
> - rows:
> - - ['TFOOBAR', {'sql': 'CREATE TRIGGER tfoobar AFTER INSERT ON foobar FOR EACH ROW
> - BEGIN INSERT INTO barfoo VALUES (''trigger test'', 9999); END'}]
> -...
> + | ---
> + | - metadata:
> + | - name: name
> + | type: string
> + | - name: opts
> + | type: map
> + | rows:
> + | - ['TFOOBAR', {'sql': 'CREATE TRIGGER tfoobar AFTER INSERT ON foobar FOR EACH ROW
> + | BEGIN INSERT INTO barfoo VALUES (''trigger test'', 9999); END'}]
> + | ...
> +
> -- ... functional
> box.execute("INSERT INTO foobar VALUES ('foobar trigger test', 8888)")
> ----
> -- null
> -- 'Type mismatch: can not convert foobar trigger test to integer'
> -...
> + | ---
> + | - null
> + | - 'Type mismatch: can not convert foobar trigger test to integer'
> + | ...
> box.execute("SELECT * FROM barfoo WHERE foo = 9999");
> ----
> -- metadata:
> - - name: BAR
> - type: string
> - - name: FOO
> - type: number
> - rows: []
> -...
> + | ---
> + | - metadata:
> + | - name: BAR
> + | type: string
> + | - name: FOO
> + | type: number
> + | rows: []
> + | ...
> +
> -- and still persistent
> box.execute("SELECT \"name\", \"opts\" FROM \"_trigger\"")
> ----
> -- metadata:
> - - name: name
> - type: string
> - - name: opts
> - type: map
> - rows:
> - - ['TFOOBAR', {'sql': 'CREATE TRIGGER tfoobar AFTER INSERT ON foobar FOR EACH ROW
> - BEGIN INSERT INTO barfoo VALUES (''trigger test'', 9999); END'}]
> -...
> + | ---
> + | - metadata:
> + | - name: name
> + | type: string
> + | - name: opts
> + | type: map
> + | rows:
> + | - ['TFOOBAR', {'sql': 'CREATE TRIGGER tfoobar AFTER INSERT ON foobar FOR EACH ROW
> + | BEGIN INSERT INTO barfoo VALUES (''trigger test'', 9999); END'}]
> + | ...
> +
> -- and can be dropped just once
> box.execute("DROP TRIGGER tfoobar")
> ----
> -- row_count: 1
> -...
> + | ---
> + | - row_count: 1
> + | ...
> -- Should error
> box.execute("DROP TRIGGER tfoobar")
> ----
> -- null
> -- Trigger 'TFOOBAR' doesn't exist
> -...
> + | ---
> + | - null
> + | - Trigger 'TFOOBAR' doesn't exist
> + | ...
> -- Should be empty
> box.execute("SELECT \"name\", \"opts\" FROM \"_trigger\"")
> ----
> -- metadata:
> - - name: name
> - type: string
> - - name: opts
> - type: map
> - rows: []
> -...
> + | ---
> + | - metadata:
> + | - name: name
> + | type: string
> + | - name: opts
> + | type: map
> + | rows: []
> + | ...
> +
> -- prove barfoo2 still exists
> box.execute("INSERT INTO barfoo VALUES ('xfoo', 1)")
> ----
> -- null
> -- Duplicate key exists in unique index 'pk_unnamed_BARFOO_1' in space 'BARFOO'
> -...
> + | ---
> + | - null
> + | - Duplicate key exists in unique index 'pk_unnamed_BARFOO_1' in space 'BARFOO'
> + | ...
> +
> box.execute("SELECT * FROM barfoo")
> ----
> -- metadata:
> - - name: BAR
> - type: string
> - - name: FOO
> - type: number
> - rows:
> - - ['foo', 1]
> - - ['bar', 2]
> - - ['foobar', 1000]
> -...
> + | ---
> + | - metadata:
> + | - name: BAR
> + | type: string
> + | - name: FOO
> + | type: number
> + | rows:
> + | - ['foo', 1]
> + | - ['bar', 2]
> + | - ['foobar', 1000]
> + | ...
> box.execute("SELECT * FROM foobar");
> ----
> -- metadata:
> - - name: FOO
> - type: integer
> - - name: BAR
> - type: string
> - rows:
> - - [2, 'bar']
> - - [1000, 'foobar']
> -...
> + | ---
> + | - metadata:
> + | - name: FOO
> + | type: integer
> + | - name: BAR
> + | type: string
> + | rows:
> + | - [2, 'bar']
> + | - [1000, 'foobar']
> + | ...
> box.execute("SELECT a FROM t1 ORDER BY b, a LIMIT 10 OFFSET 20;");
> ----
> -- metadata:
> - - name: A
> - type: integer
> - rows:
> - - [840]
> - - [880]
> - - [920]
> - - [960]
> - - [1000]
> - - [1]
> - - [41]
> - - [81]
> - - [121]
> - - [161]
> -...
> + | ---
> + | - metadata:
> + | - name: A
> + | type: integer
> + | rows:
> + | - [840]
> + | - [880]
> + | - [920]
> + | - [960]
> + | - [1000]
> + | - [1]
> + | - [41]
> + | - [81]
> + | - [121]
> + | - [161]
> + | ...
> +
> -- cleanup
> box.execute("DROP TABLE foobar")
> ----
> -- row_count: 1
> -...
> + | ---
> + | - row_count: 1
> + | ...
> box.execute("DROP TABLE barfoo")
> ----
> -- row_count: 1
> -...
> + | ---
> + | - row_count: 1
> + | ...
> box.execute("DROP TABLE t1")
> ----
> -- row_count: 1
> -...
> + | ---
> + | - row_count: 1
> + | ...
> diff --git a/test/sql/prepared.result b/test/sql/prepared.result
> index 5a16ea3b1..f3f79954e 100644
> --- a/test/sql/prepared.result
> +++ b/test/sql/prepared.result
> @@ -425,13 +425,13 @@ s = prepare("SELECT count(*), count(a - 3), max(b), abs(id) FROM test WHERE b =
> execute(s.stmt_id)
> | ---
> | - metadata:
> - | - name: count(*)
> + | - name: _COLUMN_1
> | type: integer
> - | - name: count(a - 3)
> + | - name: _COLUMN_2
> | type: integer
> - | - name: max(b)
> + | - name: _COLUMN_3
> | type: scalar
> - | - name: abs(id)
> + | - name: _COLUMN_4
> | type: number
> | rows:
> | - [1, 1, '3', 1]
> @@ -439,13 +439,13 @@ execute(s.stmt_id)
> execute(s.stmt_id)
> | ---
> | - metadata:
> - | - name: count(*)
> + | - name: _COLUMN_1
> | type: integer
> - | - name: count(a - 3)
> + | - name: _COLUMN_2
> | type: integer
> - | - name: max(b)
> + | - name: _COLUMN_3
> | type: scalar
> - | - name: abs(id)
> + | - name: _COLUMN_4
> | type: number
> | rows:
> | - [1, 1, '3', 1]
> @@ -480,7 +480,7 @@ res = execute(s.stmt_id)
> | ...
> res.metadata
> | ---
> - | - - name: group_concat(TRIM(TRAILING FROM t),x'0a')
> + | - - name: _COLUMN_1
> | type: string
> | ...
> unprepare(s.stmt_id)
> diff --git a/test/sql/row-count.result b/test/sql/row-count.result
> index 02acd79b5..71b932285 100644
> --- a/test/sql/row-count.result
> +++ b/test/sql/row-count.result
> @@ -16,7 +16,7 @@ box.execute("CREATE TABLE t1 (s1 VARCHAR(10) PRIMARY KEY);")
> box.execute("SELECT ROW_COUNT();")
> ---
> - metadata:
> - - name: ROW_COUNT()
> + - name: _COLUMN_1
> type: integer
> rows:
> - [1]
> @@ -24,7 +24,7 @@ box.execute("SELECT ROW_COUNT();")
> box.execute("SELECT ROW_COUNT();")
> ---
> - metadata:
> - - name: ROW_COUNT()
> + - name: _COLUMN_1
> type: integer
> rows:
> - [0]
> @@ -36,7 +36,7 @@ box.execute("CREATE TABLE t2 (s1 VARCHAR(10) PRIMARY KEY, s2 VARCHAR(10) REFEREN
> box.execute("SELECT ROW_COUNT();")
> ---
> - metadata:
> - - name: ROW_COUNT()
> + - name: _COLUMN_1
> type: integer
> rows:
> - [1]
> @@ -52,7 +52,7 @@ box.execute("INSERT INTO t3 VALUES (0, 0, 0);")
> box.execute("SELECT ROW_COUNT();")
> ---
> - metadata:
> - - name: ROW_COUNT()
> + - name: _COLUMN_1
> type: integer
> rows:
> - [1]
> @@ -64,7 +64,7 @@ box.execute("CREATE TRIGGER x AFTER DELETE ON t1 FOR EACH ROW BEGIN UPDATE t3 SE
> box.execute("SELECT ROW_COUNT();")
> ---
> - metadata:
> - - name: ROW_COUNT()
> + - name: _COLUMN_1
> type: integer
> rows:
> - [1]
> @@ -76,7 +76,7 @@ box.execute("INSERT INTO t1 VALUES ('a');")
> box.execute("SELECT ROW_COUNT();")
> ---
> - metadata:
> - - name: ROW_COUNT()
> + - name: _COLUMN_1
> type: integer
> rows:
> - [1]
> @@ -88,7 +88,7 @@ box.execute("INSERT INTO t2 VALUES ('a','a');")
> box.execute("SELECT ROW_COUNT();")
> ---
> - metadata:
> - - name: ROW_COUNT()
> + - name: _COLUMN_1
> type: integer
> rows:
> - [1]
> @@ -100,7 +100,7 @@ box.execute("INSERT INTO t1 VALUES ('b'), ('c'), ('d');")
> box.execute("SELECT ROW_COUNT();")
> ---
> - metadata:
> - - name: ROW_COUNT()
> + - name: _COLUMN_1
> type: integer
> rows:
> - [3]
> @@ -113,7 +113,7 @@ box.execute("REPLACE INTO t2 VALUES('a', 'c');")
> box.execute("SELECT ROW_COUNT();")
> ---
> - metadata:
> - - name: ROW_COUNT()
> + - name: _COLUMN_1
> type: integer
> rows:
> - [2]
> @@ -125,7 +125,7 @@ box.execute("DELETE FROM t1;")
> box.execute("SELECT ROW_COUNT();")
> ---
> - metadata:
> - - name: ROW_COUNT()
> + - name: _COLUMN_1
> type: integer
> rows:
> - [4]
> @@ -141,7 +141,7 @@ box.execute("TRUNCATE TABLE t3;")
> box.execute("SELECT ROW_COUNT();")
> ---
> - metadata:
> - - name: ROW_COUNT()
> + - name: _COLUMN_1
> type: integer
> rows:
> - [0]
> @@ -157,7 +157,7 @@ box.execute("UPDATE t3 SET i2 = 666;")
> box.execute("SELECT ROW_COUNT();")
> ---
> - metadata:
> - - name: ROW_COUNT()
> + - name: _COLUMN_1
> type: integer
> rows:
> - [3]
> @@ -172,7 +172,7 @@ box.execute("DELETE FROM t3 WHERE 0 = 0;")
> box.execute("SELECT ROW_COUNT();")
> ---
> - metadata:
> - - name: ROW_COUNT()
> + - name: _COLUMN_1
> type: integer
> rows:
> - [3]
> @@ -188,7 +188,7 @@ box.execute("DELETE FROM t3")
> box.execute("SELECT ROW_COUNT();")
> ---
> - metadata:
> - - name: ROW_COUNT()
> + - name: _COLUMN_1
> type: integer
> rows:
> - [3]
> @@ -222,7 +222,7 @@ box.execute("DELETE FROM tt1 WHERE id = 2;")
> box.execute("SELECT ROW_COUNT();")
> ---
> - metadata:
> - - name: ROW_COUNT()
> + - name: _COLUMN_1
> type: integer
> rows:
> - [1]
> @@ -252,7 +252,7 @@ box.execute("START TRANSACTION;")
> box.execute("SELECT ROW_COUNT();")
> ---
> - metadata:
> - - name: ROW_COUNT()
> + - name: _COLUMN_1
> type: integer
> rows:
> - [0]
> @@ -264,7 +264,7 @@ box.execute("COMMIT;")
> box.execute("SELECT ROW_COUNT();")
> ---
> - metadata:
> - - name: ROW_COUNT()
> + - name: _COLUMN_1
> type: integer
> rows:
> - [0]
> @@ -277,7 +277,7 @@ box.execute("COMMIT;")
> box.execute("SELECT ROW_COUNT();")
> ---
> - metadata:
> - - name: ROW_COUNT()
> + - name: _COLUMN_1
> type: integer
> rows:
> - [0]
> @@ -286,7 +286,7 @@ box.execute("SELECT ROW_COUNT();")
> box.execute("SELECT ROW_COUNT();")
> ---
> - metadata:
> - - name: ROW_COUNT()
> + - name: _COLUMN_1
> type: integer
> rows:
> - [0]
> @@ -308,7 +308,7 @@ box.execute("EXPLAIN QUERY PLAN INSERT INTO t1 VALUES ('b'), ('c'), ('d');")
> box.execute("SELECT ROW_COUNT();")
> ---
> - metadata:
> - - name: ROW_COUNT()
> + - name: _COLUMN_1
> type: integer
> rows:
> - [0]
> diff --git a/test/sql/transition.result b/test/sql/transition.result
> index c14055b4e..0decc528c 100644
> --- a/test/sql/transition.result
> +++ b/test/sql/transition.result
> @@ -38,9 +38,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar")
> type: string
> - name: FOO
> type: integer
> - - name: '42'
> + - name: _COLUMN_3
> type: integer
> - - name: '''awesome'''
> + - name: _COLUMN_4
> type: string
> rows:
> - ['foo', 1, 42, 'awesome']
> @@ -54,9 +54,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar LIMIT 2")
> type: string
> - name: FOO
> type: integer
> - - name: '42'
> + - name: _COLUMN_3
> type: integer
> - - name: '''awesome'''
> + - name: _COLUMN_4
> type: string
> rows:
> - ['foo', 1, 42, 'awesome']
> @@ -69,9 +69,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo=2")
> type: string
> - name: FOO
> type: integer
> - - name: '42'
> + - name: _COLUMN_3
> type: integer
> - - name: '''awesome'''
> + - name: _COLUMN_4
> type: string
> rows:
> - ['bar', 2, 42, 'awesome']
> @@ -83,9 +83,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo>2")
> type: string
> - name: FOO
> type: integer
> - - name: '42'
> + - name: _COLUMN_3
> type: integer
> - - name: '''awesome'''
> + - name: _COLUMN_4
> type: string
> rows:
> - ['foobar', 1000, 42, 'awesome']
> @@ -97,9 +97,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo>=2")
> type: string
> - name: FOO
> type: integer
> - - name: '42'
> + - name: _COLUMN_3
> type: integer
> - - name: '''awesome'''
> + - name: _COLUMN_4
> type: string
> rows:
> - ['bar', 2, 42, 'awesome']
> @@ -112,9 +112,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo=10000")
> type: string
> - name: FOO
> type: integer
> - - name: '42'
> + - name: _COLUMN_3
> type: integer
> - - name: '''awesome'''
> + - name: _COLUMN_4
> type: string
> rows: []
> ...
> @@ -125,9 +125,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo>10000")
> type: string
> - name: FOO
> type: integer
> - - name: '42'
> + - name: _COLUMN_3
> type: integer
> - - name: '''awesome'''
> + - name: _COLUMN_4
> type: string
> rows: []
> ...
> @@ -138,9 +138,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<2")
> type: string
> - name: FOO
> type: integer
> - - name: '42'
> + - name: _COLUMN_3
> type: integer
> - - name: '''awesome'''
> + - name: _COLUMN_4
> type: string
> rows:
> - ['foo', 1, 42, 'awesome']
> @@ -152,9 +152,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<2.001")
> type: string
> - name: FOO
> type: integer
> - - name: '42'
> + - name: _COLUMN_3
> type: integer
> - - name: '''awesome'''
> + - name: _COLUMN_4
> type: string
> rows:
> - ['foo', 1, 42, 'awesome']
> @@ -167,9 +167,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<=2")
> type: string
> - name: FOO
> type: integer
> - - name: '42'
> + - name: _COLUMN_3
> type: integer
> - - name: '''awesome'''
> + - name: _COLUMN_4
> type: string
> rows:
> - ['foo', 1, 42, 'awesome']
> @@ -182,9 +182,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<100")
> type: string
> - name: FOO
> type: integer
> - - name: '42'
> + - name: _COLUMN_3
> type: integer
> - - name: '''awesome'''
> + - name: _COLUMN_4
> type: string
> rows:
> - ['foo', 1, 42, 'awesome']
> @@ -197,9 +197,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE bar='foo'")
> type: string
> - name: FOO
> type: integer
> - - name: '42'
> + - name: _COLUMN_3
> type: integer
> - - name: '''awesome'''
> + - name: _COLUMN_4
> type: string
> rows:
> - ['foo', 1, 42, 'awesome']
> @@ -207,7 +207,7 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE bar='foo'")
> box.execute("SELECT count(*) FROM foobar")
> ---
> - metadata:
> - - name: count(*)
> + - name: _COLUMN_1
> type: integer
> rows:
> - [3]
> @@ -215,7 +215,7 @@ box.execute("SELECT count(*) FROM foobar")
> box.execute("SELECT count(*) FROM foobar WHERE bar='foo'")
> ---
> - metadata:
> - - name: count(*)
> + - name: _COLUMN_1
> type: integer
> rows:
> - [1]
> @@ -227,9 +227,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar ORDER BY bar")
> type: string
> - name: FOO
> type: integer
> - - name: '42'
> + - name: _COLUMN_3
> type: integer
> - - name: '''awesome'''
> + - name: _COLUMN_4
> type: string
> rows:
> - ['bar', 2, 42, 'awesome']
> @@ -243,9 +243,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar ORDER BY bar DESC")
> type: string
> - name: FOO
> type: integer
> - - name: '42'
> + - name: _COLUMN_3
> type: integer
> - - name: '''awesome'''
> + - name: _COLUMN_4
> type: string
> rows:
> - ['foobar', 1000, 42, 'awesome']
> @@ -260,7 +260,7 @@ box.execute("REPLACE INTO foobar VALUES (1, 'cacodaemon')")
> box.execute("SELECT COUNT(*) FROM foobar WHERE foo=1")
> ---
> - metadata:
> - - name: COUNT(*)
> + - name: _COLUMN_1
> type: integer
> rows:
> - [1]
> @@ -268,7 +268,7 @@ box.execute("SELECT COUNT(*) FROM foobar WHERE foo=1")
> box.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'")
> ---
> - metadata:
> - - name: COUNT(*)
> + - name: _COLUMN_1
> type: integer
> rows:
> - [1]
> @@ -280,7 +280,7 @@ box.execute("DELETE FROM foobar WHERE bar='cacodaemon'")
> box.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'")
> ---
> - metadata:
> - - name: COUNT(*)
> + - name: _COLUMN_1
> type: integer
> rows:
> - [0]
> diff --git a/test/sql/types.result b/test/sql/types.result
> index 38e4385ad..3520220a0 100644
> --- a/test/sql/types.result
> +++ b/test/sql/types.result
> @@ -54,8 +54,8 @@ box.execute("CREATE VIEW v1 AS SELECT b + a, b - a FROM t1;")
> ...
> box.space.V1:format()
> ---
> -- [{'type': 'number', 'nullable_action': 'none', 'name': 'b + a', 'is_nullable': true},
> - {'type': 'number', 'nullable_action': 'none', 'name': 'b - a', 'is_nullable': true}]
> +- [{'type': 'number', 'nullable_action': 'none', 'name': '_COLUMN_1', 'is_nullable': true},
> + {'type': 'number', 'nullable_action': 'none', 'name': '_COLUMN_2', 'is_nullable': true}]
> ...
> -- gh-2494: index's part also features correct declared type.
> --
> @@ -197,7 +197,7 @@ box.execute("SELECT randomblob(5) || 'x';")
> box.execute("VALUES (TYPEOF(randomblob(5) || zeroblob(5)));")
> ---
> - metadata:
> - - name: column1
> + - name: _COLUMN_1
> type: string
> rows:
> - ['varbinary']
> @@ -230,7 +230,7 @@ box.execute("SELECT * FROM t1 WHERE 'blob' LIKE x'0000';")
> box.execute("SELECT s LIKE NULL FROM t1;")
> ---
> - metadata:
> - - name: s LIKE NULL
> + - name: _COLUMN_1
> type: integer
> rows:
> - [null]
> @@ -256,7 +256,7 @@ box.execute("SELECT * FROM t1 WHERE 'int' LIKE 4;")
> box.execute("SELECT NULL LIKE s FROM t1;")
> ---
> - metadata:
> - - name: NULL LIKE s
> + - name: _COLUMN_1
> type: integer
> rows:
> - [null]
> @@ -270,7 +270,7 @@ box.space.T1:drop()
> box.execute("SELECT CAST('1.123' AS INTEGER);")
> ---
> - metadata:
> - - name: CAST('1.123' AS INTEGER)
> + - name: _COLUMN_1
> type: integer
> rows:
> - [1]
> @@ -286,7 +286,7 @@ box.execute("INSERT INTO t1 VALUES('0.0'), ('1.5'), ('3.9312453');")
> box.execute("SELECT CAST(f AS INTEGER) FROM t1;")
> ---
> - metadata:
> - - name: CAST(f AS INTEGER)
> + - name: _COLUMN_1
> type: integer
> rows:
> - [0]
> @@ -303,7 +303,7 @@ box.space.T1:drop()
> box.execute('SELECT 1 + 1;')
> ---
> - metadata:
> - - name: 1 + 1
> + - name: _COLUMN_1
> type: integer
> rows:
> - [2]
> @@ -311,7 +311,7 @@ box.execute('SELECT 1 + 1;')
> box.execute('SELECT 1 + 1.1;')
> ---
> - metadata:
> - - name: 1 + 1.1
> + - name: _COLUMN_1
> type: double
> rows:
> - [2.1]
> @@ -319,7 +319,7 @@ box.execute('SELECT 1 + 1.1;')
> box.execute('SELECT \'9223372036854\' + 1;')
> ---
> - metadata:
> - - name: '''9223372036854'' + 1'
> + - name: _COLUMN_1
> type: integer
> rows:
> - [9223372036855]
> @@ -328,7 +328,7 @@ box.execute('SELECT \'9223372036854\' + 1;')
> box.execute('SELECT ?', {true})
> ---
> - metadata:
> - - name: '?'
> + - name: _COLUMN_1
> type: boolean
> rows:
> - [true]
> @@ -489,7 +489,7 @@ s:drop()
> box.execute("SELECT 18446744073709551615 > 18446744073709551614;")
> ---
> - metadata:
> - - name: 18446744073709551615 > 18446744073709551614
> + - name: _COLUMN_1
> type: boolean
> rows:
> - [true]
> @@ -497,7 +497,7 @@ box.execute("SELECT 18446744073709551615 > 18446744073709551614;")
> box.execute("SELECT 18446744073709551615 > -9223372036854775808;")
> ---
> - metadata:
> - - name: 18446744073709551615 > -9223372036854775808
> + - name: _COLUMN_1
> type: boolean
> rows:
> - [true]
> @@ -505,7 +505,7 @@ box.execute("SELECT 18446744073709551615 > -9223372036854775808;")
> box.execute("SELECT -1 < 18446744073709551615;")
> ---
> - metadata:
> - - name: -1 < 18446744073709551615
> + - name: _COLUMN_1
> type: boolean
> rows:
> - [true]
> @@ -513,7 +513,7 @@ box.execute("SELECT -1 < 18446744073709551615;")
> box.execute("SELECT 1.5 < 18446744073709551615")
> ---
> - metadata:
> - - name: 1.5 < 18446744073709551615
> + - name: _COLUMN_1
> type: boolean
> rows:
> - [true]
> @@ -521,7 +521,7 @@ box.execute("SELECT 1.5 < 18446744073709551615")
> box.execute("SELECT 1.5 > 18446744073709551615")
> ---
> - metadata:
> - - name: 1.5 > 18446744073709551615
> + - name: _COLUMN_1
> type: boolean
> rows:
> - [false]
> @@ -529,7 +529,7 @@ box.execute("SELECT 1.5 > 18446744073709551615")
> box.execute("SELECT 18446744073709551615 > 1.5")
> ---
> - metadata:
> - - name: 18446744073709551615 > 1.5
> + - name: _COLUMN_1
> type: boolean
> rows:
> - [true]
> @@ -537,7 +537,7 @@ box.execute("SELECT 18446744073709551615 > 1.5")
> box.execute("SELECT 18446744073709551615 < 1.5")
> ---
> - metadata:
> - - name: 18446744073709551615 < 1.5
> + - name: _COLUMN_1
> type: boolean
> rows:
> - [false]
> @@ -545,7 +545,7 @@ box.execute("SELECT 18446744073709551615 < 1.5")
> box.execute("SELECT 18446744073709551615 = 18446744073709551615;")
> ---
> - metadata:
> - - name: 18446744073709551615 = 18446744073709551615
> + - name: _COLUMN_1
> type: boolean
> rows:
> - [true]
> @@ -553,7 +553,7 @@ box.execute("SELECT 18446744073709551615 = 18446744073709551615;")
> box.execute("SELECT 18446744073709551615 > -9223372036854775808;")
> ---
> - metadata:
> - - name: 18446744073709551615 > -9223372036854775808
> + - name: _COLUMN_1
> type: boolean
> rows:
> - [true]
> @@ -561,7 +561,7 @@ box.execute("SELECT 18446744073709551615 > -9223372036854775808;")
> box.execute("SELECT 18446744073709551615 < -9223372036854775808;")
> ---
> - metadata:
> - - name: 18446744073709551615 < -9223372036854775808
> + - name: _COLUMN_1
> type: boolean
> rows:
> - [false]
> @@ -569,7 +569,7 @@ box.execute("SELECT 18446744073709551615 < -9223372036854775808;")
> box.execute("SELECT -1 < 18446744073709551615;")
> ---
> - metadata:
> - - name: -1 < 18446744073709551615
> + - name: _COLUMN_1
> type: boolean
> rows:
> - [true]
> @@ -577,7 +577,7 @@ box.execute("SELECT -1 < 18446744073709551615;")
> box.execute("SELECT -1 > 18446744073709551615;")
> ---
> - metadata:
> - - name: -1 > 18446744073709551615
> + - name: _COLUMN_1
> type: boolean
> rows:
> - [false]
> @@ -585,7 +585,7 @@ box.execute("SELECT -1 > 18446744073709551615;")
> box.execute("SELECT 18446744073709551610 - 18446744073709551615;")
> ---
> - metadata:
> - - name: 18446744073709551610 - 18446744073709551615
> + - name: _COLUMN_1
> type: integer
> rows:
> - [-5]
> @@ -593,7 +593,7 @@ box.execute("SELECT 18446744073709551610 - 18446744073709551615;")
> box.execute("SELECT 18446744073709551615 = null;")
> ---
> - metadata:
> - - name: 18446744073709551615 = null
> + - name: _COLUMN_1
> type: boolean
> rows:
> - [null]
> @@ -601,7 +601,7 @@ box.execute("SELECT 18446744073709551615 = null;")
> box.execute("SELECT 18446744073709551615 = 18446744073709551615.0;")
> ---
> - metadata:
> - - name: 18446744073709551615 = 18446744073709551615.0
> + - name: _COLUMN_1
> type: boolean
> rows:
> - [false]
> @@ -609,7 +609,7 @@ box.execute("SELECT 18446744073709551615 = 18446744073709551615.0;")
> box.execute("SELECT 18446744073709551615.0 > 18446744073709551615")
> ---
> - metadata:
> - - name: 18446744073709551615.0 > 18446744073709551615
> + - name: _COLUMN_1
> type: boolean
> rows:
> - [true]
> @@ -617,7 +617,7 @@ box.execute("SELECT 18446744073709551615.0 > 18446744073709551615")
> box.execute("SELECT 18446744073709551615 IN ('18446744073709551615', 18446744073709551615.0)")
> ---
> - metadata:
> - - name: 18446744073709551615 IN ('18446744073709551615', 18446744073709551615.0)
> + - name: _COLUMN_1
> type: boolean
> rows:
> - [true]
> @@ -625,7 +625,7 @@ box.execute("SELECT 18446744073709551615 IN ('18446744073709551615', 18446744073
> box.execute("SELECT 1 LIMIT 18446744073709551615;")
> ---
> - metadata:
> - - name: '1'
> + - name: _COLUMN_1
> type: integer
> rows:
> - [1]
> @@ -633,7 +633,7 @@ box.execute("SELECT 1 LIMIT 18446744073709551615;")
> box.execute("SELECT 1 LIMIT 1 OFFSET 18446744073709551614;")
> ---
> - metadata:
> - - name: '1'
> + - name: _COLUMN_1
> type: integer
> rows: []
> ...
> @@ -645,7 +645,7 @@ box.execute("SELECT CAST('18446744073' || '709551616' AS INTEGER);")
> box.execute("SELECT CAST('18446744073' || '709551615' AS INTEGER);")
> ---
> - metadata:
> - - name: CAST('18446744073' || '709551615' AS INTEGER)
> + - name: _COLUMN_1
> type: integer
> rows:
> - [18446744073709551615]
> @@ -653,7 +653,7 @@ box.execute("SELECT CAST('18446744073' || '709551615' AS INTEGER);")
> box.execute("SELECT 18446744073709551610 + 5;")
> ---
> - metadata:
> - - name: 18446744073709551610 + 5
> + - name: _COLUMN_1
> type: integer
> rows:
> - [18446744073709551615]
> @@ -661,7 +661,7 @@ box.execute("SELECT 18446744073709551610 + 5;")
> box.execute("SELECT 18446744073709551615 * 1;")
> ---
> - metadata:
> - - name: 18446744073709551615 * 1
> + - name: _COLUMN_1
> type: integer
> rows:
> - [18446744073709551615]
> @@ -669,7 +669,7 @@ box.execute("SELECT 18446744073709551615 * 1;")
> box.execute("SELECT 1 / 18446744073709551615;")
> ---
> - metadata:
> - - name: 1 / 18446744073709551615
> + - name: _COLUMN_1
> type: integer
> rows:
> - [0]
> @@ -677,7 +677,7 @@ box.execute("SELECT 1 / 18446744073709551615;")
> box.execute("SELECT 18446744073709551615 / 18446744073709551615;")
> ---
> - metadata:
> - - name: 18446744073709551615 / 18446744073709551615
> + - name: _COLUMN_1
> type: integer
> rows:
> - [1]
> @@ -685,7 +685,7 @@ box.execute("SELECT 18446744073709551615 / 18446744073709551615;")
> box.execute("SELECT 18446744073709551615 / -9223372036854775808;")
> ---
> - metadata:
> - - name: 18446744073709551615 / -9223372036854775808
> + - name: _COLUMN_1
> type: integer
> rows:
> - [-1]
> @@ -779,7 +779,7 @@ box.execute("INSERT INTO t VALUES (2, -1);")
> box.execute("SELECT sum(i) FROM t;")
> ---
> - metadata:
> - - name: sum(i)
> + - name: _COLUMN_1
> type: number
> rows:
> - [18446744073709551613]
> @@ -787,7 +787,7 @@ box.execute("SELECT sum(i) FROM t;")
> box.execute("SELECT avg(i) FROM t;")
> ---
> - metadata:
> - - name: avg(i)
> + - name: _COLUMN_1
> type: number
> rows:
> - [6148914691236516864]
> @@ -795,7 +795,7 @@ box.execute("SELECT avg(i) FROM t;")
> box.execute("SELECT total(i) FROM t;")
> ---
> - metadata:
> - - name: total(i)
> + - name: _COLUMN_1
> type: number
> rows:
> - [1.844674407371e+19]
> @@ -803,7 +803,7 @@ box.execute("SELECT total(i) FROM t;")
> box.execute("SELECT min(i) FROM t;")
> ---
> - metadata:
> - - name: min(i)
> + - name: _COLUMN_1
> type: scalar
> rows:
> - [-1]
> @@ -811,7 +811,7 @@ box.execute("SELECT min(i) FROM t;")
> box.execute("SELECT max(i) FROM t;")
> ---
> - metadata:
> - - name: max(i)
> + - name: _COLUMN_1
> type: scalar
> rows:
> - [18446744073709551613]
> @@ -819,7 +819,7 @@ box.execute("SELECT max(i) FROM t;")
> box.execute("SELECT count(i) FROM t;")
> ---
> - metadata:
> - - name: count(i)
> + - name: _COLUMN_1
> type: integer
> rows:
> - [3]
> @@ -827,7 +827,7 @@ box.execute("SELECT count(i) FROM t;")
> box.execute("SELECT group_concat(i) FROM t;")
> ---
> - metadata:
> - - name: group_concat(i)
> + - name: _COLUMN_1
> type: string
> rows:
> - ['1,-1,18446744073709551613']
> @@ -839,7 +839,7 @@ box.execute("DELETE FROM t WHERE i < 18446744073709551613;")
> box.execute("SELECT lower(i) FROM t;")
> ---
> - metadata:
> - - name: lower(i)
> + - name: _COLUMN_1
> type: string
> rows:
> - ['18446744073709551613']
> @@ -847,7 +847,7 @@ box.execute("SELECT lower(i) FROM t;")
> box.execute("SELECT upper(i) FROM t;")
> ---
> - metadata:
> - - name: upper(i)
> + - name: _COLUMN_1
> type: string
> rows:
> - ['18446744073709551613']
> @@ -855,7 +855,7 @@ box.execute("SELECT upper(i) FROM t;")
> box.execute("SELECT abs(i) FROM t;")
> ---
> - metadata:
> - - name: abs(i)
> + - name: _COLUMN_1
> type: number
> rows:
> - [18446744073709551613]
> @@ -863,7 +863,7 @@ box.execute("SELECT abs(i) FROM t;")
> box.execute("SELECT typeof(i) FROM t;")
> ---
> - metadata:
> - - name: typeof(i)
> + - name: _COLUMN_1
> type: string
> rows:
> - ['integer']
> @@ -871,7 +871,7 @@ box.execute("SELECT typeof(i) FROM t;")
> box.execute("SELECT quote(i) FROM t;")
> ---
> - metadata:
> - - name: quote(i)
> + - name: _COLUMN_1
> type: string
> rows:
> - [18446744073709551613]
> @@ -879,7 +879,7 @@ box.execute("SELECT quote(i) FROM t;")
> box.execute("SELECT LEAST(-1, i) FROM t;")
> ---
> - metadata:
> - - name: LEAST(-1, i)
> + - name: _COLUMN_1
> type: scalar
> rows:
> - [-1]
> @@ -887,7 +887,7 @@ box.execute("SELECT LEAST(-1, i) FROM t;")
> box.execute("SELECT quote(i) FROM t;")
> ---
> - metadata:
> - - name: quote(i)
> + - name: _COLUMN_1
> type: string
> rows:
> - [18446744073709551613]
> @@ -1020,7 +1020,7 @@ box.space.T1:drop()
> box.execute("SELECT CAST(18446744073709551615 AS NUMBER);")
> ---
> - metadata:
> - - name: CAST(18446744073709551615 AS NUMBER)
> + - name: _COLUMN_1
> type: number
> rows:
> - [18446744073709551615]
> @@ -1028,7 +1028,7 @@ box.execute("SELECT CAST(18446744073709551615 AS NUMBER);")
> box.execute("SELECT CAST(18446744073709551615 AS TEXT);")
> ---
> - metadata:
> - - name: CAST(18446744073709551615 AS TEXT)
> + - name: _COLUMN_1
> type: string
> rows:
> - ['18446744073709551615']
> @@ -1036,7 +1036,7 @@ box.execute("SELECT CAST(18446744073709551615 AS TEXT);")
> box.execute("SELECT CAST(18446744073709551615 AS SCALAR);")
> ---
> - metadata:
> - - name: CAST(18446744073709551615 AS SCALAR)
> + - name: _COLUMN_1
> type: scalar
> rows:
> - [18446744073709551615]
> @@ -1044,7 +1044,7 @@ box.execute("SELECT CAST(18446744073709551615 AS SCALAR);")
> box.execute("SELECT CAST(18446744073709551615 AS BOOLEAN);")
> ---
> - metadata:
> - - name: CAST(18446744073709551615 AS BOOLEAN)
> + - name: _COLUMN_1
> type: boolean
> rows:
> - [true]
> @@ -1052,7 +1052,7 @@ box.execute("SELECT CAST(18446744073709551615 AS BOOLEAN);")
> box.execute("SELECT CAST('18446744073709551615' AS INTEGER);")
> ---
> - metadata:
> - - name: CAST('18446744073709551615' AS INTEGER)
> + - name: _COLUMN_1
> type: integer
> rows:
> - [18446744073709551615]
> @@ -1085,7 +1085,7 @@ box.execute("SELECT id FROM t1;")
> box.execute("SELECT CAST(123 AS UNSIGNED);")
> ---
> - metadata:
> - - name: CAST(123 AS UNSIGNED)
> + - name: _COLUMN_1
> type: unsigned
> rows:
> - [123]
> @@ -1098,7 +1098,7 @@ box.execute("SELECT CAST(-123 AS UNSIGNED);")
> box.execute("SELECT CAST(1.5 AS UNSIGNED);")
> ---
> - metadata:
> - - name: CAST(1.5 AS UNSIGNED)
> + - name: _COLUMN_1
> type: unsigned
> rows:
> - [1]
> @@ -1111,7 +1111,7 @@ box.execute("SELECT CAST(-1.5 AS UNSIGNED);")
> box.execute("SELECT CAST(true AS UNSIGNED);")
> ---
> - metadata:
> - - name: CAST(true AS UNSIGNED)
> + - name: _COLUMN_1
> type: unsigned
> rows:
> - [1]
> @@ -1119,7 +1119,7 @@ box.execute("SELECT CAST(true AS UNSIGNED);")
> box.execute("SELECT CAST('123' AS UNSIGNED);")
> ---
> - metadata:
> - - name: CAST('123' AS UNSIGNED)
> + - name: _COLUMN_1
> type: unsigned
> rows:
> - [123]
> @@ -1151,7 +1151,7 @@ box.space.T:drop()
> box.execute("SELECT CASE 1 WHEN 1 THEN x'0000000000' WHEN 2 THEN 'str' END")
> ---
> - metadata:
> - - name: CASE 1 WHEN 1 THEN x'0000000000' WHEN 2 THEN 'str' END
> + - name: _COLUMN_1
> type: scalar
> rows:
> - ["\0\0\0\0\0"]
> @@ -1159,7 +1159,7 @@ box.execute("SELECT CASE 1 WHEN 1 THEN x'0000000000' WHEN 2 THEN 'str' END")
> box.execute("SELECT CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 END")
> ---
> - metadata:
> - - name: CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 END
> + - name: _COLUMN_1
> type: integer
> rows:
> - [666]
> @@ -1167,7 +1167,7 @@ box.execute("SELECT CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 END")
> box.execute("SELECT CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 ELSE 321 END")
> ---
> - metadata:
> - - name: CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 ELSE 321 END
> + - name: _COLUMN_1
> type: integer
> rows:
> - [666]
> @@ -1175,7 +1175,7 @@ box.execute("SELECT CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 ELSE 321 END")
> box.execute("SELECT CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 ELSE 'asd' END")
> ---
> - metadata:
> - - name: CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 ELSE 'asd' END
> + - name: _COLUMN_1
> type: scalar
> rows:
> - [666]
> @@ -1183,8 +1183,7 @@ box.execute("SELECT CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 ELSE 'asd' END")
> box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN 'd' THEN 4 WHEN 'e' THEN 5 WHEN 'f' THEN 6 END;")
> ---
> - metadata:
> - - name: CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN 'd' THEN 4
> - WHEN 'e' THEN 5 WHEN 'f' THEN 6 END
> + - name: _COLUMN_1
> type: integer
> rows:
> - [1]
> @@ -1192,8 +1191,7 @@ box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHE
> box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN 'd' THEN 4 WHEN 'e' THEN 5 WHEN 'f' THEN 'asd' END;")
> ---
> - metadata:
> - - name: CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN 'd' THEN 4
> - WHEN 'e' THEN 5 WHEN 'f' THEN 'asd' END
> + - name: _COLUMN_1
> type: scalar
> rows:
> - [1]
> @@ -1201,8 +1199,7 @@ box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHE
> box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN 'd' THEN 4 WHEN 'e' THEN 5 WHEN 'f' THEN 6 ELSE 'asd' END;")
> ---
> - metadata:
> - - name: CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN 'd' THEN 4
> - WHEN 'e' THEN 5 WHEN 'f' THEN 6 ELSE 'asd' END
> + - name: _COLUMN_1
> type: scalar
> rows:
> - [1]
> @@ -1210,8 +1207,7 @@ box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHE
> box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN 'd' THEN 4 WHEN 'e' THEN 5 WHEN 'f' THEN 6 ELSE 7 END;")
> ---
> - metadata:
> - - name: CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN 'd' THEN 4
> - WHEN 'e' THEN 5 WHEN 'f' THEN 6 ELSE 7 END
> + - name: _COLUMN_1
> type: integer
> rows:
> - [1]
> @@ -1289,7 +1285,7 @@ box.execute("SELECT total(v) FROM t;")
> box.execute("SELECT min(v) FROM t;")
> ---
> - metadata:
> - - name: min(v)
> + - name: _COLUMN_1
> type: scalar
> rows:
> - ['abc']
> @@ -1297,7 +1293,7 @@ box.execute("SELECT min(v) FROM t;")
> box.execute("SELECT max(v) FROM t;")
> ---
> - metadata:
> - - name: max(v)
> + - name: _COLUMN_1
> type: scalar
> rows:
> - ['abc']
> @@ -1305,7 +1301,7 @@ box.execute("SELECT max(v) FROM t;")
> box.execute("SELECT count(v) FROM t;")
> ---
> - metadata:
> - - name: count(v)
> + - name: _COLUMN_1
> type: integer
> rows:
> - [1]
> @@ -1313,7 +1309,7 @@ box.execute("SELECT count(v) FROM t;")
> box.execute("SELECT group_concat(v) FROM t;")
> ---
> - metadata:
> - - name: group_concat(v)
> + - name: _COLUMN_1
> type: string
> rows:
> - ['abc']
> @@ -1336,7 +1332,7 @@ box.execute("SELECT abs(v) FROM t;")
> box.execute("SELECT typeof(v) FROM t;")
> ---
> - metadata:
> - - name: typeof(v)
> + - name: _COLUMN_1
> type: string
> rows:
> - ['varbinary']
> @@ -1344,7 +1340,7 @@ box.execute("SELECT typeof(v) FROM t;")
> box.execute("SELECT quote(v) FROM t;")
> ---
> - metadata:
> - - name: quote(v)
> + - name: _COLUMN_1
> type: string
> rows:
> - ['X''616263''']
> @@ -1352,7 +1348,7 @@ box.execute("SELECT quote(v) FROM t;")
> box.execute("SELECT LEAST(v, x'') FROM t;")
> ---
> - metadata:
> - - name: LEAST(v, x'')
> + - name: _COLUMN_1
> type: scalar
> rows:
> - ['']
> @@ -1472,7 +1468,7 @@ box.execute("SELECT CAST(true AS VARBINARY);")
> box.execute("SELECT CAST('asd' AS VARBINARY);")
> ---
> - metadata:
> - - name: CAST('asd' AS VARBINARY)
> + - name: _COLUMN_1
> type: varbinary
> rows:
> - ['asd']
> @@ -1480,7 +1476,7 @@ box.execute("SELECT CAST('asd' AS VARBINARY);")
> box.execute("SELECT CAST(x'' AS VARBINARY);")
> ---
> - metadata:
> - - name: CAST(x'' AS VARBINARY)
> + - name: _COLUMN_1
> type: varbinary
> rows:
> - ['']
> @@ -1499,9 +1495,9 @@ box.execute("INSERT INTO t VALUES (1, 1, 1), (2, NULL, NULL);")
> box.execute("SELECT typeof(a), typeof(s) FROM t;")
> ---
> - metadata:
> - - name: typeof(a)
> + - name: _COLUMN_1
> type: string
> - - name: typeof(s)
> + - name: _COLUMN_2
> type: string
> rows:
> - ['integer', 'integer']
> @@ -1518,7 +1514,7 @@ box.execute('INSERT INTO t1 VALUES (1, NULL, NULL);')
> box.execute('SELECT typeof(a & b) FROM t1;')
> ---
> - metadata:
> - - name: typeof(a & b)
> + - name: _COLUMN_1
> type: string
> rows:
> - ['integer']
> @@ -1526,11 +1522,11 @@ box.execute('SELECT typeof(a & b) FROM t1;')
> box.execute('SELECT typeof(a), typeof(b), typeof(a & b) FROM t1')
> ---
> - metadata:
> - - name: typeof(a)
> + - name: _COLUMN_1
> type: string
> - - name: typeof(b)
> + - name: _COLUMN_2
> type: string
> - - name: typeof(a & b)
> + - name: _COLUMN_3
> type: string
> rows:
> - ['integer', 'integer', 'integer']
> @@ -1538,7 +1534,7 @@ box.execute('SELECT typeof(a), typeof(b), typeof(a & b) FROM t1')
> box.execute("SELECT typeof(CAST(0 AS UNSIGNED));")
> ---
> - metadata:
> - - name: typeof(CAST(0 AS UNSIGNED))
> + - name: _COLUMN_1
> type: string
> rows:
> - ['unsigned']
> @@ -1698,7 +1694,7 @@ box.execute('DROP TABLE t1;')
> box.execute("SELECT 1.0;")
> ---
> - metadata:
> - - name: '1.0'
> + - name: _COLUMN_1
> type: double
> rows:
> - [1]
> @@ -1706,7 +1702,7 @@ box.execute("SELECT 1.0;")
> box.execute("SELECT .01;")
> ---
> - metadata:
> - - name: '.01'
> + - name: _COLUMN_1
> type: double
> rows:
> - [0.01]
> @@ -1714,7 +1710,7 @@ box.execute("SELECT .01;")
> box.execute("SELECT CAST(1 AS DOUBLE);")
> ---
> - metadata:
> - - name: CAST(1 AS DOUBLE)
> + - name: _COLUMN_1
> type: double
> rows:
> - [1]
> @@ -1722,7 +1718,7 @@ box.execute("SELECT CAST(1 AS DOUBLE);")
> box.execute("SELECT CAST(1.123 AS DOUBLE);")
> ---
> - metadata:
> - - name: CAST(1.123 AS DOUBLE)
> + - name: _COLUMN_1
> type: double
> rows:
> - [1.123]
> @@ -1740,7 +1736,7 @@ box.execute("SELECT CAST('asd' AS DOUBLE);")
> box.execute("SELECT CAST('1' AS DOUBLE);")
> ---
> - metadata:
> - - name: CAST('1' AS DOUBLE)
> + - name: _COLUMN_1
> type: double
> rows:
> - [1]
> @@ -1748,7 +1744,7 @@ box.execute("SELECT CAST('1' AS DOUBLE);")
> box.execute("SELECT CAST('1.123' AS DOUBLE);")
> ---
> - metadata:
> - - name: CAST('1.123' AS DOUBLE)
> + - name: _COLUMN_1
> type: double
> rows:
> - [1.123]
> @@ -1766,7 +1762,7 @@ box.execute("SELECT CAST(x'35' AS DOUBLE);")
> box.execute("SELECT CAST(CAST(x'35' AS STRING) AS DOUBLE);")
> ---
> - metadata:
> - - name: CAST(CAST(x'35' AS STRING) AS DOUBLE)
> + - name: _COLUMN_1
> type: double
> rows:
> - [5]
> @@ -1800,7 +1796,7 @@ box.execute('SELECT * FROM t;')
> box.execute('SELECT d / 100 FROM t;')
> ---
> - metadata:
> - - name: d / 100
> + - name: _COLUMN_1
> type: double
> rows:
> - [0.1]
> @@ -1833,7 +1829,7 @@ box.execute('SELECT * from t WHERE d = 3.3;')
> box.execute("SELECT sum(d) FROM t;")
> ---
> - metadata:
> - - name: sum(d)
> + - name: _COLUMN_1
> type: number
> rows:
> - [18000000000000000000]
> @@ -1841,7 +1837,7 @@ box.execute("SELECT sum(d) FROM t;")
> box.execute("SELECT avg(d) FROM t;")
> ---
> - metadata:
> - - name: avg(d)
> + - name: _COLUMN_1
> type: number
> rows:
> - [4500000000000000000]
> @@ -1849,7 +1845,7 @@ box.execute("SELECT avg(d) FROM t;")
> box.execute("SELECT total(d) FROM t;")
> ---
> - metadata:
> - - name: total(d)
> + - name: _COLUMN_1
> type: number
> rows:
> - [18000000000000000000]
> @@ -1857,7 +1853,7 @@ box.execute("SELECT total(d) FROM t;")
> box.execute("SELECT min(d) FROM t;")
> ---
> - metadata:
> - - name: min(d)
> + - name: _COLUMN_1
> type: scalar
> rows:
> - [-2]
> @@ -1865,7 +1861,7 @@ box.execute("SELECT min(d) FROM t;")
> box.execute("SELECT max(d) FROM t;")
> ---
> - metadata:
> - - name: max(d)
> + - name: _COLUMN_1
> type: scalar
> rows:
> - [18000000000000000000]
> @@ -1873,7 +1869,7 @@ box.execute("SELECT max(d) FROM t;")
> box.execute("SELECT count(d) FROM t;")
> ---
> - metadata:
> - - name: count(d)
> + - name: _COLUMN_1
> type: integer
> rows:
> - [4]
> @@ -1881,7 +1877,7 @@ box.execute("SELECT count(d) FROM t;")
> box.execute("SELECT group_concat(d) FROM t;")
> ---
> - metadata:
> - - name: group_concat(d)
> + - name: _COLUMN_1
> type: string
> rows:
> - ['10.0,-2.0,3.3,1.8e+19']
> @@ -1889,7 +1885,7 @@ box.execute("SELECT group_concat(d) FROM t;")
> box.execute("SELECT lower(d) FROM t;")
> ---
> - metadata:
> - - name: lower(d)
> + - name: _COLUMN_1
> type: string
> rows:
> - ['10.0']
> @@ -1900,7 +1896,7 @@ box.execute("SELECT lower(d) FROM t;")
> box.execute("SELECT upper(d) FROM t;")
> ---
> - metadata:
> - - name: upper(d)
> + - name: _COLUMN_1
> type: string
> rows:
> - ['10.0']
> @@ -1911,7 +1907,7 @@ box.execute("SELECT upper(d) FROM t;")
> box.execute("SELECT abs(d) FROM t;")
> ---
> - metadata:
> - - name: abs(d)
> + - name: _COLUMN_1
> type: number
> rows:
> - [10]
> @@ -1922,7 +1918,7 @@ box.execute("SELECT abs(d) FROM t;")
> box.execute("SELECT typeof(d) FROM t;")
> ---
> - metadata:
> - - name: typeof(d)
> + - name: _COLUMN_1
> type: string
> rows:
> - ['double']
> @@ -1933,7 +1929,7 @@ box.execute("SELECT typeof(d) FROM t;")
> box.execute("SELECT quote(d) FROM t;")
> ---
> - metadata:
> - - name: quote(d)
> + - name: _COLUMN_1
> type: string
> rows:
> - ['10.0']
> @@ -1944,7 +1940,7 @@ box.execute("SELECT quote(d) FROM t;")
> box.execute("SELECT LEAST(d, 0) FROM t;")
> ---
> - metadata:
> - - name: LEAST(d, 0)
> + - name: _COLUMN_1
> type: scalar
> rows:
> - [0]
> @@ -2086,9 +2082,9 @@ box.execute("DROP TABLE t4;")
> box.execute("SELECT 1.0, typeof(1.0);")
> ---
> - metadata:
> - - name: '1.0'
> + - name: _COLUMN_1
> type: double
> - - name: typeof(1.0)
> + - name: _COLUMN_2
> type: string
> rows:
> - [1, 'double']
> @@ -2096,9 +2092,9 @@ box.execute("SELECT 1.0, typeof(1.0);")
> box.execute("SELECT CAST(2 AS DOUBLE), typeof(CAST(2 AS DOUBLE));")
> ---
> - metadata:
> - - name: CAST(2 AS DOUBLE)
> + - name: _COLUMN_1
> type: double
> - - name: typeof(CAST(2 AS DOUBLE))
> + - name: _COLUMN_2
> type: string
> rows:
> - [2, 'double']
> @@ -2106,9 +2102,9 @@ box.execute("SELECT CAST(2 AS DOUBLE), typeof(CAST(2 AS DOUBLE));")
> box.execute("SELECT 3e3, typeof(3e3);")
> ---
> - metadata:
> - - name: '3e3'
> + - name: _COLUMN_1
> type: double
> - - name: typeof(3e3)
> + - name: _COLUMN_2
> type: string
> rows:
> - [3000, 'double']
> @@ -2126,7 +2122,7 @@ box.execute("SELECT d, TYPEOF(d) FROM t5;")
> - metadata:
> - name: D
> type: double
> - - name: TYPEOF(d)
> + - name: _COLUMN_2
> type: string
> rows:
> - [4, 'double']
> --
> 2.21.0 (Apple Git-122)
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Tarantool-patches] [PATCH] sql: use unify pattern for column names
2020-03-09 15:04 ` Roman Khabibov
@ 2020-03-12 0:14 ` Vladislav Shpilevoy
2020-03-12 15:04 ` Nikita Pettik
2020-03-31 21:05 ` Roman Khabibov
0 siblings, 2 replies; 9+ messages in thread
From: Vladislav Shpilevoy @ 2020-03-12 0:14 UTC (permalink / raw)
To: Roman Khabibov, tarantool-patches
Hi! Thanks for the patch!
> Branch: https://github.com/tarantool/tarantool/tree/romanhabibov/gh-3962-column
> Issue: https://github.com/tarantool/tarantool/issues/3962
Yeah, you added the links afterwards, but still you missed the
changelog again. I once again ask you to create a document with
pre-check actions to do before you send anything.
>> 03/03/2020, 23:13> Also you seem to be very consistent with forgetting to put issue
>> and branch links to your patchsets. Please, create a text document
>> with a list of things to check before sending a patch (issue and
>> branch links, changelog, check that the branch is pushed, etc),
>> save it somewhere, and look at it before a send. I have such
>> document, and it helps sometimes.
See 8 comments below.
> sql: use unify pattern for column names
>
> Name resulting columns generated by an expression or <VALUES>
> construction by the "_COLUMN_N" pattern.
1. I would use 'COLUMN_N', without leading '_', which usually
means something internal, not intended for being used by users.
But even better option - ask Nikita.
> Closes #3962
>
> @TarantoolBot document
> Title: Column naming in SQL
>
> Now, every auto generated column is named by the "_COLUMN_N"
> pattern, where N is the number of column in a query. Auto
2. Starting from what? 0, 1?
> generated column is a column in a query result generated by an
> expression or a column from <VALUES> construction.
3. Better provide examples. Peter may be in the context, and
would probably extend the description by himself, but the issue
may be taken by a different technical writer. Be more
descriptive.
> diff --git a/src/box/sql/sqlInt.h b/src/box/sql/sqlInt.h
> index 1579cc92e..8c9708cf6 100644
> --- a/src/box/sql/sqlInt.h
> +++ b/src/box/sql/sqlInt.h
> @@ -4513,4 +4513,17 @@ int
> sql_fieldno_by_name(struct Parse *parse_context, struct Expr *field_name,
> uint32_t *fieldno);
>
> +/**
> + * Return a string of the form "_COLUMN_N", where N is @a number.
> + *
> + * @param number Number of column.
> + *
> + * @retval string success.
4. Yeah, the comment is correct, but too much water, I would
say. These @param and @retval are not obligatory, as I said
sometime earlier. So many details is clearly an overkill for
such a simple function. Better keep it a one-line comment, or
if you feel inspiration - write about why do we change column
names to that template. About the standard being silent on
the topic, about postgre and mariadb behaviour.
> + */
> +static inline char *
> +sql_generate_column_name(uint32_t number)
> +{
> + return (char *) tt_sprintf("_COLUMN_%d", number);
5. Better keep it const to prevent any potential attempts
to change or even free the name memory.
====================
diff --git a/src/box/sql/select.c b/src/box/sql/select.c
index 54b6f83d8..b50f512e7 100644
--- a/src/box/sql/select.c
+++ b/src/box/sql/select.c
@@ -1946,9 +1946,8 @@ sqlColumnsFromExprList(Parse * parse, ExprList * expr_list,
zName = pColExpr->u.zToken;
}
}
- if (zName == NULL)
- zName = sql_generate_column_name(i + 1);
- zName = sqlMPrintf(db, "%s", zName);
+ zName = sqlDbStrDup(db, zName != NULL ?
+ zName : sql_generate_column_name(i + 1));
/* Make sure the column name is unique. If the name is not unique,
* append an integer to the name so that it becomes unique.
diff --git a/src/box/sql/sqlInt.h b/src/box/sql/sqlInt.h
index 8c9708cf6..3360ab67e 100644
--- a/src/box/sql/sqlInt.h
+++ b/src/box/sql/sqlInt.h
@@ -4520,10 +4520,10 @@ sql_fieldno_by_name(struct Parse *parse_context, struct Expr *field_name,
*
* @retval string success.
*/
-static inline char *
+static inline const char *
sql_generate_column_name(uint32_t number)
{
- return (char *) tt_sprintf("_COLUMN_%d", number);
+ return tt_sprintf("_COLUMN_%d", number);
}
#endif /* sqlINT_H */
====================
> diff --git a/test/sql-tap/select6.test.lua b/test/sql-tap/select6.test.lua
> index c9960dc29..e99260505 100755
> --- a/test/sql-tap/select6.test.lua
> +++ b/test/sql-tap/select6.test.lua
> @@ -128,9 +128,9 @@ test:do_execsql_test(
> test:do_execsql_test(
> "select6-1.7",
> [=[
> - SELECT a.y, a."count(*)", "max(x)", "count(*)"
> - FROM (SELECT count(*),y FROM t1 GROUP BY y) AS a,
> - (SELECT max(x),y FROM t1 GROUP BY y) as b
> + SELECT a.y, a.count, max, count
> + FROM (SELECT count(*) AS count, y FROM t1 GROUP BY y) AS a,
> + (SELECT max(x) AS max, y FROM t1 GROUP BY y) as b
6. Don't auto-names work here? Why didn't you use _COLUMN_N
names?
> WHERE a.y=b.y ORDER BY a.y
> ]=], {
> -- <select6-1.7>
> diff --git a/test/sql/gh-3888-values-blob-assert.result b/test/sql/gh-3888-values-blob-assert.result
> index 0a1af28f2..d2e27efd9 100644
> --- a/test/sql/gh-3888-values-blob-assert.result
> +++ b/test/sql/gh-3888-values-blob-assert.result
> @@ -1,3 +1,4 @@
> +-- test-run result file version 2
> -- sql: assertion fault on VALUES #3888
> --
> -- Make sure that tokens representing values of integer, float,
> @@ -5,79 +6,87 @@
> -- keywords of the same names.
> --
> test_run = require('test_run').new()
> ----
> -...
> + | ---
> + | ...
> engine = test_run:get_cfg('engine')
> ----
> -...
> + | ---
> + | ...
> _ = box.space._session_settings:update('sql_default_engine', {{'=', 2, engine}})
> ----
7. These and similar changes look unrelated to the
issue. In some other files too.
> -...
> + | ---
> + | ...
> +
8. There should be a test specifically for the issue. Labeled
with its number, with a comment, and with the tests from the
initial Peter's comment. Add them, please.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Tarantool-patches] [PATCH] sql: use unify pattern for column names
2020-03-12 0:14 ` Vladislav Shpilevoy
@ 2020-03-12 15:04 ` Nikita Pettik
2020-03-31 21:05 ` Roman Khabibov
1 sibling, 0 replies; 9+ messages in thread
From: Nikita Pettik @ 2020-03-12 15:04 UTC (permalink / raw)
To: Vladislav Shpilevoy; +Cc: tarantool-patches
On 12 Mar 01:14, Vladislav Shpilevoy wrote:
> Hi! Thanks for the patch!
>
> > sql: use unify pattern for column names
> >
> > Name resulting columns generated by an expression or <VALUES>
> > construction by the "_COLUMN_N" pattern.
>
> 1. I would use 'COLUMN_N', without leading '_', which usually
> means something internal, not intended for being used by users.
> But even better option - ask Nikita.
I'm okay with both options.
> > Closes #3962
> >
> > @TarantoolBot document
> > Title: Column naming in SQL
> >
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Tarantool-patches] [PATCH] sql: use unify pattern for column names
2020-03-12 0:14 ` Vladislav Shpilevoy
2020-03-12 15:04 ` Nikita Pettik
@ 2020-03-31 21:05 ` Roman Khabibov
2020-04-21 23:37 ` Vladislav Shpilevoy
1 sibling, 1 reply; 9+ messages in thread
From: Roman Khabibov @ 2020-03-31 21:05 UTC (permalink / raw)
To: Vladislav Shpilevoy; +Cc: tarantool-patches
Hi! Thanks for the review.
@ChangeLog:
* Name auto generated columns as “COLUMN_N” instead of “_auto_name_”
or span of the original expression.
> On Mar 12, 2020, at 03:14, Vladislav Shpilevoy <v.shpilevoy@tarantool.org> wrote:
>
> Hi! Thanks for the patch!
>
>> Branch: https://github.com/tarantool/tarantool/tree/romanhabibov/gh-3962-column
>> Issue: https://github.com/tarantool/tarantool/issues/3962
>
> Yeah, you added the links afterwards, but still you missed the
> changelog again. I once again ask you to create a document with
> pre-check actions to do before you send anything.
>
>>> 03/03/2020, 23:13> Also you seem to be very consistent with forgetting to put issue
>>> and branch links to your patchsets. Please, create a text document
>>> with a list of things to check before sending a patch (issue and
>>> branch links, changelog, check that the branch is pushed, etc),
>>> save it somewhere, and look at it before a send. I have such
>>> document, and it helps sometimes.
>
> See 8 comments below.
>
>> sql: use unify pattern for column names
>>
>> Name resulting columns generated by an expression or <VALUES>
>> construction by the "_COLUMN_N" pattern.
>
> 1. I would use 'COLUMN_N', without leading '_', which usually
> means something internal, not intended for being used by users.
> But even better option - ask Nikita.
Ok. Let it be “COLUMN_N”.
>> Closes #3962
>>
>> @TarantoolBot document
>> Title: Column naming in SQL
>>
>> Now, every auto generated column is named by the "_COLUMN_N"
>> pattern, where N is the number of column in a query. Auto
>
> 2. Starting from what? 0, 1?
>> generated column is a column in a query result generated by an
>> expression or a column from <VALUES> construction.
>
> 3. Better provide examples. Peter may be in the context, and
> would probably extend the description by himself, but the issue
> may be taken by a different technical writer. Be more
> descriptive.
Done.
>> diff --git a/src/box/sql/sqlInt.h b/src/box/sql/sqlInt.h
>> index 1579cc92e..8c9708cf6 100644
>> --- a/src/box/sql/sqlInt.h
>> +++ b/src/box/sql/sqlInt.h
>> @@ -4513,4 +4513,17 @@ int
>> sql_fieldno_by_name(struct Parse *parse_context, struct Expr *field_name,
>> uint32_t *fieldno);
>>
>> +/**
>> + * Return a string of the form "_COLUMN_N", where N is @a number.
>> + *
>> + * @param number Number of column.
>> + *
>> + * @retval string success.
>
> 4. Yeah, the comment is correct, but too much water, I would
> say. These @param and @retval are not obligatory, as I said
> sometime earlier. So many details is clearly an overkill for
> such a simple function. Better keep it a one-line comment, or
> if you feel inspiration - write about why do we change column
> names to that template. About the standard being silent on
> the topic, about postgre and mariadb behaviour.
+/**
+ * Return a string of the form "_COLUMN_N", where N is @a number.
+ *
+ * We decided to name every auto generated column in output by
+ * this pattern (like PostgreSQL), because it is convenient than
+ * "_auto_name_" and naming with span like MariaDB do.
+ */
>> + */
>> +static inline char *
>> +sql_generate_column_name(uint32_t number)
>> +{
>> + return (char *) tt_sprintf("_COLUMN_%d", number);
>
> 5. Better keep it const to prevent any potential attempts
> to change or even free the name memory.
>
> ====================
> diff --git a/src/box/sql/select.c b/src/box/sql/select.c
> index 54b6f83d8..b50f512e7 100644
> --- a/src/box/sql/select.c
> +++ b/src/box/sql/select.c
> @@ -1946,9 +1946,8 @@ sqlColumnsFromExprList(Parse * parse, ExprList * expr_list,
> zName = pColExpr->u.zToken;
> }
> }
> - if (zName == NULL)
> - zName = sql_generate_column_name(i + 1);
> - zName = sqlMPrintf(db, "%s", zName);
> + zName = sqlDbStrDup(db, zName != NULL ?
> + zName : sql_generate_column_name(i + 1));
>
> /* Make sure the column name is unique. If the name is not unique,
> * append an integer to the name so that it becomes unique.
@@ -1946,14 +1946,13 @@ sqlColumnsFromExprList(Parse * parse, ExprList * expr_list,
} else if (pColExpr->op == TK_ID) {
assert(!ExprHasProperty(pColExpr, EP_IntValue));
zName = pColExpr->u.zToken;
- } else {
- /* Use the original text of the column expression as its name */
- zName = expr_list->a[i].zSpan;
}
}
- if (zName == NULL)
- zName = "_auto_field_";
- zName = sqlMPrintf(db, "%s", zName);
+ if (zName == NULL) {
+ uint32_t idx = ++parse->autoname_i;
+ zName = (char *) sql_generate_column_name(idx);
+ }
+ zName = sqlDbStrDup(db, zName);
> diff --git a/src/box/sql/sqlInt.h b/src/box/sql/sqlInt.h
> index 8c9708cf6..3360ab67e 100644
> --- a/src/box/sql/sqlInt.h
> +++ b/src/box/sql/sqlInt.h
> @@ -4520,10 +4520,10 @@ sql_fieldno_by_name(struct Parse *parse_context, struct Expr *field_name,
> *
> * @retval string success.
> */
> -static inline char *
> +static inline const char *
> sql_generate_column_name(uint32_t number)
> {
> - return (char *) tt_sprintf("_COLUMN_%d", number);
> + return tt_sprintf("_COLUMN_%d", number);
> }
>
> #endif /* sqlINT_H */
> ====================
+/**
+ * Return a string of the form "_COLUMN_N", where N is @a number.
+ *
+ * We decided to name every auto generated column in output by
+ * this pattern (like PostgreSQL), because it is convenient than
+ * "_auto_name_" and naming with span like MariaDB do.
+ */
+static inline const char *
+sql_generate_column_name(uint32_t number)
+{
+ return tt_sprintf("COLUMN_%d", number);
+}
+
>> diff --git a/test/sql-tap/select6.test.lua b/test/sql-tap/select6.test.lua
>> index c9960dc29..e99260505 100755
>> --- a/test/sql-tap/select6.test.lua
>> +++ b/test/sql-tap/select6.test.lua
>> @@ -128,9 +128,9 @@ test:do_execsql_test(
>> test:do_execsql_test(
>> "select6-1.7",
>> [=[
>> - SELECT a.y, a."count(*)", "max(x)", "count(*)"
>> - FROM (SELECT count(*),y FROM t1 GROUP BY y) AS a,
>> - (SELECT max(x),y FROM t1 GROUP BY y) as b
>> + SELECT a.y, a.count, max, count
>> + FROM (SELECT count(*) AS count, y FROM t1 GROUP BY y) AS a,
>> + (SELECT max(x) AS max, y FROM t1 GROUP BY y) as b
>
> 6. Don't auto-names work here? Why didn't you use _COLUMN_N
> Names?
Now, it works. I have changed struct Parse for that.
>> WHERE a.y=b.y ORDER BY a.y
>> ]=], {
>> -- <select6-1.7>
>> diff --git a/test/sql/gh-3888-values-blob-assert.result b/test/sql/gh-3888-values-blob-assert.result
>> index 0a1af28f2..d2e27efd9 100644
>> --- a/test/sql/gh-3888-values-blob-assert.result
>> +++ b/test/sql/gh-3888-values-blob-assert.result
>> @@ -1,3 +1,4 @@
>> +-- test-run result file version 2
>> -- sql: assertion fault on VALUES #3888
>> --
>> -- Make sure that tokens representing values of integer, float,
>> @@ -5,79 +6,87 @@
>> -- keywords of the same names.
>> --
>> test_run = require('test_run').new()
>> ----
>> -...
>> + | ---
>> + | ...
>> engine = test_run:get_cfg('engine')
>> ----
>> -...
>> + | ---
>> + | ...
>> _ = box.space._session_settings:update('sql_default_engine', {{'=', 2, engine}})
>> ----
>
> 7. These and similar changes look unrelated to the
> issue. In some other files too.
What I should do? Tests will fall, if I don’t add these changes.
>> -...
>> + | ---
>> + | ...
>> +
> 8. There should be a test specifically for the issue. Labeled
> with its number, with a comment, and with the tests from the
> initial Peter's comment. Add them, please.
+-- gh-3962: Check auto generated names in different selects.
+execute("VALUES(1, 2, 3);")
+ | ---
+ | - metadata:
+ | - name: COLUMN_1
+ | type: integer
+ | - name: COLUMN_2
+ | type: integer
+ | - name: COLUMN_3
+ | type: integer
+ | rows:
+ | - [1, 2, 3]
+ | ...
+execute("SELECT * FROM (VALUES (1+1, 1+1));")
+ | ---
+ | - metadata:
+ | - name: COLUMN_1
+ | type: integer
+ | - name: COLUMN_2
+ | type: integer
+ | rows:
+ | - [2, 2]
+ | ...
+execute("SELECT 1+1, 1+1;")
+ | ---
+ | - metadata:
+ | - name: COLUMN_1
+ | type: integer
+ | - name: COLUMN_2
+ | type: integer
+ | rows:
+ | - [2, 2]
+ | ...
+execute("SELECT ?, ?, ?", {1, 2, 3})
+ | ---
+ | - metadata:
+ | - name: COLUMN_1
+ | type: integer
+ | - name: COLUMN_2
+ | type: integer
+ | - name: COLUMN_3
+ | type: integer
+ | rows:
+ | - [1, 2, 3]
+ | ...
test_run:cmd("setopt delimiter ';'")
| ---
| - true
| ...
+execute([[SELECT * FROM (SELECT * FROM (VALUES(1, 2))),
+ (SELECT * FROM (VALUES(1, 2)))]]);
+ | ---
+ | - metadata:
+ | - name: COLUMN_1
+ | type: integer
+ | - name: COLUMN_2
+ | type: integer
+ | - name: COLUMN_3
+ | type: integer
+ | - name: COLUMN_4
+ | type: integer
+ | rows:
+ | - [1, 2, 1, 2]
+ | …
+
commit 097d78ad07753cc5cdcf8be84fc1d475d079ce00
Author: Roman Khabibov <roman.habibov@tarantool.org>
Date: Thu Mar 5 12:48:58 2020 +0300
sql: use unify pattern for column names
Name resulting columns generated by an expression or <VALUES>
construction by the "_COLUMN_N" pattern.
Closes #3962
@TarantoolBot document
Title: Column naming in SQL
Now, every auto generated column is named by the "_COLUMN_N"
pattern, where N is the number of column in a query (starting)
from 1). Auto generated column is a column in a query result
generated by an expression or a column from <VALUES>
construction.
Examples:
box.execute("VALUES(1, 2, 3);")
---
- metadata:
- name: COLUMN_1
type: integer
- name: COLUMN_2
type: integer
- name: COLUMN_3
type: integer
rows:
- [1, 2, 3]
...
box.execute("SELECT * FROM (VALUES (1+1, 1+1));")
---
- metadata:
- name: COLUMN_1
type: integer
- name: COLUMN_2
type: integer
rows:
- [2, 2]
...
box.execute("SELECT 1+1, 1+1;")
---
- metadata:
- name: COLUMN_1
type: integer
- name: COLUMN_2
type: integer
rows:
- [2, 2]
...
diff --git a/src/box/sql/select.c b/src/box/sql/select.c
index 65e41f219..f39983761 100644
--- a/src/box/sql/select.c
+++ b/src/box/sql/select.c
@@ -1850,14 +1850,14 @@ generate_column_metadata(struct Parse *pParse, struct SrcList *pTabList,
}
} else {
const char *z = NULL;
- if (colname != NULL)
+ if (colname != NULL) {
z = colname;
- else if (span != NULL)
- z = span;
- else
- z = tt_sprintf("column%d", i + 1);
+ } else {
+ uint32_t idx = ++pParse->autoname_i;
+ z = sql_generate_column_name(idx);
+ }
vdbe_metadata_set_col_name(v, i, z);
- if (is_full_meta && colname != NULL)
+ if (is_full_meta)
vdbe_metadata_set_col_span(v, i, span);
}
}
@@ -1946,14 +1946,13 @@ sqlColumnsFromExprList(Parse * parse, ExprList * expr_list,
} else if (pColExpr->op == TK_ID) {
assert(!ExprHasProperty(pColExpr, EP_IntValue));
zName = pColExpr->u.zToken;
- } else {
- /* Use the original text of the column expression as its name */
- zName = expr_list->a[i].zSpan;
}
}
- if (zName == NULL)
- zName = "_auto_field_";
- zName = sqlMPrintf(db, "%s", zName);
+ if (zName == NULL) {
+ uint32_t idx = ++parse->autoname_i;
+ zName = (char *) sql_generate_column_name(idx);
+ }
+ zName = sqlDbStrDup(db, zName);
/* Make sure the column name is unique. If the name is not unique,
* append an integer to the name so that it becomes unique.
diff --git a/src/box/sql/sqlInt.h b/src/box/sql/sqlInt.h
index 1579cc92e..c355d1b17 100644
--- a/src/box/sql/sqlInt.h
+++ b/src/box/sql/sqlInt.h
@@ -2223,6 +2223,8 @@ struct Parse {
TriggerPrg *pTriggerPrg; /* Linked list of coded triggers */
With *pWith; /* Current WITH clause, or NULL */
With *pWithToFree; /* Free this WITH object at the end of the parse */
+ /** Index of previous auto generated name */
+ uint32_t autoname_i;
/** Space triggers are being coded for. */
struct space *triggered_space;
/**
@@ -4513,4 +4515,17 @@ int
sql_fieldno_by_name(struct Parse *parse_context, struct Expr *field_name,
uint32_t *fieldno);
+/**
+ * Return a string of the form "_COLUMN_N", where N is @a number.
+ *
+ * We decided to name every auto generated column in output by
+ * this pattern (like PostgreSQL), because it is convenient than
+ * "_auto_name_" and naming with span like MariaDB do.
+ */
+static inline const char *
+sql_generate_column_name(uint32_t number)
+{
+ return tt_sprintf("COLUMN_%d", number);
+}
+
#endif /* sqlINT_H */
diff --git a/test/box/function1.result b/test/box/function1.result
index b91d63c51..f198168c1 100644
--- a/test/box/function1.result
+++ b/test/box/function1.result
@@ -449,7 +449,7 @@ box.execute('SELECT "function1.divide"(6, 3, 3)')
box.execute('SELECT "function1.divide"(6, 3)')
---
- metadata:
- - name: '"function1.divide"(6, 3)'
+ - name: COLUMN_1
type: number
rows:
- [2]
@@ -457,7 +457,7 @@ box.execute('SELECT "function1.divide"(6, 3)')
box.execute('SELECT "function1.divide"(5, 2)')
---
- metadata:
- - name: '"function1.divide"(5, 2)'
+ - name: COLUMN_1
type: number
rows:
- [2.5]
@@ -482,7 +482,7 @@ test_run:cmd("setopt delimiter ''");
box.execute('SELECT summarize(1, 2)')
---
- metadata:
- - name: summarize(1, 2)
+ - name: COLUMN_1
type: number
rows:
- [3]
@@ -505,7 +505,7 @@ test_run:cmd("setopt delimiter ''");
box.execute('SELECT summarize(1, 2)')
---
- metadata:
- - name: summarize(1, 2)
+ - name: COLUMN_1
type: number
rows:
- [3]
@@ -519,7 +519,7 @@ box.func.SUMMARIZE:drop()
box.execute('SELECT lua(\'return 1 + 1\')')
---
- metadata:
- - name: lua('return 1 + 1')
+ - name: COLUMN_1
type: any
rows:
- [2]
@@ -537,7 +537,7 @@ box.execute('SELECT lua(\'return box.cfg()\')')
box.execute('SELECT lua(\'return box.cfg.memtx_memory\')')
---
- metadata:
- - name: lua('return box.cfg.memtx_memory')
+ - name: COLUMN_1
type: any
rows:
- [107374182]
diff --git a/test/sql-tap/colname.test.lua b/test/sql-tap/colname.test.lua
index caa61a07a..4320d9245 100755
--- a/test/sql-tap/colname.test.lua
+++ b/test/sql-tap/colname.test.lua
@@ -94,7 +94,7 @@ test:do_execsql2_test(
SELECT +tabc.a, -tabc.b, tabc.c, * FROM tabc
]], {
-- <colname-2.3>
- "+tabc.a",1,"-tabc.b",-2,"C",3,"A",1,"B",2,"C",3
+ "COLUMN_1",1,"COLUMN_2",-2,"C",3,"A",1,"B",2,"C",3
-- </colname-2.3>
})
@@ -194,7 +194,7 @@ test:do_execsql2_test(
SELECT +tabc.a, -tabc.b, tabc.c FROM tabc
]], {
-- <colname-3.3>
- "+tabc.a", 1, "-tabc.b", -2, "C", 3
+ "COLUMN_1",1,"COLUMN_2",-2,"C",3
-- </colname-3.3>
})
@@ -314,7 +314,7 @@ test:do_execsql2_test(
SELECT +tabc.a, -tabc.b, tabc.c FROM tabc
]], {
-- <colname-4.3>
- "+tabc.a", 1, "-tabc.b", -2, "TABC.C", 3
+ "COLUMN_1",1,"COLUMN_2",-2,"TABC.C",3
-- </colname-4.3>
})
diff --git a/test/sql-tap/select1.test.lua b/test/sql-tap/select1.test.lua
index fbebfab37..80e94b019 100755
--- a/test/sql-tap/select1.test.lua
+++ b/test/sql-tap/select1.test.lua
@@ -1032,7 +1032,7 @@ test:do_catchsql2_test(
SELECT f1+F2 FROM test1 ORDER BY f2
]], {
-- <select1-6.4a>
- 0, {"f1+F2", 33, "f1+F2", 77}
+ 0, {"COLUMN_1",33,"COLUMN_1",77}
-- </select1-6.4a>
})
@@ -1042,7 +1042,7 @@ test:do_catchsql2_test(
SELECT test1.f1+F2 FROM test1 ORDER BY f2
]], {
-- <select1-6.5>
- 0, {"test1.f1+F2", 33, "test1.f1+F2", 77}
+ 0, {"COLUMN_1",33,"COLUMN_1",77}
-- </select1-6.5>
})
@@ -1059,7 +1059,7 @@ test:do_test(
return table.insert(v,msg) or v
end, {
-- <select1-6.5.1>
- 0, {'test1.f1+F2', 33, 'test1.f1+F2', 77}
+ 0, {"COLUMN_1",33,"COLUMN_1",77}
-- </select1-6.5.1>
})
@@ -1068,7 +1068,7 @@ test:do_catchsql2_test(
[[SELECT test1.f1+F2, t1 FROM test1, test2
ORDER BY f2]], {
-- <select1-6.6>
- 0, {"test1.f1+F2", 33, "T1", "abc", "test1.f1+F2", 77, "T1", "abc"}
+ 0, {"COLUMN_1",33,"T1","abc","COLUMN_1",77,"T1","abc"}
-- </select1-6.6>
})
@@ -1161,7 +1161,7 @@ test:do_test(
]]
end, {
-- <select1-6.9.5>
- "123.45", 123.45
+ "COLUMN_1",123.45
-- </select1-6.9.5>
})
@@ -1189,7 +1189,8 @@ test:do_test(
return x
end, {
-- <select1-6.9.7>
- "A.F1", 11, "A.F2", 22, "sql_subquery.5", 5, "sql_subquery.6", 6
+ "A.F1", 11, "A.F2", 22, "sql_subquery.COLUMN_1", 5,
+ "sql_subquery.COLUMN_2", 6
-- </select1-6.9.7>
})
@@ -1816,7 +1817,7 @@ test:do_execsql2_test(
SELECT * FROM t3, (SELECT max(a), max(b) FROM t4) as "tx"
]], {
-- <select1-11.14>
- "ID", 0, "A", "1", "B", "2", "max(a)", 3, "max(b)", "4"
+ "ID", 0, "A", "1", "B", "2", "COLUMN_1", 3, "COLUMN_2", "4"
-- </select1-11.14>
})
@@ -1826,7 +1827,7 @@ test:do_execsql2_test(
SELECT y.*, t3.* FROM t3, (SELECT max(a), max(b) FROM t4) AS y
]], {
-- <select1-11.15>
- "max(a)", 3, "max(b)", "4", "ID", 0, "A", "1", "B", "2"
+ "COLUMN_1", 3, "COLUMN_2", "4", "ID", 0, "A", "1", "B", "2"
-- </select1-11.15>
})
@@ -1850,7 +1851,7 @@ test:do_execsql2_test(
SELECT 1+2+3
]], {
-- <select1-12.1>
- "1+2+3", 6
+ "COLUMN_1",6
-- </select1-12.1>
})
@@ -1860,7 +1861,7 @@ test:do_execsql2_test(
SELECT 1,'hello',2
]], {
-- <select1-12.2>
- '1', 1, "'hello'", "hello", '2', 2
+ "COLUMN_1",1,"COLUMN_2","hello","COLUMN_3",2
-- </select1-12.2>
})
diff --git a/test/sql-tap/select6.test.lua b/test/sql-tap/select6.test.lua
index c9960dc29..380fd67c1 100755
--- a/test/sql-tap/select6.test.lua
+++ b/test/sql-tap/select6.test.lua
@@ -128,9 +128,9 @@ test:do_execsql_test(
test:do_execsql_test(
"select6-1.7",
[=[
- SELECT a.y, a."count(*)", "max(x)", "count(*)"
- FROM (SELECT count(*),y FROM t1 GROUP BY y) AS a,
- (SELECT max(x),y FROM t1 GROUP BY y) as b
+ SELECT a.y, a.COLUMN_1, COLUMN_2, COLUMN_1
+ FROM (SELECT count(*), y FROM t1 GROUP BY y) AS a,
+ (SELECT max(x), y FROM t1 GROUP BY y) as b
WHERE a.y=b.y ORDER BY a.y
]=], {
-- <select6-1.7>
@@ -154,9 +154,9 @@ test:do_execsql_test(
test:do_execsql_test(
"select6-1.9",
[=[
- SELECT q, p, r, b."min(x)+y"
+ SELECT q, p, r, min
FROM (SELECT count(*) as p , y as q FROM t1 GROUP BY y) AS a,
- (SELECT max(x) as r, y as s, min(x)+y FROM t1 GROUP BY y) as b
+ (SELECT max(x) as r, y as s, min(x)+y AS min FROM t1 GROUP BY y) as b
WHERE q=s ORDER BY s
]=], {
-- <select6-1.9>
@@ -247,9 +247,9 @@ test:do_execsql_test(
test:do_execsql_test(
"select6-2.7",
[=[
- SELECT a.b, a."count(*)", "max(a)", "count(*)"
- FROM (SELECT count(*),b FROM t2 GROUP BY b) AS a,
- (SELECT max(a),b FROM t2 GROUP BY b) as b
+ SELECT a.b, a.count, max, count
+ FROM (SELECT count(*) AS count, b FROM t2 GROUP BY b) AS a,
+ (SELECT max(a) AS max, b FROM t2 GROUP BY b) as b
WHERE a.b=b.b ORDER BY a.b
]=], {
-- <select6-2.7>
@@ -432,8 +432,8 @@ test:do_execsql_test(
test:do_execsql_test(
"select6-3.14",
[=[
- SELECT "count(*)",y FROM (SELECT count(*), y FROM t1 GROUP BY y)
- ORDER BY "count(*)"
+ SELECT count, y FROM (SELECT count(*) AS count, y FROM t1 GROUP BY y)
+ ORDER BY count
]=], {
-- <select6-3.14>
1, 1, 2, 2, 4, 3, 5, 5, 8, 4
@@ -443,7 +443,7 @@ test:do_execsql_test(
test:do_execsql_test(
"select6-3.15",
[=[
- SELECT "count(*)",y FROM (SELECT count(*), y FROM t1 GROUP BY y)
+ SELECT count, y FROM (SELECT count(*) AS count, y FROM t1 GROUP BY y)
ORDER BY y
]=], {
-- <select6-3.15>
diff --git a/test/sql-tap/view.test.lua b/test/sql-tap/view.test.lua
index e553b91c7..66374e374 100755
--- a/test/sql-tap/view.test.lua
+++ b/test/sql-tap/view.test.lua
@@ -265,7 +265,7 @@ test:do_execsql2_test(
SELECT * FROM v1 LIMIT 1
]], {
-- <view-3.3.1>
- "XYZ", 2, "PQR", 7, "c-b", 1
+ "XYZ", 2, "PQR", 7, "COLUMN_1", 1
-- </view-3.3.1>
})
@@ -276,7 +276,7 @@ test:do_execsql2_test(
SELECT * FROM v1b LIMIT 1
]], {
-- <view-3.3.2>
- "A", 2, "b+c", 7, "C", 4
+ "A", 2, "COLUMN_1", 7, "C", 4
-- </view-3.3.2>
})
diff --git a/test/sql/bind.result b/test/sql/bind.result
index b24094052..cb0302885 100644
--- a/test/sql/bind.result
+++ b/test/sql/bind.result
@@ -77,11 +77,11 @@ execute('SELECT * FROM test WHERE id = :value', parameters)
execute('SELECT ?, ?, ?', {1, 2, 3})
---
- metadata:
- - name: '?'
+ - name: COLUMN_1
type: integer
- - name: '?'
+ - name: COLUMN_2
type: integer
- - name: '?'
+ - name: COLUMN_3
type: integer
rows:
- [1, 2, 3]
@@ -107,11 +107,11 @@ parameters[3][':value1'] = 11
execute('SELECT ?, :value1, @value2', parameters)
---
- metadata:
- - name: '?'
+ - name: COLUMN_1
type: integer
- - name: :value1
+ - name: COLUMN_2
type: integer
- - name: '@value2'
+ - name: COLUMN_3
type: integer
rows:
- [10, 11, 12]
@@ -149,22 +149,22 @@ parameters[6]['@value2'] = 6
execute('SELECT :value3, ?, :value1, ?, ?, @value2, ?, :value3', parameters)
---
- metadata:
- - name: :value3
+ - name: COLUMN_1
type: integer
- - name: '?'
+ - name: COLUMN_2
type: integer
- - name: :value1
+ - name: COLUMN_3
type: integer
- - name: '?'
+ - name: COLUMN_4
type: integer
- - name: '?'
+ - name: COLUMN_5
type: integer
- - name: '@value2'
+ - name: COLUMN_6
type: integer
- - name: '?'
+ - name: COLUMN_7
+ type: boolean
+ - name: COLUMN_8
type: boolean
- - name: :value3
- type: integer
rows:
- [1, 2, 3, 4, 5, 6, null, 1]
...
@@ -175,15 +175,15 @@ msgpack = require('msgpack')
execute('SELECT ?, ?, ?, ?, ?', {'abc', -123.456, msgpack.NULL, true, false})
---
- metadata:
- - name: '?'
+ - name: COLUMN_1
type: text
- - name: '?'
+ - name: COLUMN_2
type: numeric
- - name: '?'
+ - name: COLUMN_3
type: boolean
- - name: '?'
+ - name: COLUMN_4
type: boolean
- - name: '?'
+ - name: COLUMN_5
type: boolean
rows:
- ['abc', -123.456, null, true, false]
@@ -290,7 +290,7 @@ execute('SELECT :value', parameters)
execute('SELECT ? ', {18446744073709551615ULL})
---
- metadata:
- - name: '?'
+ - name: COLUMN_1
type: integer
rows:
- [18446744073709551615]
diff --git a/test/sql/boolean.result b/test/sql/boolean.result
index 112e41a12..51ec5820b 100644
--- a/test/sql/boolean.result
+++ b/test/sql/boolean.result
@@ -241,7 +241,7 @@ i > 0
SELECT return_type(a) FROM t;
| ---
| - metadata:
- | - name: return_type(a)
+ | - name: COLUMN_1
| type: string
| rows:
| - ['boolean']
@@ -250,7 +250,7 @@ SELECT return_type(a) FROM t;
SELECT return_type('false');
| ---
| - metadata:
- | - name: return_type('false')
+ | - name: COLUMN_1
| type: string
| rows:
| - ['string']
@@ -258,7 +258,7 @@ SELECT return_type('false');
SELECT is_boolean(a) FROM t LIMIT 1;
| ---
| - metadata:
- | - name: is_boolean(a)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -266,7 +266,7 @@ SELECT is_boolean(a) FROM t LIMIT 1;
SELECT is_boolean('true');
| ---
| - metadata:
- | - name: is_boolean('true')
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -281,7 +281,7 @@ SELECT abs(a) FROM t0;
SELECT lower(a) FROM t0;
| ---
| - metadata:
- | - name: lower(a)
+ | - name: COLUMN_1
| type: string
| rows:
| - ['false']
@@ -292,7 +292,7 @@ SELECT lower(a) FROM t0;
SELECT upper(a) FROM t0;
| ---
| - metadata:
- | - name: upper(a)
+ | - name: COLUMN_1
| type: string
| rows:
| - ['FALSE']
@@ -303,7 +303,7 @@ SELECT upper(a) FROM t0;
SELECT quote(a) FROM t0;
| ---
| - metadata:
- | - name: quote(a)
+ | - name: COLUMN_1
| type: string
| rows:
| - ['FALSE']
@@ -315,7 +315,7 @@ SELECT quote(a) FROM t0;
SELECT length(a) FROM t0;
| ---
| - metadata:
- | - name: length(a)
+ | - name: COLUMN_1
| type: integer
| rows:
| - [5]
@@ -326,7 +326,7 @@ SELECT length(a) FROM t0;
SELECT typeof(a) FROM t0;
| ---
| - metadata:
- | - name: typeof(a)
+ | - name: COLUMN_1
| type: string
| rows:
| - ['boolean']
@@ -344,7 +344,7 @@ SELECT AVG(a) FROM t0;
SELECT MIN(a) FROM t0;
| ---
| - metadata:
- | - name: MIN(a)
+ | - name: COLUMN_1
| type: scalar
| rows:
| - [false]
@@ -352,7 +352,7 @@ SELECT MIN(a) FROM t0;
SELECT MAX(a) FROM t0;
| ---
| - metadata:
- | - name: MAX(a)
+ | - name: COLUMN_1
| type: scalar
| rows:
| - [true]
@@ -365,7 +365,7 @@ SELECT SUM(a) FROM t0;
SELECT COUNT(a) FROM t0;
| ---
| - metadata:
- | - name: COUNT(a)
+ | - name: COLUMN_1
| type: integer
| rows:
| - [2]
@@ -378,7 +378,7 @@ SELECT TOTAL(a) FROM t0;
SELECT GROUP_CONCAT(a, ' +++ ') FROM t0;
| ---
| - metadata:
- | - name: GROUP_CONCAT(a, ' +++ ')
+ | - name: COLUMN_1
| type: string
| rows:
| - ['FALSE +++ TRUE']
@@ -392,13 +392,13 @@ SELECT GROUP_CONCAT(a, ' +++ ') FROM t0;
box.execute('SELECT ?, ?, return_type($1), typeof($2);', {true, false})
| ---
| - metadata:
- | - name: '?'
+ | - name: COLUMN_1
| type: boolean
- | - name: '?'
+ | - name: COLUMN_2
| type: boolean
- | - name: return_type($1)
+ | - name: COLUMN_3
| type: string
- | - name: typeof($2)
+ | - name: COLUMN_4
| type: string
| rows:
| - [true, false, 'boolean', 'boolean']
@@ -422,9 +422,9 @@ parameters[2][':value1'] = false
box.execute('SELECT :value1, @value2;', parameters)
| ---
| - metadata:
- | - name: :value1
+ | - name: COLUMN_1
| type: boolean
- | - name: '@value2'
+ | - name: COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -501,9 +501,9 @@ INSERT INTO t3 VALUES (4, false)
SELECT cast(true AS INTEGER), cast(false AS INTEGER);
| ---
| - metadata:
- | - name: cast(true AS INTEGER)
+ | - name: COLUMN_1
| type: integer
- | - name: cast(false AS INTEGER)
+ | - name: COLUMN_2
| type: integer
| rows:
| - [1, 0]
@@ -511,9 +511,9 @@ SELECT cast(true AS INTEGER), cast(false AS INTEGER);
SELECT cast(true AS NUMBER), cast(false AS NUMBER);
| ---
| - metadata:
- | - name: cast(true AS NUMBER)
+ | - name: COLUMN_1
| type: number
- | - name: cast(false AS NUMBER)
+ | - name: COLUMN_2
| type: number
| rows:
| - [1, 0]
@@ -522,9 +522,9 @@ SELECT cast(true AS NUMBER), cast(false AS NUMBER);
SELECT cast(true AS TEXT), cast(false AS TEXT);
| ---
| - metadata:
- | - name: cast(true AS TEXT)
+ | - name: COLUMN_1
| type: string
- | - name: cast(false AS TEXT)
+ | - name: COLUMN_2
| type: string
| rows:
| - ['TRUE', 'FALSE']
@@ -532,9 +532,9 @@ SELECT cast(true AS TEXT), cast(false AS TEXT);
SELECT cast(true AS BOOLEAN), cast(false AS BOOLEAN);
| ---
| - metadata:
- | - name: cast(true AS BOOLEAN)
+ | - name: COLUMN_1
| type: boolean
- | - name: cast(false AS BOOLEAN)
+ | - name: COLUMN_2
| type: boolean
| rows:
| - [true, false]
@@ -544,11 +544,11 @@ SELECT cast(true AS BOOLEAN), cast(false AS BOOLEAN);
SELECT cast(100 AS BOOLEAN), cast(1 AS BOOLEAN), cast(0 AS BOOLEAN);
| ---
| - metadata:
- | - name: cast(100 AS BOOLEAN)
+ | - name: COLUMN_1
| type: boolean
- | - name: cast(1 AS BOOLEAN)
+ | - name: COLUMN_2
| type: boolean
- | - name: cast(0 AS BOOLEAN)
+ | - name: COLUMN_3
| type: boolean
| rows:
| - [true, true, false]
@@ -556,9 +556,9 @@ SELECT cast(100 AS BOOLEAN), cast(1 AS BOOLEAN), cast(0 AS BOOLEAN);
SELECT cast(0.123 AS BOOLEAN), cast(0.0 AS BOOLEAN);
| ---
| - metadata:
- | - name: cast(0.123 AS BOOLEAN)
+ | - name: COLUMN_1
| type: boolean
- | - name: cast(0.0 AS BOOLEAN)
+ | - name: COLUMN_2
| type: boolean
| rows:
| - [true, false]
@@ -566,9 +566,9 @@ SELECT cast(0.123 AS BOOLEAN), cast(0.0 AS BOOLEAN);
SELECT cast('true' AS BOOLEAN), cast('false' AS BOOLEAN);
| ---
| - metadata:
- | - name: cast('true' AS BOOLEAN)
+ | - name: COLUMN_1
| type: boolean
- | - name: cast('false' AS BOOLEAN)
+ | - name: COLUMN_2
| type: boolean
| rows:
| - [true, false]
@@ -576,9 +576,9 @@ SELECT cast('true' AS BOOLEAN), cast('false' AS BOOLEAN);
SELECT cast('TRUE' AS BOOLEAN), cast('FALSE' AS BOOLEAN);
| ---
| - metadata:
- | - name: cast('TRUE' AS BOOLEAN)
+ | - name: COLUMN_1
| type: boolean
- | - name: cast('FALSE' AS BOOLEAN)
+ | - name: COLUMN_2
| type: boolean
| rows:
| - [true, false]
@@ -887,7 +887,7 @@ SELECT a, COUNT(*) FROM (SELECT * FROM t4 UNION SELECT * FROM t5) GROUP BY a;
| - metadata:
| - name: A
| type: boolean
- | - name: COUNT(*)
+ | - name: COLUMN_1
| type: integer
| rows:
| - [false, 3]
@@ -907,7 +907,7 @@ INSERT INTO t6 VALUES (true, false), (false, true);
SELECT NOT true;
| ---
| - metadata:
- | - name: NOT true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -915,7 +915,7 @@ SELECT NOT true;
SELECT NOT false;
| ---
| - metadata:
- | - name: NOT false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -925,7 +925,7 @@ SELECT a, NOT a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: NOT a
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, true]
@@ -935,7 +935,7 @@ SELECT a, NOT a FROM t;
SELECT true AND true;
| ---
| - metadata:
- | - name: true AND true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -943,7 +943,7 @@ SELECT true AND true;
SELECT true AND false;
| ---
| - metadata:
- | - name: true AND false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -951,7 +951,7 @@ SELECT true AND false;
SELECT false AND true;
| ---
| - metadata:
- | - name: false AND true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -959,7 +959,7 @@ SELECT false AND true;
SELECT false AND false;
| ---
| - metadata:
- | - name: false AND false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -967,7 +967,7 @@ SELECT false AND false;
SELECT true OR true;
| ---
| - metadata:
- | - name: true OR true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -975,7 +975,7 @@ SELECT true OR true;
SELECT true OR false;
| ---
| - metadata:
- | - name: true OR false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -983,7 +983,7 @@ SELECT true OR false;
SELECT false OR true;
| ---
| - metadata:
- | - name: false OR true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -991,7 +991,7 @@ SELECT false OR true;
SELECT false OR false;
| ---
| - metadata:
- | - name: false OR false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -1002,7 +1002,7 @@ SELECT a, true AND a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: true AND a
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -1013,7 +1013,7 @@ SELECT a, false AND a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: false AND a
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -1024,7 +1024,7 @@ SELECT a, true OR a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: true OR a
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, true]
@@ -1035,7 +1035,7 @@ SELECT a, false OR a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: false OR a
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -1046,7 +1046,7 @@ SELECT a, a AND true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a AND true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -1057,7 +1057,7 @@ SELECT a, a AND false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a AND false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -1068,7 +1068,7 @@ SELECT a, a OR true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a OR true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, true]
@@ -1079,7 +1079,7 @@ SELECT a, a OR false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a OR false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -1093,7 +1093,7 @@ SELECT a, a1, a AND a1 FROM t, t6;
| type: boolean
| - name: A1
| type: boolean
- | - name: a AND a1
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false, false]
@@ -1108,7 +1108,7 @@ SELECT a, a1, a OR a1 FROM t, t6;
| type: boolean
| - name: A1
| type: boolean
- | - name: a OR a1
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false, false]
@@ -1622,7 +1622,7 @@ SELECT a1, a2, a2 || a2 FROM t6;
SELECT true > true;
| ---
| - metadata:
- | - name: true > true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -1630,7 +1630,7 @@ SELECT true > true;
SELECT true > false;
| ---
| - metadata:
- | - name: true > false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -1638,7 +1638,7 @@ SELECT true > false;
SELECT false > true;
| ---
| - metadata:
- | - name: false > true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -1646,7 +1646,7 @@ SELECT false > true;
SELECT false > false;
| ---
| - metadata:
- | - name: false > false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -1654,7 +1654,7 @@ SELECT false > false;
SELECT true < true;
| ---
| - metadata:
- | - name: true < true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -1662,7 +1662,7 @@ SELECT true < true;
SELECT true < false;
| ---
| - metadata:
- | - name: true < false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -1670,7 +1670,7 @@ SELECT true < false;
SELECT false < true;
| ---
| - metadata:
- | - name: false < true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -1678,7 +1678,7 @@ SELECT false < true;
SELECT false < false;
| ---
| - metadata:
- | - name: false < false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -1689,7 +1689,7 @@ SELECT a, true > a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: true > a
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, true]
@@ -1700,7 +1700,7 @@ SELECT a, false > a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: false > a
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -1711,7 +1711,7 @@ SELECT a, true < a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: true < a
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -1722,7 +1722,7 @@ SELECT a, false < a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: false < a
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -1733,7 +1733,7 @@ SELECT a, a > true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a > true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -1744,7 +1744,7 @@ SELECT a, a > false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a > false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -1755,7 +1755,7 @@ SELECT a, a < true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a < true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, true]
@@ -1766,7 +1766,7 @@ SELECT a, a < false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a < false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -1780,7 +1780,7 @@ SELECT a, a1, a > a1 FROM t, t6;
| type: boolean
| - name: A1
| type: boolean
- | - name: a > a1
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false, false]
@@ -1795,7 +1795,7 @@ SELECT a, a1, a < a1 FROM t, t6;
| type: boolean
| - name: A1
| type: boolean
- | - name: a < a1
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false, false]
@@ -1807,7 +1807,7 @@ SELECT a, a1, a < a1 FROM t, t6;
SELECT true >= true;
| ---
| - metadata:
- | - name: true >= true
+ | - name: COLUMN_1
| type: any
| rows:
| - [true]
@@ -1815,7 +1815,7 @@ SELECT true >= true;
SELECT true >= false;
| ---
| - metadata:
- | - name: true >= false
+ | - name: COLUMN_1
| type: any
| rows:
| - [true]
@@ -1823,7 +1823,7 @@ SELECT true >= false;
SELECT false >= true;
| ---
| - metadata:
- | - name: false >= true
+ | - name: COLUMN_1
| type: any
| rows:
| - [false]
@@ -1831,7 +1831,7 @@ SELECT false >= true;
SELECT false >= false;
| ---
| - metadata:
- | - name: false >= false
+ | - name: COLUMN_1
| type: any
| rows:
| - [true]
@@ -1839,7 +1839,7 @@ SELECT false >= false;
SELECT true <= true;
| ---
| - metadata:
- | - name: true <= true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -1847,7 +1847,7 @@ SELECT true <= true;
SELECT true <= false;
| ---
| - metadata:
- | - name: true <= false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -1855,7 +1855,7 @@ SELECT true <= false;
SELECT false <= true;
| ---
| - metadata:
- | - name: false <= true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -1863,7 +1863,7 @@ SELECT false <= true;
SELECT false <= false;
| ---
| - metadata:
- | - name: false <= false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -1874,7 +1874,7 @@ SELECT a, true >= a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: true >= a
+ | - name: COLUMN_1
| type: any
| rows:
| - [false, true]
@@ -1885,7 +1885,7 @@ SELECT a, false >= a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: false >= a
+ | - name: COLUMN_1
| type: any
| rows:
| - [false, true]
@@ -1896,7 +1896,7 @@ SELECT a, true <= a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: true <= a
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -1907,7 +1907,7 @@ SELECT a, false <= a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: false <= a
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, true]
@@ -1918,7 +1918,7 @@ SELECT a, a >= true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a >= true
+ | - name: COLUMN_1
| type: any
| rows:
| - [false, false]
@@ -1929,7 +1929,7 @@ SELECT a, a >= false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a >= false
+ | - name: COLUMN_1
| type: any
| rows:
| - [false, true]
@@ -1940,7 +1940,7 @@ SELECT a, a <= true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a <= true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, true]
@@ -1951,7 +1951,7 @@ SELECT a, a <= false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a <= false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, true]
@@ -1965,7 +1965,7 @@ SELECT a, a1, a >= a1 FROM t, t6;
| type: boolean
| - name: A1
| type: boolean
- | - name: a >= a1
+ | - name: COLUMN_1
| type: any
| rows:
| - [false, false, true]
@@ -1980,7 +1980,7 @@ SELECT a, a1, a <= a1 FROM t, t6;
| type: boolean
| - name: A1
| type: boolean
- | - name: a <= a1
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false, true]
@@ -1992,7 +1992,7 @@ SELECT a, a1, a <= a1 FROM t, t6;
SELECT true == true;
| ---
| - metadata:
- | - name: true == true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2000,7 +2000,7 @@ SELECT true == true;
SELECT true == false;
| ---
| - metadata:
- | - name: true == false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2008,7 +2008,7 @@ SELECT true == false;
SELECT false == true;
| ---
| - metadata:
- | - name: false == true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2016,7 +2016,7 @@ SELECT false == true;
SELECT false == false;
| ---
| - metadata:
- | - name: false == false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2024,7 +2024,7 @@ SELECT false == false;
SELECT true != true;
| ---
| - metadata:
- | - name: true != true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2032,7 +2032,7 @@ SELECT true != true;
SELECT true != false;
| ---
| - metadata:
- | - name: true != false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2040,7 +2040,7 @@ SELECT true != false;
SELECT false != true;
| ---
| - metadata:
- | - name: false != true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2048,7 +2048,7 @@ SELECT false != true;
SELECT false != false;
| ---
| - metadata:
- | - name: false != false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2059,7 +2059,7 @@ SELECT a, true == a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: true == a
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -2070,7 +2070,7 @@ SELECT a, false == a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: false == a
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, true]
@@ -2081,7 +2081,7 @@ SELECT a, true != a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: true != a
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, true]
@@ -2092,7 +2092,7 @@ SELECT a, false != a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: false != a
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -2103,7 +2103,7 @@ SELECT a, a == true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a == true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -2114,7 +2114,7 @@ SELECT a, a == false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a == false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, true]
@@ -2125,7 +2125,7 @@ SELECT a, a != true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a != true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, true]
@@ -2136,7 +2136,7 @@ SELECT a, a != false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a != false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -2150,7 +2150,7 @@ SELECT a, a1, a == a1 FROM t, t6;
| type: boolean
| - name: A1
| type: boolean
- | - name: a == a1
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false, true]
@@ -2165,7 +2165,7 @@ SELECT a, a1, a != a1 FROM t, t6;
| type: boolean
| - name: A1
| type: boolean
- | - name: a != a1
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false, false]
@@ -2177,7 +2177,7 @@ SELECT a, a1, a != a1 FROM t, t6;
SELECT true IN (true);
| ---
| - metadata:
- | - name: true IN (true)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2185,7 +2185,7 @@ SELECT true IN (true);
SELECT false IN (true);
| ---
| - metadata:
- | - name: false IN (true)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2193,7 +2193,7 @@ SELECT false IN (true);
SELECT true IN (false);
| ---
| - metadata:
- | - name: true IN (false)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2201,7 +2201,7 @@ SELECT true IN (false);
SELECT false IN (false);
| ---
| - metadata:
- | - name: false IN (false)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2209,7 +2209,7 @@ SELECT false IN (false);
SELECT true IN (true, false);
| ---
| - metadata:
- | - name: true IN (true, false)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2217,7 +2217,7 @@ SELECT true IN (true, false);
SELECT false IN (true, false);
| ---
| - metadata:
- | - name: false IN (true, false)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2225,7 +2225,7 @@ SELECT false IN (true, false);
SELECT true IN (SELECT a1 FROM t6);
| ---
| - metadata:
- | - name: true IN (SELECT a1 FROM t6)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2233,7 +2233,7 @@ SELECT true IN (SELECT a1 FROM t6);
SELECT false IN (SELECT a1 FROM t6);
| ---
| - metadata:
- | - name: false IN (SELECT a1 FROM t6)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2241,7 +2241,7 @@ SELECT false IN (SELECT a1 FROM t6);
SELECT true IN (SELECT a1 FROM t6 LIMIT 1);
| ---
| - metadata:
- | - name: true IN (SELECT a1 FROM t6 LIMIT 1)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2249,7 +2249,7 @@ SELECT true IN (SELECT a1 FROM t6 LIMIT 1);
SELECT false IN (SELECT a1 FROM t6 LIMIT 1);
| ---
| - metadata:
- | - name: false IN (SELECT a1 FROM t6 LIMIT 1)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2257,7 +2257,7 @@ SELECT false IN (SELECT a1 FROM t6 LIMIT 1);
SELECT true IN (1, 1.2, 'true', false);
| ---
| - metadata:
- | - name: true IN (1, 1.2, 'true', false)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2265,7 +2265,7 @@ SELECT true IN (1, 1.2, 'true', false);
SELECT false IN (1, 1.2, 'true', false);
| ---
| - metadata:
- | - name: false IN (1, 1.2, 'true', false)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2276,7 +2276,7 @@ SELECT a, a IN (true) FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a IN (true)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -2287,7 +2287,7 @@ SELECT a, a IN (false) FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a IN (false)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, true]
@@ -2298,7 +2298,7 @@ SELECT a, a IN (true, false) FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a IN (true, false)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, true]
@@ -2309,7 +2309,7 @@ SELECT a, a IN (SELECT a1 FROM t6 LIMIT 1) FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a IN (SELECT a1 FROM t6 LIMIT 1)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, true]
@@ -2320,7 +2320,7 @@ SELECT a, a IN (SELECT a1 FROM t6) FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a IN (SELECT a1 FROM t6)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, true]
@@ -2331,7 +2331,7 @@ SELECT a, a IN (1, 1.2, 'true', false) FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a IN (1, 1.2, 'true', false)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, true]
@@ -2341,7 +2341,7 @@ SELECT a, a IN (1, 1.2, 'true', false) FROM t;
SELECT true BETWEEN true AND true;
| ---
| - metadata:
- | - name: true BETWEEN true AND true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2349,7 +2349,7 @@ SELECT true BETWEEN true AND true;
SELECT false BETWEEN true AND true;
| ---
| - metadata:
- | - name: false BETWEEN true AND true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2357,7 +2357,7 @@ SELECT false BETWEEN true AND true;
SELECT true BETWEEN false AND false;
| ---
| - metadata:
- | - name: true BETWEEN false AND false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2365,7 +2365,7 @@ SELECT true BETWEEN false AND false;
SELECT false BETWEEN false AND false;
| ---
| - metadata:
- | - name: false BETWEEN false AND false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2373,7 +2373,7 @@ SELECT false BETWEEN false AND false;
SELECT true BETWEEN true AND false;
| ---
| - metadata:
- | - name: true BETWEEN true AND false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2381,7 +2381,7 @@ SELECT true BETWEEN true AND false;
SELECT false BETWEEN true AND false;
| ---
| - metadata:
- | - name: false BETWEEN true AND false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2389,7 +2389,7 @@ SELECT false BETWEEN true AND false;
SELECT true BETWEEN false AND true;
| ---
| - metadata:
- | - name: true BETWEEN false AND true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2397,7 +2397,7 @@ SELECT true BETWEEN false AND true;
SELECT false BETWEEN false AND true;
| ---
| - metadata:
- | - name: false BETWEEN false AND true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2408,7 +2408,7 @@ SELECT a, a BETWEEN true AND true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a BETWEEN true AND true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -2419,7 +2419,7 @@ SELECT a, a BETWEEN false AND false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a BETWEEN false AND false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, true]
@@ -2430,7 +2430,7 @@ SELECT a, a BETWEEN true AND false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a BETWEEN true AND false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -2441,7 +2441,7 @@ SELECT a, a BETWEEN false AND true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a BETWEEN false AND true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, true]
@@ -2466,7 +2466,7 @@ SELECT true AND 2;
SELECT false AND 2;
| ---
| - metadata:
- | - name: false AND 2
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2489,7 +2489,7 @@ SELECT 2 AND true;
SELECT 2 AND false;
| ---
| - metadata:
- | - name: 2 AND false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2556,7 +2556,7 @@ SELECT b, false AND b FROM t7;
| - metadata:
| - name: B
| type: integer
- | - name: false AND b
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [123, false]
@@ -2581,7 +2581,7 @@ SELECT b, b AND false FROM t7;
| - metadata:
| - name: B
| type: integer
- | - name: b AND false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [123, false]
@@ -3861,7 +3861,7 @@ SELECT a2, b, b != a2 FROM t6, t7;
SELECT true IN (0, 1, 2, 3);
| ---
| - metadata:
- | - name: true IN (0, 1, 2, 3)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -3869,7 +3869,7 @@ SELECT true IN (0, 1, 2, 3);
SELECT false IN (0, 1, 2, 3);
| ---
| - metadata:
- | - name: false IN (0, 1, 2, 3)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -3889,7 +3889,7 @@ SELECT a1, a1 IN (0, 1, 2, 3) FROM t6
| - metadata:
| - name: A1
| type: boolean
- | - name: a1 IN (0, 1, 2, 3)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -3935,7 +3935,7 @@ SELECT true AND 2.3;
SELECT false AND 2.3;
| ---
| - metadata:
- | - name: false AND 2.3
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -3958,7 +3958,7 @@ SELECT 2.3 AND true;
SELECT 2.3 AND false;
| ---
| - metadata:
- | - name: 2.3 AND false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -4025,7 +4025,7 @@ SELECT c, false AND c FROM t8;
| - metadata:
| - name: C
| type: number
- | - name: false AND c
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [4.56, false]
@@ -4050,7 +4050,7 @@ SELECT c, c AND false FROM t8;
| - metadata:
| - name: C
| type: number
- | - name: c AND false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [4.56, false]
@@ -5006,7 +5006,7 @@ SELECT a2, c, c != a2 FROM t6, t8;
SELECT true IN (0.1, 1.2, 2.3, 3.4);
| ---
| - metadata:
- | - name: true IN (0.1, 1.2, 2.3, 3.4)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5014,7 +5014,7 @@ SELECT true IN (0.1, 1.2, 2.3, 3.4);
SELECT false IN (0.1, 1.2, 2.3, 3.4);
| ---
| - metadata:
- | - name: false IN (0.1, 1.2, 2.3, 3.4)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5022,7 +5022,7 @@ SELECT false IN (0.1, 1.2, 2.3, 3.4);
SELECT a1 IN (0.1, 1.2, 2.3, 3.4) FROM t6 LIMIT 1;
| ---
| - metadata:
- | - name: a1 IN (0.1, 1.2, 2.3, 3.4)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5030,7 +5030,7 @@ SELECT a1 IN (0.1, 1.2, 2.3, 3.4) FROM t6 LIMIT 1;
SELECT a2 IN (0.1, 1.2, 2.3, 3.4) FROM t6 LIMIT 1;
| ---
| - metadata:
- | - name: a2 IN (0.1, 1.2, 2.3, 3.4)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5095,7 +5095,7 @@ SELECT true AND 'abc';
SELECT false AND 'abc';
| ---
| - metadata:
- | - name: false AND 'abc'
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5118,7 +5118,7 @@ SELECT 'abc' AND true;
SELECT 'abc' AND false;
| ---
| - metadata:
- | - name: '''abc'' AND false'
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5185,7 +5185,7 @@ SELECT d, false AND d FROM t9;
| - metadata:
| - name: D
| type: string
- | - name: false AND d
+ | - name: COLUMN_1
| type: boolean
| rows:
| - ['AsdF', false]
@@ -5210,7 +5210,7 @@ SELECT d, d AND false FROM t9;
| - metadata:
| - name: D
| type: string
- | - name: d AND false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - ['AsdF', false]
@@ -5470,7 +5470,7 @@ SELECT true AND 'TRUE';
SELECT false AND 'TRUE';
| ---
| - metadata:
- | - name: false AND 'TRUE'
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5493,7 +5493,7 @@ SELECT 'TRUE' AND true;
SELECT 'TRUE' AND false;
| ---
| - metadata:
- | - name: '''TRUE'' AND false'
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5560,7 +5560,7 @@ SELECT d, false AND d FROM t9 WHERE d = 'TRUE';
| - metadata:
| - name: D
| type: string
- | - name: false AND d
+ | - name: COLUMN_1
| type: boolean
| rows:
| - ['TRUE', false]
@@ -5585,7 +5585,7 @@ SELECT d, d AND false FROM t9 WHERE d = 'TRUE';
| - metadata:
| - name: D
| type: string
- | - name: d AND false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - ['TRUE', false]
@@ -5650,7 +5650,7 @@ SELECT true AND 'true';
SELECT false AND 'true';
| ---
| - metadata:
- | - name: false AND 'true'
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5673,7 +5673,7 @@ SELECT 'true' AND true;
SELECT 'true' AND false;
| ---
| - metadata:
- | - name: '''true'' AND false'
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5740,7 +5740,7 @@ SELECT d, false AND d FROM t9 WHERE d = 'true';
| - metadata:
| - name: D
| type: string
- | - name: false AND d
+ | - name: COLUMN_1
| type: boolean
| rows:
| - ['true', false]
@@ -5765,7 +5765,7 @@ SELECT d, d AND false FROM t9 WHERE d = 'true';
| - metadata:
| - name: D
| type: string
- | - name: d AND false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - ['true', false]
@@ -5830,7 +5830,7 @@ SELECT true AND 'FALSE';
SELECT false AND 'FALSE';
| ---
| - metadata:
- | - name: false AND 'FALSE'
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5853,7 +5853,7 @@ SELECT 'FALSE' AND true;
SELECT 'FALSE' AND false;
| ---
| - metadata:
- | - name: '''FALSE'' AND false'
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5920,7 +5920,7 @@ SELECT d, false AND d FROM t9 WHERE d = 'FALSE';
| - metadata:
| - name: D
| type: string
- | - name: false AND d
+ | - name: COLUMN_1
| type: boolean
| rows:
| - ['FALSE', false]
@@ -5945,7 +5945,7 @@ SELECT d, d AND false FROM t9 WHERE d = 'FALSE';
| - metadata:
| - name: D
| type: string
- | - name: d AND false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - ['FALSE', false]
@@ -6010,7 +6010,7 @@ SELECT true AND 'false';
SELECT false AND 'false';
| ---
| - metadata:
- | - name: false AND 'false'
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -6033,7 +6033,7 @@ SELECT 'false' AND true;
SELECT 'false' AND false;
| ---
| - metadata:
- | - name: '''false'' AND false'
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -6100,7 +6100,7 @@ SELECT d, false AND d FROM t9 WHERE d = 'false';
| - metadata:
| - name: D
| type: string
- | - name: false AND d
+ | - name: COLUMN_1
| type: boolean
| rows:
| - ['false', false]
@@ -6125,7 +6125,7 @@ SELECT d, d AND false FROM t9 WHERE d = 'false';
| - metadata:
| - name: D
| type: string
- | - name: d AND false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - ['false', false]
diff --git a/test/sql/collation.result b/test/sql/collation.result
index 4e4c27ef0..bfc89e1b8 100644
--- a/test/sql/collation.result
+++ b/test/sql/collation.result
@@ -111,7 +111,7 @@ box.execute([[SELECT descriptor, upper(letter), letter FROM tu where UPPER(lette
- metadata:
- name: DESCRIPTOR
type: string
- - name: upper(letter)
+ - name: COLUMN_1
type: string
- name: LETTER
type: string
@@ -124,7 +124,7 @@ box.execute([[SELECT descriptor, upper(letter COLLATE "GERMAN"), letter FROM tu
- metadata:
- name: DESCRIPTOR
type: string
- - name: upper(letter COLLATE "GERMAN")
+ - name: COLUMN_1
type: string
- name: LETTER
type: string
@@ -335,14 +335,14 @@ box.execute("SELECT a FROM t UNION SELECT c FROM t;")
box.execute("SELECT c COLLATE \"binary\" FROM t UNION SELECT a FROM t;")
---
- metadata:
- - name: c COLLATE "binary"
+ - name: COLUMN_1
type: string
rows: []
...
box.execute("SELECT b COLLATE \"unicode\" FROM t UNION SELECT a FROM t;")
---
- metadata:
- - name: b COLLATE "unicode"
+ - name: COLUMN_1
type: string
rows: []
...
@@ -1128,7 +1128,7 @@ box.execute("INSERT INTO jj VALUES (1,'A'), (2,'a')")
box.execute("SELECT DISTINCT trim(s2) FROM jj;")
---
- metadata:
- - name: trim(s2)
+ - name: COLUMN_1
type: string
rows:
- ['A']
@@ -1140,7 +1140,7 @@ box.execute("INSERT INTO jj VALUES (3, 'aS'), (4, 'AS');")
box.execute("SELECT DISTINCT replace(s2, 'S', 's') FROM jj;")
---
- metadata:
- - name: replace(s2, 'S', 's')
+ - name: COLUMN_1
type: string
rows:
- ['A']
@@ -1149,7 +1149,7 @@ box.execute("SELECT DISTINCT replace(s2, 'S', 's') FROM jj;")
box.execute("SELECT DISTINCT substr(s2, 1, 1) FROM jj;")
---
- metadata:
- - name: substr(s2, 1, 1)
+ - name: COLUMN_1
type: string
rows:
- ['A']
diff --git a/test/sql/errinj.result b/test/sql/errinj.result
index 68c001f28..f19203bc6 100644
--- a/test/sql/errinj.result
+++ b/test/sql/errinj.result
@@ -120,7 +120,7 @@ insert_res
select_res
---
- metadata:
- - name: '1'
+ - name: COLUMN_1
type: integer
rows:
- [1]
diff --git a/test/sql/foreign-keys.result b/test/sql/foreign-keys.result
index f1d973443..33689a06e 100644
--- a/test/sql/foreign-keys.result
+++ b/test/sql/foreign-keys.result
@@ -357,7 +357,7 @@ box.execute('ALTER TABLE tc ADD CONSTRAINT fk1 FOREIGN KEY (id) REFERENCES tp(id
box.execute('SELECT row_count();')
---
- metadata:
- - name: row_count()
+ - name: COLUMN_1
type: integer
rows:
- [1]
@@ -374,7 +374,7 @@ box.execute('ALTER TABLE tc DROP CONSTRAINT fk1;')
box.execute('SELECT row_count();')
---
- metadata:
- - name: row_count()
+ - name: COLUMN_1
type: integer
rows:
- [1]
diff --git a/test/sql/full_metadata.result b/test/sql/full_metadata.result
index 5a93c41ec..8ab83c5fd 100644
--- a/test/sql/full_metadata.result
+++ b/test/sql/full_metadata.result
@@ -57,7 +57,7 @@ execute("SELECT 'aSd' COLLATE \"unicode_ci\";")
| - metadata:
| - type: string
| span: '''aSd'' COLLATE "unicode_ci"'
- | name: '''aSd'' COLLATE "unicode_ci"'
+ | name: COLUMN_1
| collation: unicode_ci
| rows:
| - ['aSd']
@@ -78,7 +78,7 @@ execute("SELECT c COLLATE \"unicode\" FROM t;")
| - metadata:
| - type: string
| span: c COLLATE "unicode"
- | name: c COLLATE "unicode"
+ | name: COLUMN_1
| collation: unicode
| rows:
| - ['aSd']
@@ -165,7 +165,7 @@ execute("SELECT *, id + 1 AS x, a AS y, c || 'abc' FROM t;")
| is_nullable: false
| - type: string
| span: c || 'abc'
- | name: c || 'abc'
+ | name: COLUMN_1
| rows:
| - [1, 1, 'aSd', 2, 1, 'aSdabc']
| ...
@@ -185,8 +185,8 @@ execute("SELECT * FROM v;")
| name: Y
| is_nullable: false
| - type: string
- | span: c || 'abc'
- | name: c || 'abc'
+ | span: COLUMN_1
+ | name: COLUMN_1
| rows:
| - [2, 1, 'aSdabc']
| ...
@@ -209,10 +209,71 @@ execute([[UPDATE "_session_settings" SET "value" = false WHERE "name" = 'sql_ful
| - row_count: 1
| ...
+-- gh-3962: Check auto generated names in different selects.
+execute("VALUES(1, 2, 3);")
+ | ---
+ | - metadata:
+ | - name: COLUMN_1
+ | type: integer
+ | - name: COLUMN_2
+ | type: integer
+ | - name: COLUMN_3
+ | type: integer
+ | rows:
+ | - [1, 2, 3]
+ | ...
+execute("SELECT * FROM (VALUES (1+1, 1+1));")
+ | ---
+ | - metadata:
+ | - name: COLUMN_1
+ | type: integer
+ | - name: COLUMN_2
+ | type: integer
+ | rows:
+ | - [2, 2]
+ | ...
+execute("SELECT 1+1, 1+1;")
+ | ---
+ | - metadata:
+ | - name: COLUMN_1
+ | type: integer
+ | - name: COLUMN_2
+ | type: integer
+ | rows:
+ | - [2, 2]
+ | ...
+execute("SELECT ?, ?, ?", {1, 2, 3})
+ | ---
+ | - metadata:
+ | - name: COLUMN_1
+ | type: integer
+ | - name: COLUMN_2
+ | type: integer
+ | - name: COLUMN_3
+ | type: integer
+ | rows:
+ | - [1, 2, 3]
+ | ...
test_run:cmd("setopt delimiter ';'")
| ---
| - true
| ...
+execute([[SELECT * FROM (SELECT * FROM (VALUES(1, 2))),
+ (SELECT * FROM (VALUES(1, 2)))]]);
+ | ---
+ | - metadata:
+ | - name: COLUMN_1
+ | type: integer
+ | - name: COLUMN_2
+ | type: integer
+ | - name: COLUMN_3
+ | type: integer
+ | - name: COLUMN_4
+ | type: integer
+ | rows:
+ | - [1, 2, 1, 2]
+ | ...
+
if remote then
cn:close()
box.schema.user.revoke('guest', 'read, write, execute', 'universe')
diff --git a/test/sql/full_metadata.test.lua b/test/sql/full_metadata.test.lua
index a9ba320c9..90972c48c 100644
--- a/test/sql/full_metadata.test.lua
+++ b/test/sql/full_metadata.test.lua
@@ -47,7 +47,15 @@ execute("SELECT x, y FROM v;")
execute([[UPDATE "_session_settings" SET "value" = false WHERE "name" = 'sql_full_metadata';]])
+-- gh-3962: Check auto generated names in different selects.
+execute("VALUES(1, 2, 3);")
+execute("SELECT * FROM (VALUES (1+1, 1+1));")
+execute("SELECT 1+1, 1+1;")
+execute("SELECT ?, ?, ?", {1, 2, 3})
test_run:cmd("setopt delimiter ';'")
+execute([[SELECT * FROM (SELECT * FROM (VALUES(1, 2))),
+ (SELECT * FROM (VALUES(1, 2)))]]);
+
if remote then
cn:close()
box.schema.user.revoke('guest', 'read, write, execute', 'universe')
diff --git a/test/sql/func-recreate.result b/test/sql/func-recreate.result
index 3709df787..5fd2b79c0 100644
--- a/test/sql/func-recreate.result
+++ b/test/sql/func-recreate.result
@@ -48,7 +48,7 @@ test_run:cmd("setopt delimiter ''");
ch:get()
---
- metadata:
- - name: WAITFOR(0.2)
+ - name: COLUMN_1
type: number
rows:
- [0.2]
diff --git a/test/sql/gh-3199-no-mem-leaks.result b/test/sql/gh-3199-no-mem-leaks.result
index d8590779a..6ce8df436 100644
--- a/test/sql/gh-3199-no-mem-leaks.result
+++ b/test/sql/gh-3199-no-mem-leaks.result
@@ -32,7 +32,7 @@ box.execute('SELECT x, y, x + y FROM test ORDER BY y')
type: integer
- name: Y
type: integer
- - name: x + y
+ - name: COLUMN_1
type: integer
rows:
- [1, 1, 2]
@@ -49,7 +49,7 @@ box.execute('SELECT x, y, x + y FROM test ORDER BY y')
type: integer
- name: Y
type: integer
- - name: x + y
+ - name: COLUMN_1
type: integer
rows:
- [1, 1, 2]
@@ -62,7 +62,7 @@ box.execute('SELECT x, y, x + y FROM test ORDER BY y')
type: integer
- name: Y
type: integer
- - name: x + y
+ - name: COLUMN_1
type: integer
rows:
- [1, 1, 2]
@@ -75,7 +75,7 @@ box.execute('SELECT x, y, x + y FROM test ORDER BY y')
type: integer
- name: Y
type: integer
- - name: x + y
+ - name: COLUMN_1
type: integer
rows:
- [1, 1, 2]
@@ -88,7 +88,7 @@ box.execute('SELECT x, y, x + y FROM test ORDER BY y')
type: integer
- name: Y
type: integer
- - name: x + y
+ - name: COLUMN_1
type: integer
rows:
- [1, 1, 2]
@@ -115,7 +115,7 @@ box.execute('SELECT a, id + 2, b FROM test2 WHERE b < id * 2 ORDER BY a ')
- metadata:
- name: A
type: string
- - name: id + 2
+ - name: COLUMN_1
type: integer
- name: B
type: integer
@@ -134,7 +134,7 @@ box.execute('SELECT a, id + 2 * b, a FROM test2 WHERE b < id * 2 ORDER BY a ')
- metadata:
- name: A
type: string
- - name: id + 2 * b
+ - name: COLUMN_1
type: integer
- name: A
type: string
@@ -149,7 +149,7 @@ box.execute('SELECT a, id + 2 * b, a FROM test2 WHERE b < id * 2 ORDER BY a ')
- metadata:
- name: A
type: string
- - name: id + 2 * b
+ - name: COLUMN_1
type: integer
- name: A
type: string
@@ -164,7 +164,7 @@ box.execute('SELECT a, id + 2 * b, a FROM test2 WHERE b < id * 2 ORDER BY a ')
- metadata:
- name: A
type: string
- - name: id + 2 * b
+ - name: COLUMN_1
type: integer
- name: A
type: string
@@ -183,7 +183,7 @@ box.execute('SELECT x, y + 3 * b, b FROM test2, test WHERE b = x')
- metadata:
- name: X
type: integer
- - name: y + 3 * b
+ - name: COLUMN_1
type: integer
- name: B
type: integer
@@ -196,7 +196,7 @@ box.execute('SELECT x, y + 3 * b, b FROM test2, test WHERE b = x')
- metadata:
- name: X
type: integer
- - name: y + 3 * b
+ - name: COLUMN_1
type: integer
- name: B
type: integer
@@ -209,7 +209,7 @@ box.execute('SELECT x, y + 3 * b, b FROM test2, test WHERE b = x')
- metadata:
- name: X
type: integer
- - name: y + 3 * b
+ - name: COLUMN_1
type: integer
- name: B
type: integer
diff --git a/test/sql/gh-3888-values-blob-assert.result b/test/sql/gh-3888-values-blob-assert.result
index 0a1af28f2..9f00cce51 100644
--- a/test/sql/gh-3888-values-blob-assert.result
+++ b/test/sql/gh-3888-values-blob-assert.result
@@ -1,3 +1,4 @@
+-- test-run result file version 2
-- sql: assertion fault on VALUES #3888
--
-- Make sure that tokens representing values of integer, float,
@@ -5,79 +6,87 @@
-- keywords of the same names.
--
test_run = require('test_run').new()
----
-...
+ | ---
+ | ...
engine = test_run:get_cfg('engine')
----
-...
+ | ---
+ | ...
_ = box.space._session_settings:update('sql_default_engine', {{'=', 2, engine}})
----
-...
+ | ---
+ | ...
+
-- check 'VALUES' against typedef keywords (should fail)
box.execute('VALUES(scalar)')
----
-- null
-- Syntax error at line 1 near 'scalar'
-...
+ | ---
+ | - null
+ | - Syntax error at line 1 near 'scalar'
+ | ...
box.execute('VALUES(float)')
----
-- null
-- Syntax error at line 1 near 'float'
-...
+ | ---
+ | - null
+ | - Syntax error at line 1 near 'float'
+ | ...
+
-- check 'SELECT' against typedef keywords (should fail)
box.execute('SELECT scalar')
----
-- null
-- Syntax error at line 1 near 'scalar'
-...
+ | ---
+ | - null
+ | - Syntax error at line 1 near 'scalar'
+ | ...
box.execute('SELECT float')
----
-- null
-- Syntax error at line 1 near 'float'
-...
+ | ---
+ | - null
+ | - Syntax error at line 1 near 'float'
+ | ...
+
-- check 'VALUES' against ID (should fail)
box.execute('VALUES(TheColumnName)')
----
-- null
-- Can’t resolve field 'THECOLUMNNAME'
-...
+ | ---
+ | - null
+ | - Can’t resolve field 'THECOLUMNNAME'
+ | ...
+
-- check 'SELECT' against ID (should fail)
box.execute('SELECT TheColumnName')
----
-- null
-- Can’t resolve field 'THECOLUMNNAME'
-...
+ | ---
+ | - null
+ | - Can’t resolve field 'THECOLUMNNAME'
+ | ...
+
-- check 'VALUES' well-formed expression (returns value)
box.execute('VALUES(-0.5e-2)')
----
-- metadata:
- - name: column1
- type: double
- rows:
- - [-0.005]
-...
+ | ---
+ | - metadata:
+ | - name: COLUMN_1
+ | type: double
+ | rows:
+ | - [-0.005]
+ | ...
box.execute('SELECT X\'507265766564\'')
----
-- metadata:
- - name: X'507265766564'
- type: varbinary
- rows:
- - ['Preved']
-...
+ | ---
+ | - metadata:
+ | - name: COLUMN_1
+ | type: varbinary
+ | rows:
+ | - ['Preved']
+ | ...
+
-- check 'SELECT' well-formed expression (return value)
box.execute('SELECT 3.14')
----
-- metadata:
- - name: '3.14'
- type: double
- rows:
- - [3.14]
-...
+ | ---
+ | - metadata:
+ | - name: COLUMN_1
+ | type: double
+ | rows:
+ | - [3.14]
+ | ...
box.execute('SELECT X\'4D6564766564\'')
----
-- metadata:
- - name: X'4D6564766564'
- type: varbinary
- rows:
- - ['Medved']
-...
+ | ---
+ | - metadata:
+ | - name: COLUMN_1
+ | type: varbinary
+ | rows:
+ | - ['Medved']
+ | ...
+
+
diff --git a/test/sql/icu-upper-lower.result b/test/sql/icu-upper-lower.result
index f7b9dfa38..3ecc07d94 100644
--- a/test/sql/icu-upper-lower.result
+++ b/test/sql/icu-upper-lower.result
@@ -23,11 +23,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Zəfər, jaketini də, papağını da götür, bu axşam hava çox soyuq
- olacaq. ')
+ - name: COLUMN_1
type: string
- - name: upper(' Zəfər, jaketini də, papağını da götür, bu axşam hava çox soyuq
- olacaq. ')
+ - name: COLUMN_2
type: string
rows:
- [' zəfər, jaketini də, papağını da götür, bu axşam hava çox soyuq olacaq. ',
@@ -38,9 +36,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' The quick brown fox jumps over the lazy dog. ')
+ - name: COLUMN_1
type: string
- - name: upper(' The quick brown fox jumps over the lazy dog. ')
+ - name: COLUMN_2
type: string
rows:
- [' the quick brown fox jumps over the lazy dog. ', ' THE QUICK BROWN FOX
@@ -52,9 +50,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' The quick brown fox jumps over the lazy dog. ')
+ - name: COLUMN_1
type: string
- - name: upper(' The quick brown fox jumps over the lazy dog. ')
+ - name: COLUMN_2
type: string
rows:
- [' the quick brown fox jumps over the lazy dog. ', ' THE QUICK BROWN FOX
@@ -66,11 +64,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Բել դղյակի ձախ ժամն օֆ ազգությանը ցպահանջ չճշտած վնաս էր եւ
- փառք ')
+ - name: COLUMN_1
type: string
- - name: upper(' Բել դղյակի ձախ ժամն օֆ ազգությանը ցպահանջ չճշտած վնաս էր եւ
- փառք ')
+ - name: COLUMN_2
type: string
rows:
- [' բել դղյակի ձախ ժամն օֆ ազգությանը ցպահանջ չճշտած վնաս էր եւ փառք ', ' ԲԵԼ
@@ -82,11 +78,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' У Іўі худы жвавы чорт у зялёнай камізэльцы пабег пад’есці фаршу
- з юшкай ')
+ - name: COLUMN_1
type: string
- - name: upper(' У Іўі худы жвавы чорт у зялёнай камізэльцы пабег пад’есці фаршу
- з юшкай ')
+ - name: COLUMN_2
type: string
rows:
- [' у іўі худы жвавы чорт у зялёнай камізэльцы пабег пад’есці фаршу з юшкай ',
@@ -98,11 +92,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Τάχιστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός
- ')
+ - name: COLUMN_1
type: string
- - name: upper(' Τάχιστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός
- ')
+ - name: COLUMN_2
type: string
rows:
- [' τάχιστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός ', ' ΤΆΧΙΣΤΗ
@@ -114,11 +106,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Chuaigh bé mhórshách le dlúthspád fíorfhinn trí hata mo dhea-phorcáin
- bhig ')
+ - name: COLUMN_1
type: string
- - name: upper(' Chuaigh bé mhórshách le dlúthspád fíorfhinn trí hata mo dhea-phorcáin
- bhig ')
+ - name: COLUMN_2
type: string
rows:
- [' chuaigh bé mhórshách le dlúthspád fíorfhinn trí hata mo dhea-phorcáin bhig ',
@@ -130,9 +120,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Quiere la boca exhausta vid, kiwi, piña y fugaz jamón ')
+ - name: COLUMN_1
type: string
- - name: upper(' Quiere la boca exhausta vid, kiwi, piña y fugaz jamón ')
+ - name: COLUMN_2
type: string
rows:
- [' quiere la boca exhausta vid, kiwi, piña y fugaz jamón ', ' QUIERE LA
@@ -144,9 +134,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' 키스의 고유조건은 입술끼리 만나야 하고 특별한 기술은 필요치 않다 ')
+ - name: COLUMN_1
type: string
- - name: upper(' 키스의 고유조건은 입술끼리 만나야 하고 특별한 기술은 필요치 않다 ')
+ - name: COLUMN_2
type: string
rows:
- [' 키스의 고유조건은 입술끼리 만나야 하고 특별한 기술은 필요치 않다 ', ' 키스의 고유조건은 입술끼리 만나야 하고 특별한
@@ -158,9 +148,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Glāžšķūņa rūķīši dzērumā čiepj Baha koncertflīģeļu vākus ')
+ - name: COLUMN_1
type: string
- - name: upper(' Glāžšķūņa rūķīši dzērumā čiepj Baha koncertflīģeļu vākus ')
+ - name: COLUMN_2
type: string
rows:
- [' glāžšķūņa rūķīši dzērumā čiepj baha koncertflīģeļu vākus ', ' GLĀŽŠĶŪŅA
@@ -172,11 +162,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Zwölf große Boxkämpfer jagen Viktor quer über den Sylter Deich
- ')
+ - name: COLUMN_1
type: string
- - name: upper(' Zwölf große Boxkämpfer jagen Viktor quer über den Sylter Deich
- ')
+ - name: COLUMN_2
type: string
rows:
- [' zwölf große boxkämpfer jagen viktor quer über den sylter deich ', ' ZWÖLF
@@ -188,9 +176,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Pchnąć w tę łódź jeża lub ośm skrzyń fig. ')
+ - name: COLUMN_1
type: string
- - name: upper(' Pchnąć w tę łódź jeża lub ośm skrzyń fig. ')
+ - name: COLUMN_2
type: string
rows:
- [' pchnąć w tę łódź jeża lub ośm skrzyń fig. ', ' PCHNĄĆ W TĘ ŁÓDŹ JEŻA
@@ -202,9 +190,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Чуєш їх, доцю, га? Кумедна ж ти, прощайся без ґольфів! ')
+ - name: COLUMN_1
type: string
- - name: upper(' Чуєш їх, доцю, га? Кумедна ж ти, прощайся без ґольфів! ')
+ - name: COLUMN_2
type: string
rows:
- [' чуєш їх, доцю, га? кумедна ж ти, прощайся без ґольфів! ', ' ЧУЄШ ЇХ,
@@ -216,9 +204,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Příliš žluťoučký kůň úpěl ďábelské ódy ')
+ - name: COLUMN_1
type: string
- - name: upper(' Příliš žluťoučký kůň úpěl ďábelské ódy ')
+ - name: COLUMN_2
type: string
rows:
- [' příliš žluťoučký kůň úpěl ďábelské ódy ', ' PŘÍLIŠ ŽLUŤOUČKÝ KŮŇ ÚPĚL
@@ -230,11 +218,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Laŭ Ludoviko Zamenhof bongustas freŝa ĉeĥa manĝaĵo kun spicoj
- ')
+ - name: COLUMN_1
type: string
- - name: upper(' Laŭ Ludoviko Zamenhof bongustas freŝa ĉeĥa manĝaĵo kun spicoj
- ')
+ - name: COLUMN_2
type: string
rows:
- [' laŭ ludoviko zamenhof bongustas freŝa ĉeĥa manĝaĵo kun spicoj ', ' LAŬ
@@ -246,9 +232,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' いろはにほへと ちりぬるを わかよたれそ つねならむ うゐのおくやま けふこえて あさきゆめみし ゑひもせす ')
+ - name: COLUMN_1
type: string
- - name: upper(' いろはにほへと ちりぬるを わかよたれそ つねならむ うゐのおくやま けふこえて あさきゆめみし ゑひもせす ')
+ - name: COLUMN_2
type: string
rows:
- [' いろはにほへと ちりぬるを わかよたれそ つねならむ うゐのおくやま けふこえて あさきゆめみし ゑひもせす ', ' いろはにほへと
@@ -260,9 +246,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: 'lower('' Pijamalı hasta yağız şoföre çabucak güvendi. EXTRA: İ '')'
+ - name: COLUMN_1
type: string
- - name: 'upper('' Pijamalı hasta yağız şoföre çabucak güvendi. EXTRA: İ '')'
+ - name: COLUMN_2
type: string
rows:
- [' pijamalı hasta yağız şoföre çabucak güvendi. extra: i̇ ', ' PIJAMALI
diff --git a/test/sql/integer-overflow.result b/test/sql/integer-overflow.result
index 6269cb547..a56fb2412 100644
--- a/test/sql/integer-overflow.result
+++ b/test/sql/integer-overflow.result
@@ -19,7 +19,7 @@ box.execute('SELECT (2147483647 * 2147483647 * 2147483647);')
box.execute('SELECT (-9223372036854775808 / -1);')
---
- metadata:
- - name: (-9223372036854775808 / -1)
+ - name: COLUMN_1
type: integer
rows:
- [9223372036854775808]
@@ -32,7 +32,7 @@ box.execute('SELECT (-9223372036854775808 - 1);')
box.execute('SELECT (9223372036854775807 + 1);')
---
- metadata:
- - name: (9223372036854775807 + 1)
+ - name: COLUMN_1
type: integer
rows:
- [9223372036854775808]
@@ -50,7 +50,7 @@ box.execute('SELECT 18446744073709551615 * 2;')
box.execute('SELECT (-9223372036854775807 * (-2));')
---
- metadata:
- - name: (-9223372036854775807 * (-2))
+ - name: COLUMN_1
type: integer
rows:
- [18446744073709551614]
@@ -60,7 +60,7 @@ box.execute('SELECT (-9223372036854775807 * (-2));')
box.execute('SELECT 9223372036854775808;')
---
- metadata:
- - name: '9223372036854775808'
+ - name: COLUMN_1
type: integer
rows:
- [9223372036854775808]
@@ -74,7 +74,7 @@ box.execute('SELECT -9223372036854775809;')
box.execute('SELECT 9223372036854775808 - 1;')
---
- metadata:
- - name: 9223372036854775808 - 1
+ - name: COLUMN_1
type: integer
rows:
- [9223372036854775807]
@@ -82,7 +82,7 @@ box.execute('SELECT 9223372036854775808 - 1;')
box.execute('SELECT 18446744073709551615;')
---
- metadata:
- - name: '18446744073709551615'
+ - name: COLUMN_1
type: integer
rows:
- [18446744073709551615]
@@ -98,7 +98,7 @@ box.execute('SELECT 18446744073709551616;')
box.execute('SELECT CAST(\'9223372036854775808\' AS INTEGER);')
---
- metadata:
- - name: CAST('9223372036854775808' AS INTEGER)
+ - name: COLUMN_1
type: integer
rows:
- [9223372036854775808]
diff --git a/test/sql/iproto.result b/test/sql/iproto.result
index 44ba499a0..ee1047fc1 100644
--- a/test/sql/iproto.result
+++ b/test/sql/iproto.result
@@ -372,11 +372,11 @@ parameters[3] = 33
cn:execute('select $2, $1, $3', parameters)
---
- metadata:
- - name: $2
+ - name: COLUMN_1
type: integer
- - name: $1
+ - name: COLUMN_2
type: integer
- - name: $3
+ - name: COLUMN_3
type: integer
rows:
- [22, 11, 33]
@@ -736,7 +736,7 @@ res.metadata
cn:execute("SELECT zeroblob(1);")
---
- metadata:
- - name: zeroblob(1)
+ - name: COLUMN_1
type: varbinary
rows:
- ["\0"]
@@ -749,7 +749,7 @@ res = cn:execute("SELECT randomblob(1);")
...
res.metadata
---
-- - name: randomblob(1)
+- - name: COLUMN_1
type: varbinary
...
-- Type set during compilation stage, and since min/max are accept
@@ -759,7 +759,7 @@ res.metadata
cn:execute("SELECT LEAST(1, 2, 3);")
---
- metadata:
- - name: LEAST(1, 2, 3)
+ - name: COLUMN_1
type: scalar
rows:
- [1]
@@ -767,7 +767,7 @@ cn:execute("SELECT LEAST(1, 2, 3);")
cn:execute("SELECT GREATEST(1, 2, 3);")
---
- metadata:
- - name: GREATEST(1, 2, 3)
+ - name: COLUMN_1
type: scalar
rows:
- [3]
@@ -803,7 +803,7 @@ s = box.prepare([[ SELECT ?; ]])
s:execute({42})
---
- metadata:
- - name: '?'
+ - name: COLUMN_1
type: integer
rows:
- [42]
@@ -811,7 +811,7 @@ s:execute({42})
box.execute('SELECT 1;')
---
- metadata:
- - name: '1'
+ - name: COLUMN_1
type: integer
rows:
- [1]
diff --git a/test/sql/max-on-index.result b/test/sql/max-on-index.result
index 1cd488f85..a90f30993 100644
--- a/test/sql/max-on-index.result
+++ b/test/sql/max-on-index.result
@@ -48,7 +48,7 @@ box.execute("INSERT INTO test2 VALUES(1, 2)");
box.execute("SELECT MAX(f1) FROM test1")
---
- metadata:
- - name: MAX(f1)
+ - name: COLUMN_1
type: scalar
rows:
- [4]
@@ -56,7 +56,7 @@ box.execute("SELECT MAX(f1) FROM test1")
box.execute("SELECT MAX(f2) FROM test1")
---
- metadata:
- - name: MAX(f2)
+ - name: COLUMN_1
type: scalar
rows:
- [3]
@@ -64,7 +64,7 @@ box.execute("SELECT MAX(f2) FROM test1")
box.execute("SELECT MAX(f1) FROM test2")
---
- metadata:
- - name: MAX(f1)
+ - name: COLUMN_1
type: scalar
rows:
- [1]
diff --git a/test/sql/misc.result b/test/sql/misc.result
index 0190a5897..1640da300 100644
--- a/test/sql/misc.result
+++ b/test/sql/misc.result
@@ -1,142 +1,148 @@
+-- test-run result file version 2
test_run = require('test_run').new()
----
-...
+ | ---
+ | ...
engine = test_run:get_cfg('engine')
----
-...
+ | ---
+ | ...
_ = box.space._session_settings:update('sql_default_engine', {{'=', 2, engine}})
----
-...
+ | ---
+ | ...
+
-- Forbid multistatement queries.
box.execute('select 1;')
----
-- metadata:
- - name: '1'
- type: integer
- rows:
- - [1]
-...
+ | ---
+ | - metadata:
+ | - name: COLUMN_1
+ | type: integer
+ | rows:
+ | - [1]
+ | ...
box.execute('select 1; select 2;')
----
-- null
-- 'At line 1 at or near position 11: keyword ''select'' is reserved. Please use double
- quotes if ''select'' is an identifier.'
-...
+ | ---
+ | - null
+ | - 'At line 1 at or near position 11: keyword ''select'' is reserved. Please use double
+ | quotes if ''select'' is an identifier.'
+ | ...
box.execute('create table t1 (id INT primary key); select 100;')
----
-- null
-- 'At line 1 at or near position 39: keyword ''select'' is reserved. Please use double
- quotes if ''select'' is an identifier.'
-...
+ | ---
+ | - null
+ | - 'At line 1 at or near position 39: keyword ''select'' is reserved. Please use double
+ | quotes if ''select'' is an identifier.'
+ | ...
box.space.t1 == nil
----
-- true
-...
+ | ---
+ | - true
+ | ...
box.execute(';')
----
-- null
-- Failed to execute an empty SQL statement
-...
+ | ---
+ | - null
+ | - Failed to execute an empty SQL statement
+ | ...
box.execute('')
----
-- null
-- Failed to execute an empty SQL statement
-...
+ | ---
+ | - null
+ | - Failed to execute an empty SQL statement
+ | ...
box.execute(' ;')
----
-- null
-- Failed to execute an empty SQL statement
-...
+ | ---
+ | - null
+ | - Failed to execute an empty SQL statement
+ | ...
box.execute('\n\n\n\t\t\t ')
----
-- null
-- Failed to execute an empty SQL statement
-...
+ | ---
+ | - null
+ | - Failed to execute an empty SQL statement
+ | ...
+
-- gh-3820: only table constraints can have a name.
--
box.execute('CREATE TABLE test (id INTEGER PRIMARY KEY, b INTEGER CONSTRAINT c1 NULL)')
----
-- null
-- 'At line 1 at or near position 68: keyword ''NULL'' is reserved. Please use double
- quotes if ''NULL'' is an identifier.'
-...
+ | ---
+ | - null
+ | - 'At line 1 at or near position 68: keyword ''NULL'' is reserved. Please use double
+ | quotes if ''NULL'' is an identifier.'
+ | ...
box.execute('CREATE TABLE test (id INTEGER PRIMARY KEY, b INTEGER CONSTRAINT c1 DEFAULT 300)')
----
-- null
-- 'At line 1 at or near position 68: keyword ''DEFAULT'' is reserved. Please use double
- quotes if ''DEFAULT'' is an identifier.'
-...
+ | ---
+ | - null
+ | - 'At line 1 at or near position 68: keyword ''DEFAULT'' is reserved. Please use double
+ | quotes if ''DEFAULT'' is an identifier.'
+ | ...
box.execute('CREATE TABLE test (id INTEGER PRIMARY KEY, b TEXT CONSTRAINT c1 COLLATE "binary")')
----
-- null
-- 'At line 1 at or near position 65: keyword ''COLLATE'' is reserved. Please use double
- quotes if ''COLLATE'' is an identifier.'
-...
+ | ---
+ | - null
+ | - 'At line 1 at or near position 65: keyword ''COLLATE'' is reserved. Please use double
+ | quotes if ''COLLATE'' is an identifier.'
+ | ...
+
-- Make sure that type of literals in meta complies with its real
-- type. For instance, typeof(0.5) is number, not integer.
--
box.execute('SELECT 1;')
----
-- metadata:
- - name: '1'
- type: integer
- rows:
- - [1]
-...
+ | ---
+ | - metadata:
+ | - name: COLUMN_1
+ | type: integer
+ | rows:
+ | - [1]
+ | ...
box.execute('SELECT 1.5;')
----
-- metadata:
- - name: '1.5'
- type: double
- rows:
- - [1.5]
-...
+ | ---
+ | - metadata:
+ | - name: COLUMN_1
+ | type: double
+ | rows:
+ | - [1.5]
+ | ...
box.execute('SELECT 1.0;')
----
-- metadata:
- - name: '1.0'
- type: double
- rows:
- - [1]
-...
+ | ---
+ | - metadata:
+ | - name: COLUMN_1
+ | type: double
+ | rows:
+ | - [1]
+ | ...
box.execute('SELECT \'abc\';')
----
-- metadata:
- - name: '''abc'''
- type: string
- rows:
- - ['abc']
-...
+ | ---
+ | - metadata:
+ | - name: COLUMN_1
+ | type: string
+ | rows:
+ | - ['abc']
+ | ...
box.execute('SELECT X\'4D6564766564\'')
----
-- metadata:
- - name: X'4D6564766564'
- type: varbinary
- rows:
- - ['Medved']
-...
+ | ---
+ | - metadata:
+ | - name: COLUMN_1
+ | type: varbinary
+ | rows:
+ | - ['Medved']
+ | ...
+
--
-- gh-4139: assertion when reading a temporary space.
--
format = {{name = 'id', type = 'integer'}}
----
-...
+ | ---
+ | ...
s = box.schema.space.create('s',{format=format, temporary=true})
----
-...
+ | ---
+ | ...
i = s:create_index('i')
----
-...
+ | ---
+ | ...
box.execute('select * from "s"')
----
-- metadata:
- - name: id
- type: integer
- rows: []
-...
+ | ---
+ | - metadata:
+ | - name: id
+ | type: integer
+ | rows: []
+ | ...
s:drop()
----
-...
+ | ---
+ | ...
+
--
-- gh-4267: Full power of vdbe_field_ref
-- Tarantool's SQL internally stores data offset for all acceded
@@ -151,56 +157,57 @@ s:drop()
-- beginning.
---
format = {}
----
-...
+ | ---
+ | ...
t = {}
----
-...
+ | ---
+ | ...
for i = 1, 70 do \
format[i] = {name = 'FIELD'..i, type = 'unsigned'} \
t[i] = i \
end
----
-...
+ | ---
+ | ...
s = box.schema.create_space('TEST', {format = format})
----
-...
+ | ---
+ | ...
pk = s:create_index('pk', {parts = {70}})
----
-...
+ | ---
+ | ...
s:insert(t)
----
-- [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
- 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
- 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
- 63, 64, 65, 66, 67, 68, 69, 70]
-...
+ | ---
+ | - [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+ | 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
+ | 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
+ | 63, 64, 65, 66, 67, 68, 69, 70]
+ | ...
box.execute('SELECT field70, field64 FROM test')
----
-- metadata:
- - name: FIELD70
- type: unsigned
- - name: FIELD64
- type: unsigned
- rows:
- - [70, 64]
-...
+ | ---
+ | - metadata:
+ | - name: FIELD70
+ | type: unsigned
+ | - name: FIELD64
+ | type: unsigned
+ | rows:
+ | - [70, 64]
+ | ...
+
-- In the case below described optimization works fine.
pk:alter({parts = {66}})
----
-...
+ | ---
+ | ...
box.execute('SELECT field66, field68, field70 FROM test')
----
-- metadata:
- - name: FIELD66
- type: unsigned
- - name: FIELD68
- type: unsigned
- - name: FIELD70
- type: unsigned
- rows:
- - [66, 68, 70]
-...
+ | ---
+ | - metadata:
+ | - name: FIELD66
+ | type: unsigned
+ | - name: FIELD68
+ | type: unsigned
+ | - name: FIELD70
+ | type: unsigned
+ | rows:
+ | - [66, 68, 70]
+ | ...
box.space.TEST:drop()
----
-...
+ | ---
+ | ...
diff --git a/test/sql/persistency.result b/test/sql/persistency.result
index 6d14d4c4e..210ab4107 100644
--- a/test/sql/persistency.result
+++ b/test/sql/persistency.result
@@ -1,475 +1,495 @@
+-- test-run result file version 2
env = require('test_run')
----
-...
+ | ---
+ | ...
test_run = env.new()
----
-...
+ | ---
+ | ...
engine = test_run:get_cfg('engine')
----
-...
+ | ---
+ | ...
_ = box.space._session_settings:update('sql_default_engine', {{'=', 2, engine}})
----
-...
+ | ---
+ | ...
+
-- create space
box.execute("CREATE TABLE foobar (foo INT PRIMARY KEY, bar TEXT)")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
+
-- prepare data
box.execute("INSERT INTO foobar VALUES (1, 'foo')")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
box.execute("INSERT INTO foobar VALUES (2, 'bar')")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
box.execute("INSERT INTO foobar VALUES (1000, 'foobar')")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
+
box.execute("INSERT INTO foobar VALUES (1, 'duplicate')")
----
-- null
-- Duplicate key exists in unique index 'pk_unnamed_FOOBAR_1' in space 'FOOBAR'
-...
+ | ---
+ | - null
+ | - Duplicate key exists in unique index 'pk_unnamed_FOOBAR_1' in space 'FOOBAR'
+ | ...
+
-- simple select
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['foo', 1, 42, 'awesome']
- - ['bar', 2, 42, 'awesome']
- - ['foobar', 1000, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: COLUMN_1
+ | type: integer
+ | - name: COLUMN_2
+ | type: string
+ | rows:
+ | - ['foo', 1, 42, 'awesome']
+ | - ['bar', 2, 42, 'awesome']
+ | - ['foobar', 1000, 42, 'awesome']
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar LIMIT 2")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['foo', 1, 42, 'awesome']
- - ['bar', 2, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: COLUMN_1
+ | type: integer
+ | - name: COLUMN_2
+ | type: string
+ | rows:
+ | - ['foo', 1, 42, 'awesome']
+ | - ['bar', 2, 42, 'awesome']
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo=2")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['bar', 2, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: COLUMN_1
+ | type: integer
+ | - name: COLUMN_2
+ | type: string
+ | rows:
+ | - ['bar', 2, 42, 'awesome']
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo>2")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['foobar', 1000, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: COLUMN_1
+ | type: integer
+ | - name: COLUMN_2
+ | type: string
+ | rows:
+ | - ['foobar', 1000, 42, 'awesome']
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo>=2")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['bar', 2, 42, 'awesome']
- - ['foobar', 1000, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: COLUMN_1
+ | type: integer
+ | - name: COLUMN_2
+ | type: string
+ | rows:
+ | - ['bar', 2, 42, 'awesome']
+ | - ['foobar', 1000, 42, 'awesome']
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo=10000")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows: []
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: COLUMN_1
+ | type: integer
+ | - name: COLUMN_2
+ | type: string
+ | rows: []
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo>10000")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows: []
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: COLUMN_1
+ | type: integer
+ | - name: COLUMN_2
+ | type: string
+ | rows: []
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<2")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['foo', 1, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: COLUMN_1
+ | type: integer
+ | - name: COLUMN_2
+ | type: string
+ | rows:
+ | - ['foo', 1, 42, 'awesome']
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<2.001")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['foo', 1, 42, 'awesome']
- - ['bar', 2, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: COLUMN_1
+ | type: integer
+ | - name: COLUMN_2
+ | type: string
+ | rows:
+ | - ['foo', 1, 42, 'awesome']
+ | - ['bar', 2, 42, 'awesome']
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<=2")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['foo', 1, 42, 'awesome']
- - ['bar', 2, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: COLUMN_1
+ | type: integer
+ | - name: COLUMN_2
+ | type: string
+ | rows:
+ | - ['foo', 1, 42, 'awesome']
+ | - ['bar', 2, 42, 'awesome']
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<100")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['foo', 1, 42, 'awesome']
- - ['bar', 2, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: COLUMN_1
+ | type: integer
+ | - name: COLUMN_2
+ | type: string
+ | rows:
+ | - ['foo', 1, 42, 'awesome']
+ | - ['bar', 2, 42, 'awesome']
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE bar='foo'")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['foo', 1, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: COLUMN_1
+ | type: integer
+ | - name: COLUMN_2
+ | type: string
+ | rows:
+ | - ['foo', 1, 42, 'awesome']
+ | ...
box.execute("SELECT count(*) FROM foobar")
----
-- metadata:
- - name: count(*)
- type: integer
- rows:
- - [3]
-...
+ | ---
+ | - metadata:
+ | - name: COLUMN_1
+ | type: integer
+ | rows:
+ | - [3]
+ | ...
box.execute("SELECT count(*) FROM foobar WHERE bar='foo'")
----
-- metadata:
- - name: count(*)
- type: integer
- rows:
- - [1]
-...
+ | ---
+ | - metadata:
+ | - name: COLUMN_1
+ | type: integer
+ | rows:
+ | - [1]
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar ORDER BY bar")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['bar', 2, 42, 'awesome']
- - ['foo', 1, 42, 'awesome']
- - ['foobar', 1000, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: COLUMN_1
+ | type: integer
+ | - name: COLUMN_2
+ | type: string
+ | rows:
+ | - ['bar', 2, 42, 'awesome']
+ | - ['foo', 1, 42, 'awesome']
+ | - ['foobar', 1000, 42, 'awesome']
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar ORDER BY bar DESC")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['foobar', 1000, 42, 'awesome']
- - ['foo', 1, 42, 'awesome']
- - ['bar', 2, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: COLUMN_1
+ | type: integer
+ | - name: COLUMN_2
+ | type: string
+ | rows:
+ | - ['foobar', 1000, 42, 'awesome']
+ | - ['foo', 1, 42, 'awesome']
+ | - ['bar', 2, 42, 'awesome']
+ | ...
+
-- updates
box.execute("REPLACE INTO foobar VALUES (1, 'cacodaemon')")
----
-- row_count: 2
-...
+ | ---
+ | - row_count: 2
+ | ...
box.execute("SELECT COUNT(*) FROM foobar WHERE foo=1")
----
-- metadata:
- - name: COUNT(*)
- type: integer
- rows:
- - [1]
-...
+ | ---
+ | - metadata:
+ | - name: COLUMN_1
+ | type: integer
+ | rows:
+ | - [1]
+ | ...
box.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'")
----
-- metadata:
- - name: COUNT(*)
- type: integer
- rows:
- - [1]
-...
+ | ---
+ | - metadata:
+ | - name: COLUMN_1
+ | type: integer
+ | rows:
+ | - [1]
+ | ...
box.execute("DELETE FROM foobar WHERE bar='cacodaemon'")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
box.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'")
----
-- metadata:
- - name: COUNT(*)
- type: integer
- rows:
- - [0]
-...
+ | ---
+ | - metadata:
+ | - name: COLUMN_1
+ | type: integer
+ | rows:
+ | - [0]
+ | ...
+
-- multi-index
+
-- create space
box.execute("CREATE TABLE barfoo (bar TEXT, foo NUMBER PRIMARY KEY)")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
box.execute("CREATE UNIQUE INDEX barfoo2 ON barfoo(bar)")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
+
-- prepare data
box.execute("INSERT INTO barfoo VALUES ('foo', 1)")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
box.execute("INSERT INTO barfoo VALUES ('bar', 2)")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
box.execute("INSERT INTO barfoo VALUES ('foobar', 1000)")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
+
-- create a trigger
box.execute("CREATE TRIGGER tfoobar AFTER INSERT ON foobar FOR EACH ROW BEGIN INSERT INTO barfoo VALUES ('trigger test', 9999); END")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
box.execute("SELECT \"name\", \"opts\" FROM \"_trigger\"");
----
-- metadata:
- - name: name
- type: string
- - name: opts
- type: map
- rows:
- - ['TFOOBAR', {'sql': 'CREATE TRIGGER tfoobar AFTER INSERT ON foobar FOR EACH ROW
- BEGIN INSERT INTO barfoo VALUES (''trigger test'', 9999); END'}]
-...
+ | ---
+ | - metadata:
+ | - name: name
+ | type: string
+ | - name: opts
+ | type: map
+ | rows:
+ | - ['TFOOBAR', {'sql': 'CREATE TRIGGER tfoobar AFTER INSERT ON foobar FOR EACH ROW
+ | BEGIN INSERT INTO barfoo VALUES (''trigger test'', 9999); END'}]
+ | ...
+
-- Many entries
box.execute("CREATE TABLE t1(a INT,b INT,c INT,PRIMARY KEY(b,c));")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
box.execute("WITH RECURSIVE cnt(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM cnt WHERE x<1000) INSERT INTO t1 SELECT x, x%40, x/40 FROM cnt;")
----
-- row_count: 1000
-...
+ | ---
+ | - row_count: 1000
+ | ...
box.execute("SELECT a FROM t1 ORDER BY b, a LIMIT 10 OFFSET 20;");
----
-- metadata:
- - name: A
- type: integer
- rows:
- - [840]
- - [880]
- - [920]
- - [960]
- - [1000]
- - [1]
- - [41]
- - [81]
- - [121]
- - [161]
-...
+ | ---
+ | - metadata:
+ | - name: A
+ | type: integer
+ | rows:
+ | - [840]
+ | - [880]
+ | - [920]
+ | - [960]
+ | - [1000]
+ | - [1]
+ | - [41]
+ | - [81]
+ | - [121]
+ | - [161]
+ | ...
+
test_run:cmd('restart server default');
+ |
+
-- prove that trigger survived
box.execute("SELECT \"name\", \"opts\" FROM \"_trigger\"");
----
-- metadata:
- - name: name
- type: string
- - name: opts
- type: map
- rows:
- - ['TFOOBAR', {'sql': 'CREATE TRIGGER tfoobar AFTER INSERT ON foobar FOR EACH ROW
- BEGIN INSERT INTO barfoo VALUES (''trigger test'', 9999); END'}]
-...
+ | ---
+ | - metadata:
+ | - name: name
+ | type: string
+ | - name: opts
+ | type: map
+ | rows:
+ | - ['TFOOBAR', {'sql': 'CREATE TRIGGER tfoobar AFTER INSERT ON foobar FOR EACH ROW
+ | BEGIN INSERT INTO barfoo VALUES (''trigger test'', 9999); END'}]
+ | ...
+
-- ... functional
box.execute("INSERT INTO foobar VALUES ('foobar trigger test', 8888)")
----
-- null
-- 'Type mismatch: can not convert foobar trigger test to integer'
-...
+ | ---
+ | - null
+ | - 'Type mismatch: can not convert foobar trigger test to integer'
+ | ...
box.execute("SELECT * FROM barfoo WHERE foo = 9999");
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: number
- rows: []
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: number
+ | rows: []
+ | ...
+
-- and still persistent
box.execute("SELECT \"name\", \"opts\" FROM \"_trigger\"")
----
-- metadata:
- - name: name
- type: string
- - name: opts
- type: map
- rows:
- - ['TFOOBAR', {'sql': 'CREATE TRIGGER tfoobar AFTER INSERT ON foobar FOR EACH ROW
- BEGIN INSERT INTO barfoo VALUES (''trigger test'', 9999); END'}]
-...
+ | ---
+ | - metadata:
+ | - name: name
+ | type: string
+ | - name: opts
+ | type: map
+ | rows:
+ | - ['TFOOBAR', {'sql': 'CREATE TRIGGER tfoobar AFTER INSERT ON foobar FOR EACH ROW
+ | BEGIN INSERT INTO barfoo VALUES (''trigger test'', 9999); END'}]
+ | ...
+
-- and can be dropped just once
box.execute("DROP TRIGGER tfoobar")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
-- Should error
box.execute("DROP TRIGGER tfoobar")
----
-- null
-- Trigger 'TFOOBAR' doesn't exist
-...
+ | ---
+ | - null
+ | - Trigger 'TFOOBAR' doesn't exist
+ | ...
-- Should be empty
box.execute("SELECT \"name\", \"opts\" FROM \"_trigger\"")
----
-- metadata:
- - name: name
- type: string
- - name: opts
- type: map
- rows: []
-...
+ | ---
+ | - metadata:
+ | - name: name
+ | type: string
+ | - name: opts
+ | type: map
+ | rows: []
+ | ...
+
-- prove barfoo2 still exists
box.execute("INSERT INTO barfoo VALUES ('xfoo', 1)")
----
-- null
-- Duplicate key exists in unique index 'pk_unnamed_BARFOO_1' in space 'BARFOO'
-...
+ | ---
+ | - null
+ | - Duplicate key exists in unique index 'pk_unnamed_BARFOO_1' in space 'BARFOO'
+ | ...
+
box.execute("SELECT * FROM barfoo")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: number
- rows:
- - ['foo', 1]
- - ['bar', 2]
- - ['foobar', 1000]
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: number
+ | rows:
+ | - ['foo', 1]
+ | - ['bar', 2]
+ | - ['foobar', 1000]
+ | ...
box.execute("SELECT * FROM foobar");
----
-- metadata:
- - name: FOO
- type: integer
- - name: BAR
- type: string
- rows:
- - [2, 'bar']
- - [1000, 'foobar']
-...
+ | ---
+ | - metadata:
+ | - name: FOO
+ | type: integer
+ | - name: BAR
+ | type: string
+ | rows:
+ | - [2, 'bar']
+ | - [1000, 'foobar']
+ | ...
box.execute("SELECT a FROM t1 ORDER BY b, a LIMIT 10 OFFSET 20;");
----
-- metadata:
- - name: A
- type: integer
- rows:
- - [840]
- - [880]
- - [920]
- - [960]
- - [1000]
- - [1]
- - [41]
- - [81]
- - [121]
- - [161]
-...
+ | ---
+ | - metadata:
+ | - name: A
+ | type: integer
+ | rows:
+ | - [840]
+ | - [880]
+ | - [920]
+ | - [960]
+ | - [1000]
+ | - [1]
+ | - [41]
+ | - [81]
+ | - [121]
+ | - [161]
+ | ...
+
-- cleanup
box.execute("DROP TABLE foobar")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
box.execute("DROP TABLE barfoo")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
box.execute("DROP TABLE t1")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
diff --git a/test/sql/prepared.result b/test/sql/prepared.result
index 5a16ea3b1..c3f5142fc 100644
--- a/test/sql/prepared.result
+++ b/test/sql/prepared.result
@@ -425,13 +425,13 @@ s = prepare("SELECT count(*), count(a - 3), max(b), abs(id) FROM test WHERE b =
execute(s.stmt_id)
| ---
| - metadata:
- | - name: count(*)
+ | - name: COLUMN_1
| type: integer
- | - name: count(a - 3)
+ | - name: COLUMN_2
| type: integer
- | - name: max(b)
+ | - name: COLUMN_3
| type: scalar
- | - name: abs(id)
+ | - name: COLUMN_4
| type: number
| rows:
| - [1, 1, '3', 1]
@@ -439,13 +439,13 @@ execute(s.stmt_id)
execute(s.stmt_id)
| ---
| - metadata:
- | - name: count(*)
+ | - name: COLUMN_1
| type: integer
- | - name: count(a - 3)
+ | - name: COLUMN_2
| type: integer
- | - name: max(b)
+ | - name: COLUMN_3
| type: scalar
- | - name: abs(id)
+ | - name: COLUMN_4
| type: number
| rows:
| - [1, 1, '3', 1]
@@ -480,7 +480,7 @@ res = execute(s.stmt_id)
| ...
res.metadata
| ---
- | - - name: group_concat(TRIM(TRAILING FROM t),x'0a')
+ | - - name: COLUMN_1
| type: string
| ...
unprepare(s.stmt_id)
diff --git a/test/sql/row-count.result b/test/sql/row-count.result
index 02acd79b5..7591d1630 100644
--- a/test/sql/row-count.result
+++ b/test/sql/row-count.result
@@ -16,7 +16,7 @@ box.execute("CREATE TABLE t1 (s1 VARCHAR(10) PRIMARY KEY);")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: COLUMN_1
type: integer
rows:
- [1]
@@ -24,7 +24,7 @@ box.execute("SELECT ROW_COUNT();")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: COLUMN_1
type: integer
rows:
- [0]
@@ -36,7 +36,7 @@ box.execute("CREATE TABLE t2 (s1 VARCHAR(10) PRIMARY KEY, s2 VARCHAR(10) REFEREN
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: COLUMN_1
type: integer
rows:
- [1]
@@ -52,7 +52,7 @@ box.execute("INSERT INTO t3 VALUES (0, 0, 0);")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: COLUMN_1
type: integer
rows:
- [1]
@@ -64,7 +64,7 @@ box.execute("CREATE TRIGGER x AFTER DELETE ON t1 FOR EACH ROW BEGIN UPDATE t3 SE
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: COLUMN_1
type: integer
rows:
- [1]
@@ -76,7 +76,7 @@ box.execute("INSERT INTO t1 VALUES ('a');")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: COLUMN_1
type: integer
rows:
- [1]
@@ -88,7 +88,7 @@ box.execute("INSERT INTO t2 VALUES ('a','a');")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: COLUMN_1
type: integer
rows:
- [1]
@@ -100,7 +100,7 @@ box.execute("INSERT INTO t1 VALUES ('b'), ('c'), ('d');")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: COLUMN_1
type: integer
rows:
- [3]
@@ -113,7 +113,7 @@ box.execute("REPLACE INTO t2 VALUES('a', 'c');")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: COLUMN_1
type: integer
rows:
- [2]
@@ -125,7 +125,7 @@ box.execute("DELETE FROM t1;")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: COLUMN_1
type: integer
rows:
- [4]
@@ -141,7 +141,7 @@ box.execute("TRUNCATE TABLE t3;")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: COLUMN_1
type: integer
rows:
- [0]
@@ -157,7 +157,7 @@ box.execute("UPDATE t3 SET i2 = 666;")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: COLUMN_1
type: integer
rows:
- [3]
@@ -172,7 +172,7 @@ box.execute("DELETE FROM t3 WHERE 0 = 0;")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: COLUMN_1
type: integer
rows:
- [3]
@@ -188,7 +188,7 @@ box.execute("DELETE FROM t3")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: COLUMN_1
type: integer
rows:
- [3]
@@ -222,7 +222,7 @@ box.execute("DELETE FROM tt1 WHERE id = 2;")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: COLUMN_1
type: integer
rows:
- [1]
@@ -252,7 +252,7 @@ box.execute("START TRANSACTION;")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: COLUMN_1
type: integer
rows:
- [0]
@@ -264,7 +264,7 @@ box.execute("COMMIT;")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: COLUMN_1
type: integer
rows:
- [0]
@@ -277,7 +277,7 @@ box.execute("COMMIT;")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: COLUMN_1
type: integer
rows:
- [0]
@@ -286,7 +286,7 @@ box.execute("SELECT ROW_COUNT();")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: COLUMN_1
type: integer
rows:
- [0]
@@ -308,7 +308,7 @@ box.execute("EXPLAIN QUERY PLAN INSERT INTO t1 VALUES ('b'), ('c'), ('d');")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: COLUMN_1
type: integer
rows:
- [0]
diff --git a/test/sql/transition.result b/test/sql/transition.result
index c14055b4e..8680e3cec 100644
--- a/test/sql/transition.result
+++ b/test/sql/transition.result
@@ -38,9 +38,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows:
- ['foo', 1, 42, 'awesome']
@@ -54,9 +54,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar LIMIT 2")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows:
- ['foo', 1, 42, 'awesome']
@@ -69,9 +69,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo=2")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows:
- ['bar', 2, 42, 'awesome']
@@ -83,9 +83,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo>2")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows:
- ['foobar', 1000, 42, 'awesome']
@@ -97,9 +97,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo>=2")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows:
- ['bar', 2, 42, 'awesome']
@@ -112,9 +112,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo=10000")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows: []
...
@@ -125,9 +125,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo>10000")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows: []
...
@@ -138,9 +138,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<2")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows:
- ['foo', 1, 42, 'awesome']
@@ -152,9 +152,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<2.001")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows:
- ['foo', 1, 42, 'awesome']
@@ -167,9 +167,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<=2")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows:
- ['foo', 1, 42, 'awesome']
@@ -182,9 +182,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<100")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows:
- ['foo', 1, 42, 'awesome']
@@ -197,9 +197,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE bar='foo'")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows:
- ['foo', 1, 42, 'awesome']
@@ -207,7 +207,7 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE bar='foo'")
box.execute("SELECT count(*) FROM foobar")
---
- metadata:
- - name: count(*)
+ - name: COLUMN_1
type: integer
rows:
- [3]
@@ -215,7 +215,7 @@ box.execute("SELECT count(*) FROM foobar")
box.execute("SELECT count(*) FROM foobar WHERE bar='foo'")
---
- metadata:
- - name: count(*)
+ - name: COLUMN_1
type: integer
rows:
- [1]
@@ -227,9 +227,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar ORDER BY bar")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows:
- ['bar', 2, 42, 'awesome']
@@ -243,9 +243,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar ORDER BY bar DESC")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows:
- ['foobar', 1000, 42, 'awesome']
@@ -260,7 +260,7 @@ box.execute("REPLACE INTO foobar VALUES (1, 'cacodaemon')")
box.execute("SELECT COUNT(*) FROM foobar WHERE foo=1")
---
- metadata:
- - name: COUNT(*)
+ - name: COLUMN_1
type: integer
rows:
- [1]
@@ -268,7 +268,7 @@ box.execute("SELECT COUNT(*) FROM foobar WHERE foo=1")
box.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'")
---
- metadata:
- - name: COUNT(*)
+ - name: COLUMN_1
type: integer
rows:
- [1]
@@ -280,7 +280,7 @@ box.execute("DELETE FROM foobar WHERE bar='cacodaemon'")
box.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'")
---
- metadata:
- - name: COUNT(*)
+ - name: COLUMN_1
type: integer
rows:
- [0]
diff --git a/test/sql/types.result b/test/sql/types.result
index 38e4385ad..3aceb1d7a 100644
--- a/test/sql/types.result
+++ b/test/sql/types.result
@@ -54,8 +54,8 @@ box.execute("CREATE VIEW v1 AS SELECT b + a, b - a FROM t1;")
...
box.space.V1:format()
---
-- [{'type': 'number', 'nullable_action': 'none', 'name': 'b + a', 'is_nullable': true},
- {'type': 'number', 'nullable_action': 'none', 'name': 'b - a', 'is_nullable': true}]
+- [{'type': 'number', 'nullable_action': 'none', 'name': 'COLUMN_1', 'is_nullable': true},
+ {'type': 'number', 'nullable_action': 'none', 'name': 'COLUMN_2', 'is_nullable': true}]
...
-- gh-2494: index's part also features correct declared type.
--
@@ -197,7 +197,7 @@ box.execute("SELECT randomblob(5) || 'x';")
box.execute("VALUES (TYPEOF(randomblob(5) || zeroblob(5)));")
---
- metadata:
- - name: column1
+ - name: COLUMN_1
type: string
rows:
- ['varbinary']
@@ -230,7 +230,7 @@ box.execute("SELECT * FROM t1 WHERE 'blob' LIKE x'0000';")
box.execute("SELECT s LIKE NULL FROM t1;")
---
- metadata:
- - name: s LIKE NULL
+ - name: COLUMN_1
type: integer
rows:
- [null]
@@ -256,7 +256,7 @@ box.execute("SELECT * FROM t1 WHERE 'int' LIKE 4;")
box.execute("SELECT NULL LIKE s FROM t1;")
---
- metadata:
- - name: NULL LIKE s
+ - name: COLUMN_1
type: integer
rows:
- [null]
@@ -270,7 +270,7 @@ box.space.T1:drop()
box.execute("SELECT CAST('1.123' AS INTEGER);")
---
- metadata:
- - name: CAST('1.123' AS INTEGER)
+ - name: COLUMN_1
type: integer
rows:
- [1]
@@ -286,7 +286,7 @@ box.execute("INSERT INTO t1 VALUES('0.0'), ('1.5'), ('3.9312453');")
box.execute("SELECT CAST(f AS INTEGER) FROM t1;")
---
- metadata:
- - name: CAST(f AS INTEGER)
+ - name: COLUMN_1
type: integer
rows:
- [0]
@@ -303,7 +303,7 @@ box.space.T1:drop()
box.execute('SELECT 1 + 1;')
---
- metadata:
- - name: 1 + 1
+ - name: COLUMN_1
type: integer
rows:
- [2]
@@ -311,7 +311,7 @@ box.execute('SELECT 1 + 1;')
box.execute('SELECT 1 + 1.1;')
---
- metadata:
- - name: 1 + 1.1
+ - name: COLUMN_1
type: double
rows:
- [2.1]
@@ -319,7 +319,7 @@ box.execute('SELECT 1 + 1.1;')
box.execute('SELECT \'9223372036854\' + 1;')
---
- metadata:
- - name: '''9223372036854'' + 1'
+ - name: COLUMN_1
type: integer
rows:
- [9223372036855]
@@ -328,7 +328,7 @@ box.execute('SELECT \'9223372036854\' + 1;')
box.execute('SELECT ?', {true})
---
- metadata:
- - name: '?'
+ - name: COLUMN_1
type: boolean
rows:
- [true]
@@ -489,7 +489,7 @@ s:drop()
box.execute("SELECT 18446744073709551615 > 18446744073709551614;")
---
- metadata:
- - name: 18446744073709551615 > 18446744073709551614
+ - name: COLUMN_1
type: boolean
rows:
- [true]
@@ -497,7 +497,7 @@ box.execute("SELECT 18446744073709551615 > 18446744073709551614;")
box.execute("SELECT 18446744073709551615 > -9223372036854775808;")
---
- metadata:
- - name: 18446744073709551615 > -9223372036854775808
+ - name: COLUMN_1
type: boolean
rows:
- [true]
@@ -505,7 +505,7 @@ box.execute("SELECT 18446744073709551615 > -9223372036854775808;")
box.execute("SELECT -1 < 18446744073709551615;")
---
- metadata:
- - name: -1 < 18446744073709551615
+ - name: COLUMN_1
type: boolean
rows:
- [true]
@@ -513,7 +513,7 @@ box.execute("SELECT -1 < 18446744073709551615;")
box.execute("SELECT 1.5 < 18446744073709551615")
---
- metadata:
- - name: 1.5 < 18446744073709551615
+ - name: COLUMN_1
type: boolean
rows:
- [true]
@@ -521,7 +521,7 @@ box.execute("SELECT 1.5 < 18446744073709551615")
box.execute("SELECT 1.5 > 18446744073709551615")
---
- metadata:
- - name: 1.5 > 18446744073709551615
+ - name: COLUMN_1
type: boolean
rows:
- [false]
@@ -529,7 +529,7 @@ box.execute("SELECT 1.5 > 18446744073709551615")
box.execute("SELECT 18446744073709551615 > 1.5")
---
- metadata:
- - name: 18446744073709551615 > 1.5
+ - name: COLUMN_1
type: boolean
rows:
- [true]
@@ -537,7 +537,7 @@ box.execute("SELECT 18446744073709551615 > 1.5")
box.execute("SELECT 18446744073709551615 < 1.5")
---
- metadata:
- - name: 18446744073709551615 < 1.5
+ - name: COLUMN_1
type: boolean
rows:
- [false]
@@ -545,7 +545,7 @@ box.execute("SELECT 18446744073709551615 < 1.5")
box.execute("SELECT 18446744073709551615 = 18446744073709551615;")
---
- metadata:
- - name: 18446744073709551615 = 18446744073709551615
+ - name: COLUMN_1
type: boolean
rows:
- [true]
@@ -553,7 +553,7 @@ box.execute("SELECT 18446744073709551615 = 18446744073709551615;")
box.execute("SELECT 18446744073709551615 > -9223372036854775808;")
---
- metadata:
- - name: 18446744073709551615 > -9223372036854775808
+ - name: COLUMN_1
type: boolean
rows:
- [true]
@@ -561,7 +561,7 @@ box.execute("SELECT 18446744073709551615 > -9223372036854775808;")
box.execute("SELECT 18446744073709551615 < -9223372036854775808;")
---
- metadata:
- - name: 18446744073709551615 < -9223372036854775808
+ - name: COLUMN_1
type: boolean
rows:
- [false]
@@ -569,7 +569,7 @@ box.execute("SELECT 18446744073709551615 < -9223372036854775808;")
box.execute("SELECT -1 < 18446744073709551615;")
---
- metadata:
- - name: -1 < 18446744073709551615
+ - name: COLUMN_1
type: boolean
rows:
- [true]
@@ -577,7 +577,7 @@ box.execute("SELECT -1 < 18446744073709551615;")
box.execute("SELECT -1 > 18446744073709551615;")
---
- metadata:
- - name: -1 > 18446744073709551615
+ - name: COLUMN_1
type: boolean
rows:
- [false]
@@ -585,7 +585,7 @@ box.execute("SELECT -1 > 18446744073709551615;")
box.execute("SELECT 18446744073709551610 - 18446744073709551615;")
---
- metadata:
- - name: 18446744073709551610 - 18446744073709551615
+ - name: COLUMN_1
type: integer
rows:
- [-5]
@@ -593,7 +593,7 @@ box.execute("SELECT 18446744073709551610 - 18446744073709551615;")
box.execute("SELECT 18446744073709551615 = null;")
---
- metadata:
- - name: 18446744073709551615 = null
+ - name: COLUMN_1
type: boolean
rows:
- [null]
@@ -601,7 +601,7 @@ box.execute("SELECT 18446744073709551615 = null;")
box.execute("SELECT 18446744073709551615 = 18446744073709551615.0;")
---
- metadata:
- - name: 18446744073709551615 = 18446744073709551615.0
+ - name: COLUMN_1
type: boolean
rows:
- [false]
@@ -609,7 +609,7 @@ box.execute("SELECT 18446744073709551615 = 18446744073709551615.0;")
box.execute("SELECT 18446744073709551615.0 > 18446744073709551615")
---
- metadata:
- - name: 18446744073709551615.0 > 18446744073709551615
+ - name: COLUMN_1
type: boolean
rows:
- [true]
@@ -617,7 +617,7 @@ box.execute("SELECT 18446744073709551615.0 > 18446744073709551615")
box.execute("SELECT 18446744073709551615 IN ('18446744073709551615', 18446744073709551615.0)")
---
- metadata:
- - name: 18446744073709551615 IN ('18446744073709551615', 18446744073709551615.0)
+ - name: COLUMN_1
type: boolean
rows:
- [true]
@@ -625,7 +625,7 @@ box.execute("SELECT 18446744073709551615 IN ('18446744073709551615', 18446744073
box.execute("SELECT 1 LIMIT 18446744073709551615;")
---
- metadata:
- - name: '1'
+ - name: COLUMN_1
type: integer
rows:
- [1]
@@ -633,7 +633,7 @@ box.execute("SELECT 1 LIMIT 18446744073709551615;")
box.execute("SELECT 1 LIMIT 1 OFFSET 18446744073709551614;")
---
- metadata:
- - name: '1'
+ - name: COLUMN_1
type: integer
rows: []
...
@@ -645,7 +645,7 @@ box.execute("SELECT CAST('18446744073' || '709551616' AS INTEGER);")
box.execute("SELECT CAST('18446744073' || '709551615' AS INTEGER);")
---
- metadata:
- - name: CAST('18446744073' || '709551615' AS INTEGER)
+ - name: COLUMN_1
type: integer
rows:
- [18446744073709551615]
@@ -653,7 +653,7 @@ box.execute("SELECT CAST('18446744073' || '709551615' AS INTEGER);")
box.execute("SELECT 18446744073709551610 + 5;")
---
- metadata:
- - name: 18446744073709551610 + 5
+ - name: COLUMN_1
type: integer
rows:
- [18446744073709551615]
@@ -661,7 +661,7 @@ box.execute("SELECT 18446744073709551610 + 5;")
box.execute("SELECT 18446744073709551615 * 1;")
---
- metadata:
- - name: 18446744073709551615 * 1
+ - name: COLUMN_1
type: integer
rows:
- [18446744073709551615]
@@ -669,7 +669,7 @@ box.execute("SELECT 18446744073709551615 * 1;")
box.execute("SELECT 1 / 18446744073709551615;")
---
- metadata:
- - name: 1 / 18446744073709551615
+ - name: COLUMN_1
type: integer
rows:
- [0]
@@ -677,7 +677,7 @@ box.execute("SELECT 1 / 18446744073709551615;")
box.execute("SELECT 18446744073709551615 / 18446744073709551615;")
---
- metadata:
- - name: 18446744073709551615 / 18446744073709551615
+ - name: COLUMN_1
type: integer
rows:
- [1]
@@ -685,7 +685,7 @@ box.execute("SELECT 18446744073709551615 / 18446744073709551615;")
box.execute("SELECT 18446744073709551615 / -9223372036854775808;")
---
- metadata:
- - name: 18446744073709551615 / -9223372036854775808
+ - name: COLUMN_1
type: integer
rows:
- [-1]
@@ -779,7 +779,7 @@ box.execute("INSERT INTO t VALUES (2, -1);")
box.execute("SELECT sum(i) FROM t;")
---
- metadata:
- - name: sum(i)
+ - name: COLUMN_1
type: number
rows:
- [18446744073709551613]
@@ -787,7 +787,7 @@ box.execute("SELECT sum(i) FROM t;")
box.execute("SELECT avg(i) FROM t;")
---
- metadata:
- - name: avg(i)
+ - name: COLUMN_1
type: number
rows:
- [6148914691236516864]
@@ -795,7 +795,7 @@ box.execute("SELECT avg(i) FROM t;")
box.execute("SELECT total(i) FROM t;")
---
- metadata:
- - name: total(i)
+ - name: COLUMN_1
type: number
rows:
- [1.844674407371e+19]
@@ -803,7 +803,7 @@ box.execute("SELECT total(i) FROM t;")
box.execute("SELECT min(i) FROM t;")
---
- metadata:
- - name: min(i)
+ - name: COLUMN_1
type: scalar
rows:
- [-1]
@@ -811,7 +811,7 @@ box.execute("SELECT min(i) FROM t;")
box.execute("SELECT max(i) FROM t;")
---
- metadata:
- - name: max(i)
+ - name: COLUMN_1
type: scalar
rows:
- [18446744073709551613]
@@ -819,7 +819,7 @@ box.execute("SELECT max(i) FROM t;")
box.execute("SELECT count(i) FROM t;")
---
- metadata:
- - name: count(i)
+ - name: COLUMN_1
type: integer
rows:
- [3]
@@ -827,7 +827,7 @@ box.execute("SELECT count(i) FROM t;")
box.execute("SELECT group_concat(i) FROM t;")
---
- metadata:
- - name: group_concat(i)
+ - name: COLUMN_1
type: string
rows:
- ['1,-1,18446744073709551613']
@@ -839,7 +839,7 @@ box.execute("DELETE FROM t WHERE i < 18446744073709551613;")
box.execute("SELECT lower(i) FROM t;")
---
- metadata:
- - name: lower(i)
+ - name: COLUMN_1
type: string
rows:
- ['18446744073709551613']
@@ -847,7 +847,7 @@ box.execute("SELECT lower(i) FROM t;")
box.execute("SELECT upper(i) FROM t;")
---
- metadata:
- - name: upper(i)
+ - name: COLUMN_1
type: string
rows:
- ['18446744073709551613']
@@ -855,7 +855,7 @@ box.execute("SELECT upper(i) FROM t;")
box.execute("SELECT abs(i) FROM t;")
---
- metadata:
- - name: abs(i)
+ - name: COLUMN_1
type: number
rows:
- [18446744073709551613]
@@ -863,7 +863,7 @@ box.execute("SELECT abs(i) FROM t;")
box.execute("SELECT typeof(i) FROM t;")
---
- metadata:
- - name: typeof(i)
+ - name: COLUMN_1
type: string
rows:
- ['integer']
@@ -871,7 +871,7 @@ box.execute("SELECT typeof(i) FROM t;")
box.execute("SELECT quote(i) FROM t;")
---
- metadata:
- - name: quote(i)
+ - name: COLUMN_1
type: string
rows:
- [18446744073709551613]
@@ -879,7 +879,7 @@ box.execute("SELECT quote(i) FROM t;")
box.execute("SELECT LEAST(-1, i) FROM t;")
---
- metadata:
- - name: LEAST(-1, i)
+ - name: COLUMN_1
type: scalar
rows:
- [-1]
@@ -887,7 +887,7 @@ box.execute("SELECT LEAST(-1, i) FROM t;")
box.execute("SELECT quote(i) FROM t;")
---
- metadata:
- - name: quote(i)
+ - name: COLUMN_1
type: string
rows:
- [18446744073709551613]
@@ -1020,7 +1020,7 @@ box.space.T1:drop()
box.execute("SELECT CAST(18446744073709551615 AS NUMBER);")
---
- metadata:
- - name: CAST(18446744073709551615 AS NUMBER)
+ - name: COLUMN_1
type: number
rows:
- [18446744073709551615]
@@ -1028,7 +1028,7 @@ box.execute("SELECT CAST(18446744073709551615 AS NUMBER);")
box.execute("SELECT CAST(18446744073709551615 AS TEXT);")
---
- metadata:
- - name: CAST(18446744073709551615 AS TEXT)
+ - name: COLUMN_1
type: string
rows:
- ['18446744073709551615']
@@ -1036,7 +1036,7 @@ box.execute("SELECT CAST(18446744073709551615 AS TEXT);")
box.execute("SELECT CAST(18446744073709551615 AS SCALAR);")
---
- metadata:
- - name: CAST(18446744073709551615 AS SCALAR)
+ - name: COLUMN_1
type: scalar
rows:
- [18446744073709551615]
@@ -1044,7 +1044,7 @@ box.execute("SELECT CAST(18446744073709551615 AS SCALAR);")
box.execute("SELECT CAST(18446744073709551615 AS BOOLEAN);")
---
- metadata:
- - name: CAST(18446744073709551615 AS BOOLEAN)
+ - name: COLUMN_1
type: boolean
rows:
- [true]
@@ -1052,7 +1052,7 @@ box.execute("SELECT CAST(18446744073709551615 AS BOOLEAN);")
box.execute("SELECT CAST('18446744073709551615' AS INTEGER);")
---
- metadata:
- - name: CAST('18446744073709551615' AS INTEGER)
+ - name: COLUMN_1
type: integer
rows:
- [18446744073709551615]
@@ -1085,7 +1085,7 @@ box.execute("SELECT id FROM t1;")
box.execute("SELECT CAST(123 AS UNSIGNED);")
---
- metadata:
- - name: CAST(123 AS UNSIGNED)
+ - name: COLUMN_1
type: unsigned
rows:
- [123]
@@ -1098,7 +1098,7 @@ box.execute("SELECT CAST(-123 AS UNSIGNED);")
box.execute("SELECT CAST(1.5 AS UNSIGNED);")
---
- metadata:
- - name: CAST(1.5 AS UNSIGNED)
+ - name: COLUMN_1
type: unsigned
rows:
- [1]
@@ -1111,7 +1111,7 @@ box.execute("SELECT CAST(-1.5 AS UNSIGNED);")
box.execute("SELECT CAST(true AS UNSIGNED);")
---
- metadata:
- - name: CAST(true AS UNSIGNED)
+ - name: COLUMN_1
type: unsigned
rows:
- [1]
@@ -1119,7 +1119,7 @@ box.execute("SELECT CAST(true AS UNSIGNED);")
box.execute("SELECT CAST('123' AS UNSIGNED);")
---
- metadata:
- - name: CAST('123' AS UNSIGNED)
+ - name: COLUMN_1
type: unsigned
rows:
- [123]
@@ -1151,7 +1151,7 @@ box.space.T:drop()
box.execute("SELECT CASE 1 WHEN 1 THEN x'0000000000' WHEN 2 THEN 'str' END")
---
- metadata:
- - name: CASE 1 WHEN 1 THEN x'0000000000' WHEN 2 THEN 'str' END
+ - name: COLUMN_1
type: scalar
rows:
- ["\0\0\0\0\0"]
@@ -1159,7 +1159,7 @@ box.execute("SELECT CASE 1 WHEN 1 THEN x'0000000000' WHEN 2 THEN 'str' END")
box.execute("SELECT CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 END")
---
- metadata:
- - name: CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 END
+ - name: COLUMN_1
type: integer
rows:
- [666]
@@ -1167,7 +1167,7 @@ box.execute("SELECT CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 END")
box.execute("SELECT CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 ELSE 321 END")
---
- metadata:
- - name: CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 ELSE 321 END
+ - name: COLUMN_1
type: integer
rows:
- [666]
@@ -1175,7 +1175,7 @@ box.execute("SELECT CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 ELSE 321 END")
box.execute("SELECT CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 ELSE 'asd' END")
---
- metadata:
- - name: CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 ELSE 'asd' END
+ - name: COLUMN_1
type: scalar
rows:
- [666]
@@ -1183,8 +1183,7 @@ box.execute("SELECT CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 ELSE 'asd' END")
box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN 'd' THEN 4 WHEN 'e' THEN 5 WHEN 'f' THEN 6 END;")
---
- metadata:
- - name: CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN 'd' THEN 4
- WHEN 'e' THEN 5 WHEN 'f' THEN 6 END
+ - name: COLUMN_1
type: integer
rows:
- [1]
@@ -1192,8 +1191,7 @@ box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHE
box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN 'd' THEN 4 WHEN 'e' THEN 5 WHEN 'f' THEN 'asd' END;")
---
- metadata:
- - name: CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN 'd' THEN 4
- WHEN 'e' THEN 5 WHEN 'f' THEN 'asd' END
+ - name: COLUMN_1
type: scalar
rows:
- [1]
@@ -1201,8 +1199,7 @@ box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHE
box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN 'd' THEN 4 WHEN 'e' THEN 5 WHEN 'f' THEN 6 ELSE 'asd' END;")
---
- metadata:
- - name: CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN 'd' THEN 4
- WHEN 'e' THEN 5 WHEN 'f' THEN 6 ELSE 'asd' END
+ - name: COLUMN_1
type: scalar
rows:
- [1]
@@ -1210,8 +1207,7 @@ box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHE
box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN 'd' THEN 4 WHEN 'e' THEN 5 WHEN 'f' THEN 6 ELSE 7 END;")
---
- metadata:
- - name: CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN 'd' THEN 4
- WHEN 'e' THEN 5 WHEN 'f' THEN 6 ELSE 7 END
+ - name: COLUMN_1
type: integer
rows:
- [1]
@@ -1289,7 +1285,7 @@ box.execute("SELECT total(v) FROM t;")
box.execute("SELECT min(v) FROM t;")
---
- metadata:
- - name: min(v)
+ - name: COLUMN_1
type: scalar
rows:
- ['abc']
@@ -1297,7 +1293,7 @@ box.execute("SELECT min(v) FROM t;")
box.execute("SELECT max(v) FROM t;")
---
- metadata:
- - name: max(v)
+ - name: COLUMN_1
type: scalar
rows:
- ['abc']
@@ -1305,7 +1301,7 @@ box.execute("SELECT max(v) FROM t;")
box.execute("SELECT count(v) FROM t;")
---
- metadata:
- - name: count(v)
+ - name: COLUMN_1
type: integer
rows:
- [1]
@@ -1313,7 +1309,7 @@ box.execute("SELECT count(v) FROM t;")
box.execute("SELECT group_concat(v) FROM t;")
---
- metadata:
- - name: group_concat(v)
+ - name: COLUMN_1
type: string
rows:
- ['abc']
@@ -1336,7 +1332,7 @@ box.execute("SELECT abs(v) FROM t;")
box.execute("SELECT typeof(v) FROM t;")
---
- metadata:
- - name: typeof(v)
+ - name: COLUMN_1
type: string
rows:
- ['varbinary']
@@ -1344,7 +1340,7 @@ box.execute("SELECT typeof(v) FROM t;")
box.execute("SELECT quote(v) FROM t;")
---
- metadata:
- - name: quote(v)
+ - name: COLUMN_1
type: string
rows:
- ['X''616263''']
@@ -1352,7 +1348,7 @@ box.execute("SELECT quote(v) FROM t;")
box.execute("SELECT LEAST(v, x'') FROM t;")
---
- metadata:
- - name: LEAST(v, x'')
+ - name: COLUMN_1
type: scalar
rows:
- ['']
@@ -1472,7 +1468,7 @@ box.execute("SELECT CAST(true AS VARBINARY);")
box.execute("SELECT CAST('asd' AS VARBINARY);")
---
- metadata:
- - name: CAST('asd' AS VARBINARY)
+ - name: COLUMN_1
type: varbinary
rows:
- ['asd']
@@ -1480,7 +1476,7 @@ box.execute("SELECT CAST('asd' AS VARBINARY);")
box.execute("SELECT CAST(x'' AS VARBINARY);")
---
- metadata:
- - name: CAST(x'' AS VARBINARY)
+ - name: COLUMN_1
type: varbinary
rows:
- ['']
@@ -1499,9 +1495,9 @@ box.execute("INSERT INTO t VALUES (1, 1, 1), (2, NULL, NULL);")
box.execute("SELECT typeof(a), typeof(s) FROM t;")
---
- metadata:
- - name: typeof(a)
+ - name: COLUMN_1
type: string
- - name: typeof(s)
+ - name: COLUMN_2
type: string
rows:
- ['integer', 'integer']
@@ -1518,7 +1514,7 @@ box.execute('INSERT INTO t1 VALUES (1, NULL, NULL);')
box.execute('SELECT typeof(a & b) FROM t1;')
---
- metadata:
- - name: typeof(a & b)
+ - name: COLUMN_1
type: string
rows:
- ['integer']
@@ -1526,11 +1522,11 @@ box.execute('SELECT typeof(a & b) FROM t1;')
box.execute('SELECT typeof(a), typeof(b), typeof(a & b) FROM t1')
---
- metadata:
- - name: typeof(a)
+ - name: COLUMN_1
type: string
- - name: typeof(b)
+ - name: COLUMN_2
type: string
- - name: typeof(a & b)
+ - name: COLUMN_3
type: string
rows:
- ['integer', 'integer', 'integer']
@@ -1538,7 +1534,7 @@ box.execute('SELECT typeof(a), typeof(b), typeof(a & b) FROM t1')
box.execute("SELECT typeof(CAST(0 AS UNSIGNED));")
---
- metadata:
- - name: typeof(CAST(0 AS UNSIGNED))
+ - name: COLUMN_1
type: string
rows:
- ['unsigned']
@@ -1698,7 +1694,7 @@ box.execute('DROP TABLE t1;')
box.execute("SELECT 1.0;")
---
- metadata:
- - name: '1.0'
+ - name: COLUMN_1
type: double
rows:
- [1]
@@ -1706,7 +1702,7 @@ box.execute("SELECT 1.0;")
box.execute("SELECT .01;")
---
- metadata:
- - name: '.01'
+ - name: COLUMN_1
type: double
rows:
- [0.01]
@@ -1714,7 +1710,7 @@ box.execute("SELECT .01;")
box.execute("SELECT CAST(1 AS DOUBLE);")
---
- metadata:
- - name: CAST(1 AS DOUBLE)
+ - name: COLUMN_1
type: double
rows:
- [1]
@@ -1722,7 +1718,7 @@ box.execute("SELECT CAST(1 AS DOUBLE);")
box.execute("SELECT CAST(1.123 AS DOUBLE);")
---
- metadata:
- - name: CAST(1.123 AS DOUBLE)
+ - name: COLUMN_1
type: double
rows:
- [1.123]
@@ -1740,7 +1736,7 @@ box.execute("SELECT CAST('asd' AS DOUBLE);")
box.execute("SELECT CAST('1' AS DOUBLE);")
---
- metadata:
- - name: CAST('1' AS DOUBLE)
+ - name: COLUMN_1
type: double
rows:
- [1]
@@ -1748,7 +1744,7 @@ box.execute("SELECT CAST('1' AS DOUBLE);")
box.execute("SELECT CAST('1.123' AS DOUBLE);")
---
- metadata:
- - name: CAST('1.123' AS DOUBLE)
+ - name: COLUMN_1
type: double
rows:
- [1.123]
@@ -1766,7 +1762,7 @@ box.execute("SELECT CAST(x'35' AS DOUBLE);")
box.execute("SELECT CAST(CAST(x'35' AS STRING) AS DOUBLE);")
---
- metadata:
- - name: CAST(CAST(x'35' AS STRING) AS DOUBLE)
+ - name: COLUMN_1
type: double
rows:
- [5]
@@ -1800,7 +1796,7 @@ box.execute('SELECT * FROM t;')
box.execute('SELECT d / 100 FROM t;')
---
- metadata:
- - name: d / 100
+ - name: COLUMN_1
type: double
rows:
- [0.1]
@@ -1833,7 +1829,7 @@ box.execute('SELECT * from t WHERE d = 3.3;')
box.execute("SELECT sum(d) FROM t;")
---
- metadata:
- - name: sum(d)
+ - name: COLUMN_1
type: number
rows:
- [18000000000000000000]
@@ -1841,7 +1837,7 @@ box.execute("SELECT sum(d) FROM t;")
box.execute("SELECT avg(d) FROM t;")
---
- metadata:
- - name: avg(d)
+ - name: COLUMN_1
type: number
rows:
- [4500000000000000000]
@@ -1849,7 +1845,7 @@ box.execute("SELECT avg(d) FROM t;")
box.execute("SELECT total(d) FROM t;")
---
- metadata:
- - name: total(d)
+ - name: COLUMN_1
type: number
rows:
- [18000000000000000000]
@@ -1857,7 +1853,7 @@ box.execute("SELECT total(d) FROM t;")
box.execute("SELECT min(d) FROM t;")
---
- metadata:
- - name: min(d)
+ - name: COLUMN_1
type: scalar
rows:
- [-2]
@@ -1865,7 +1861,7 @@ box.execute("SELECT min(d) FROM t;")
box.execute("SELECT max(d) FROM t;")
---
- metadata:
- - name: max(d)
+ - name: COLUMN_1
type: scalar
rows:
- [18000000000000000000]
@@ -1873,7 +1869,7 @@ box.execute("SELECT max(d) FROM t;")
box.execute("SELECT count(d) FROM t;")
---
- metadata:
- - name: count(d)
+ - name: COLUMN_1
type: integer
rows:
- [4]
@@ -1881,7 +1877,7 @@ box.execute("SELECT count(d) FROM t;")
box.execute("SELECT group_concat(d) FROM t;")
---
- metadata:
- - name: group_concat(d)
+ - name: COLUMN_1
type: string
rows:
- ['10.0,-2.0,3.3,1.8e+19']
@@ -1889,7 +1885,7 @@ box.execute("SELECT group_concat(d) FROM t;")
box.execute("SELECT lower(d) FROM t;")
---
- metadata:
- - name: lower(d)
+ - name: COLUMN_1
type: string
rows:
- ['10.0']
@@ -1900,7 +1896,7 @@ box.execute("SELECT lower(d) FROM t;")
box.execute("SELECT upper(d) FROM t;")
---
- metadata:
- - name: upper(d)
+ - name: COLUMN_1
type: string
rows:
- ['10.0']
@@ -1911,7 +1907,7 @@ box.execute("SELECT upper(d) FROM t;")
box.execute("SELECT abs(d) FROM t;")
---
- metadata:
- - name: abs(d)
+ - name: COLUMN_1
type: number
rows:
- [10]
@@ -1922,7 +1918,7 @@ box.execute("SELECT abs(d) FROM t;")
box.execute("SELECT typeof(d) FROM t;")
---
- metadata:
- - name: typeof(d)
+ - name: COLUMN_1
type: string
rows:
- ['double']
@@ -1933,7 +1929,7 @@ box.execute("SELECT typeof(d) FROM t;")
box.execute("SELECT quote(d) FROM t;")
---
- metadata:
- - name: quote(d)
+ - name: COLUMN_1
type: string
rows:
- ['10.0']
@@ -1944,7 +1940,7 @@ box.execute("SELECT quote(d) FROM t;")
box.execute("SELECT LEAST(d, 0) FROM t;")
---
- metadata:
- - name: LEAST(d, 0)
+ - name: COLUMN_1
type: scalar
rows:
- [0]
@@ -2086,9 +2082,9 @@ box.execute("DROP TABLE t4;")
box.execute("SELECT 1.0, typeof(1.0);")
---
- metadata:
- - name: '1.0'
+ - name: COLUMN_1
type: double
- - name: typeof(1.0)
+ - name: COLUMN_2
type: string
rows:
- [1, 'double']
@@ -2096,9 +2092,9 @@ box.execute("SELECT 1.0, typeof(1.0);")
box.execute("SELECT CAST(2 AS DOUBLE), typeof(CAST(2 AS DOUBLE));")
---
- metadata:
- - name: CAST(2 AS DOUBLE)
+ - name: COLUMN_1
type: double
- - name: typeof(CAST(2 AS DOUBLE))
+ - name: COLUMN_2
type: string
rows:
- [2, 'double']
@@ -2106,9 +2102,9 @@ box.execute("SELECT CAST(2 AS DOUBLE), typeof(CAST(2 AS DOUBLE));")
box.execute("SELECT 3e3, typeof(3e3);")
---
- metadata:
- - name: '3e3'
+ - name: COLUMN_1
type: double
- - name: typeof(3e3)
+ - name: COLUMN_2
type: string
rows:
- [3000, 'double']
@@ -2126,7 +2122,7 @@ box.execute("SELECT d, TYPEOF(d) FROM t5;")
- metadata:
- name: D
type: double
- - name: TYPEOF(d)
+ - name: COLUMN_1
type: string
rows:
- [4, 'double']
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Tarantool-patches] [PATCH] sql: use unify pattern for column names
2020-03-31 21:05 ` Roman Khabibov
@ 2020-04-21 23:37 ` Vladislav Shpilevoy
2020-04-26 23:08 ` Roman Khabibov
0 siblings, 1 reply; 9+ messages in thread
From: Vladislav Shpilevoy @ 2020-04-21 23:37 UTC (permalink / raw)
To: Roman Khabibov; +Cc: tarantool-patches
Hi! Thanks for the fixes!
>>> diff --git a/test/sql/gh-3888-values-blob-assert.result b/test/sql/gh-3888-values-blob-assert.result
>>> index 0a1af28f2..d2e27efd9 100644
>>> --- a/test/sql/gh-3888-values-blob-assert.result
>>> +++ b/test/sql/gh-3888-values-blob-assert.result
>>> @@ -1,3 +1,4 @@
>>> +-- test-run result file version 2
>>> -- sql: assertion fault on VALUES #3888
>>> --
>>> -- Make sure that tokens representing values of integer, float,
>>> @@ -5,79 +6,87 @@
>>> -- keywords of the same names.
>>> --
>>> test_run = require('test_run').new()
>>> ----
>>> -...
>>> + | ---
>>> + | ...
>>> engine = test_run:get_cfg('engine')
>>> ----
>>> -...
>>> + | ---
>>> + | ...
>>> _ = box.space._session_settings:update('sql_default_engine', {{'=', 2, engine}})
>>> ----
>>
>> 7. These and similar changes look unrelated to the
>> issue. In some other files too.
> What I should do? Tests will fall, if I don’t add these changes.
Well, they won't. Test-run interprets .result files using their
version in the first line. You added the version 2, and it
expects output of the version 2. Don't add version 2, and you
will be able to keep it without these changes.
I suspect you updated the file by removing the old .result, and
creating a new by running the test. But it is not really correct.
Better move .reject file into .result file. Then the version won't
change.
See 6 comments below.
> sql: use unify pattern for column names
>
> Name resulting columns generated by an expression or <VALUES>
> construction by the "_COLUMN_N" pattern.
1. The pattern here and below is outdated. There is no '_' in the
first character anymore.
> Closes #3962
>
> @TarantoolBot document
> Title: Column naming in SQL
>
> Now, every auto generated column is named by the "_COLUMN_N"
> pattern, where N is the number of column in a query (starting)
> from 1). Auto generated column is a column in a query result
> generated by an expression or a column from <VALUES>
> construction.
>
> Examples:
> box.execute("VALUES(1, 2, 3);")
> ---
> - metadata:
> - name: COLUMN_1
> type: integer
> - name: COLUMN_2
> type: integer
> - name: COLUMN_3
> type: integer
> rows:
> - [1, 2, 3]
> ...
> box.execute("SELECT * FROM (VALUES (1+1, 1+1));")
> ---
> - metadata:
> - name: COLUMN_1
> type: integer
> - name: COLUMN_2
> type: integer
> rows:
> - [2, 2]
> ...
> box.execute("SELECT 1+1, 1+1;")
> ---
> - metadata:
> - name: COLUMN_1
> type: integer
> - name: COLUMN_2
> type: integer
> rows:
> - [2, 2]
> ...
>
> diff --git a/src/box/sql/select.c b/src/box/sql/select.c
> index 65e41f219..f39983761 100644
> --- a/src/box/sql/select.c
> +++ b/src/box/sql/select.c
> @@ -1946,14 +1946,13 @@ sqlColumnsFromExprList(Parse * parse, ExprList * expr_list,
> } else if (pColExpr->op == TK_ID) {
> assert(!ExprHasProperty(pColExpr, EP_IntValue));
> zName = pColExpr->u.zToken;
> - } else {
> - /* Use the original text of the column expression as its name */
> - zName = expr_list->a[i].zSpan;
> }
> }
> - if (zName == NULL)
> - zName = "_auto_field_";
> - zName = sqlMPrintf(db, "%s", zName);
> + if (zName == NULL) {
> + uint32_t idx = ++parse->autoname_i;
> + zName = (char *) sql_generate_column_name(idx);
2. Wait, I remember I asked to keep it const. I even provided a mini patch
how to keep it without casts. Why did you leave non-const char here?
> + }
> + zName = sqlDbStrDup(db, zName);
>
> /* Make sure the column name is unique. If the name is not unique,
> * append an integer to the name so that it becomes unique.
> diff --git a/src/box/sql/sqlInt.h b/src/box/sql/sqlInt.h
> index 1579cc92e..c355d1b17 100644
> --- a/src/box/sql/sqlInt.h
> +++ b/src/box/sql/sqlInt.h
> @@ -2223,6 +2223,8 @@ struct Parse {
> TriggerPrg *pTriggerPrg; /* Linked list of coded triggers */
> With *pWith; /* Current WITH clause, or NULL */
> With *pWithToFree; /* Free this WITH object at the end of the parse */
> + /** Index of previous auto generated name */
3. Please, add a dot in the end.
> + uint32_t autoname_i;
> /** Space triggers are being coded for. */
> struct space *triggered_space;
> /**
> @@ -4513,4 +4515,17 @@ int
> sql_fieldno_by_name(struct Parse *parse_context, struct Expr *field_name,
> uint32_t *fieldno);
>
> +/**
> + * Return a string of the form "_COLUMN_N", where N is @a number.
4. The template it outdated.
> + *
> + * We decided to name every auto generated column in output by
> + * this pattern (like PostgreSQL), because it is convenient than
5. 'convenient' -> 'more convenient'.
> + * "_auto_name_" and naming with span like MariaDB do.
> + */
> +static inline const char *
> +sql_generate_column_name(uint32_t number)
> +{
> + return tt_sprintf("COLUMN_%d", number);
> +}
> +
> #endif /* sqlINT_H */
> diff --git a/test/sql/full_metadata.test.lua b/test/sql/full_metadata.test.lua
> index a9ba320c9..90972c48c 100644
> --- a/test/sql/full_metadata.test.lua
> +++ b/test/sql/full_metadata.test.lua
> @@ -47,7 +47,15 @@ execute("SELECT x, y FROM v;")
>
> execute([[UPDATE "_session_settings" SET "value" = false WHERE "name" = 'sql_full_metadata';]])
>
> +-- gh-3962: Check auto generated names in different selects.
6. This does not look like the right file for that. Because nothing
here concerns full metadata is sent or not. colname.test.lua may be
the right place.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Tarantool-patches] [PATCH] sql: use unify pattern for column names
2020-04-21 23:37 ` Vladislav Shpilevoy
@ 2020-04-26 23:08 ` Roman Khabibov
2020-05-01 19:35 ` Vladislav Shpilevoy
0 siblings, 1 reply; 9+ messages in thread
From: Roman Khabibov @ 2020-04-26 23:08 UTC (permalink / raw)
To: Vladislav Shpilevoy; +Cc: tarantool-patches
Hi! Thanks for the review.
> On Apr 22, 2020, at 02:37, Vladislav Shpilevoy <v.shpilevoy@tarantool.org> wrote:
>
> Hi! Thanks for the fixes!
>
>>>> diff --git a/test/sql/gh-3888-values-blob-assert.result b/test/sql/gh-3888-values-blob-assert.result
>>>> index 0a1af28f2..d2e27efd9 100644
>>>> --- a/test/sql/gh-3888-values-blob-assert.result
>>>> +++ b/test/sql/gh-3888-values-blob-assert.result
>>>> @@ -1,3 +1,4 @@
>>>> +-- test-run result file version 2
>>>> -- sql: assertion fault on VALUES #3888
>>>> --
>>>> -- Make sure that tokens representing values of integer, float,
>>>> @@ -5,79 +6,87 @@
>>>> -- keywords of the same names.
>>>> --
>>>> test_run = require('test_run').new()
>>>> ----
>>>> -...
>>>> + | ---
>>>> + | ...
>>>> engine = test_run:get_cfg('engine')
>>>> ----
>>>> -...
>>>> + | ---
>>>> + | ...
>>>> _ = box.space._session_settings:update('sql_default_engine', {{'=', 2, engine}})
>>>> ----
>>>
>>> 7. These and similar changes look unrelated to the
>>> issue. In some other files too.
>> What I should do? Tests will fall, if I don’t add these changes.
>
> Well, they won't. Test-run interprets .result files using their
> version in the first line. You added the version 2, and it
> expects output of the version 2. Don't add version 2, and you
> will be able to keep it without these changes.
Now, it’s ok.
> I suspect you updated the file by removing the old .result, and
> creating a new by running the test. But it is not really correct.
> Better move .reject file into .result file. Then the version won't
> change.
No. I always do mv .reject .result
> See 6 comments below.
>
>> sql: use unify pattern for column names
>>
>> Name resulting columns generated by an expression or <VALUES>
>> construction by the "_COLUMN_N" pattern.
>
> 1. The pattern here and below is outdated. There is no '_' in the
> first character anymore.
Fixed.
>> Closes #3962
>>
>> @TarantoolBot document
>> Title: Column naming in SQL
>>
>> Now, every auto generated column is named by the "_COLUMN_N"
>> pattern, where N is the number of column in a query (starting)
>> from 1). Auto generated column is a column in a query result
>> generated by an expression or a column from <VALUES>
>> construction.
>>
>> Examples:
>> box.execute("VALUES(1, 2, 3);")
>> ---
>> - metadata:
>> - name: COLUMN_1
>> type: integer
>> - name: COLUMN_2
>> type: integer
>> - name: COLUMN_3
>> type: integer
>> rows:
>> - [1, 2, 3]
>> ...
>> box.execute("SELECT * FROM (VALUES (1+1, 1+1));")
>> ---
>> - metadata:
>> - name: COLUMN_1
>> type: integer
>> - name: COLUMN_2
>> type: integer
>> rows:
>> - [2, 2]
>> ...
>> box.execute("SELECT 1+1, 1+1;")
>> ---
>> - metadata:
>> - name: COLUMN_1
>> type: integer
>> - name: COLUMN_2
>> type: integer
>> rows:
>> - [2, 2]
>> ...
>>
>> diff --git a/src/box/sql/select.c b/src/box/sql/select.c
>> index 65e41f219..f39983761 100644
>> --- a/src/box/sql/select.c
>> +++ b/src/box/sql/select.c
>> @@ -1946,14 +1946,13 @@ sqlColumnsFromExprList(Parse * parse, ExprList * expr_list,
>> } else if (pColExpr->op == TK_ID) {
>> assert(!ExprHasProperty(pColExpr, EP_IntValue));
>> zName = pColExpr->u.zToken;
>> - } else {
>> - /* Use the original text of the column expression as its name */
>> - zName = expr_list->a[i].zSpan;
>> }
>> }
>> - if (zName == NULL)
>> - zName = "_auto_field_";
>> - zName = sqlMPrintf(db, "%s", zName);
>> + if (zName == NULL) {
>> + uint32_t idx = ++parse->autoname_i;
>> + zName = (char *) sql_generate_column_name(idx);
>
> 2. Wait, I remember I asked to keep it const. I even provided a mini patch
> how to keep it without casts. Why did you leave non-const char here?
I know, but now I do uint32_t idx = ++parse->autoname_i;, so I need if else
and your construction is not suitable already.
>> + }
>> + zName = sqlDbStrDup(db, zName);
>>
>> /* Make sure the column name is unique. If the name is not unique,
>> * append an integer to the name so that it becomes unique.
>> diff --git a/src/box/sql/sqlInt.h b/src/box/sql/sqlInt.h
>> index 1579cc92e..c355d1b17 100644
>> --- a/src/box/sql/sqlInt.h
>> +++ b/src/box/sql/sqlInt.h
>> @@ -2223,6 +2223,8 @@ struct Parse {
>> TriggerPrg *pTriggerPrg; /* Linked list of coded triggers */
>> With *pWith; /* Current WITH clause, or NULL */
>> With *pWithToFree; /* Free this WITH object at the end of the parse */
>> + /** Index of previous auto generated name */
>
> 3. Please, add a dot in the end.
>
>> + uint32_t autoname_i;
>> /** Space triggers are being coded for. */
>> struct space *triggered_space;
>> /**
>> @@ -4513,4 +4515,17 @@ int
>> sql_fieldno_by_name(struct Parse *parse_context, struct Expr *field_name,
>> uint32_t *fieldno);
>>
>> +/**
>> + * Return a string of the form "_COLUMN_N", where N is @a number.
>
> 4. The template it outdated.
>
>> + *
>> + * We decided to name every auto generated column in output by
>> + * this pattern (like PostgreSQL), because it is convenient than
>
> 5. 'convenient' -> 'more convenient'.
+++ b/src/box/sql/sqlInt.h
@@ -2227,6 +2227,8 @@ struct Parse {
TriggerPrg *pTriggerPrg; /* Linked list of coded triggers */
With *pWith; /* Current WITH clause, or NULL */
With *pWithToFree; /* Free this WITH object at the end of the parse */
+ /** Index of previous auto generated name. */
+ uint32_t autoname_i;
/** Space triggers are being coded for. */
struct space *triggered_space;
/**
@@ -4530,4 +4532,17 @@ void
sql_setting_set(struct Parse *parse_context, struct Token *name,
struct Expr *value);
+/**
+ * Return a string of the form "COLUMN_N", where N is @a number.
+ *
+ * We decided to name every auto generated column in output by
+ * this pattern (like PostgreSQL), because it is more convenient
+ * than "_auto_name_" and naming with span like MariaDB do.
+ */
+static inline const char *
+sql_generate_column_name(uint32_t number)
+{
+ return tt_sprintf("COLUMN_%d", number);
+}
+
>> + * "_auto_name_" and naming with span like MariaDB do.
>> + */
>> +static inline const char *
>> +sql_generate_column_name(uint32_t number)
>> +{
>> + return tt_sprintf("COLUMN_%d", number);
>> +}
>> +
>> #endif /* sqlINT_H */
>> diff --git a/test/sql/full_metadata.test.lua b/test/sql/full_metadata.test.lua
>> index a9ba320c9..90972c48c 100644
>> --- a/test/sql/full_metadata.test.lua
>> +++ b/test/sql/full_metadata.test.lua
>> @@ -47,7 +47,15 @@ execute("SELECT x, y FROM v;")
>>
>> execute([[UPDATE "_session_settings" SET "value" = false WHERE "name" = 'sql_full_metadata';]])
>>
>> +-- gh-3962: Check auto generated names in different selects.
>
> 6. This does not look like the right file for that. Because nothing
> here concerns full metadata is sent or not. colname.test.lua may be
> the right place.
Done.
sql: use unify pattern for column names
Name resulting columns generated by an expression or <VALUES>
construction by the "COLUMN_N" pattern.
Closes #3962
@TarantoolBot document
Title: Column naming in SQL
Now, every auto generated column is named by the "COLUMN_N"
pattern, where N is the number of column in a query (starting)
from 1). Auto generated column is a column in a query result
generated by an expression or a column from <VALUES>
construction.
Examples:
box.execute("VALUES(1, 2, 3);")
---
- metadata:
- name: COLUMN_1
type: integer
- name: COLUMN_2
type: integer
- name: COLUMN_3
type: integer
rows:
- [1, 2, 3]
...
box.execute("SELECT * FROM (VALUES (1+1, 1+1));")
---
- metadata:
- name: COLUMN_1
type: integer
- name: COLUMN_2
type: integer
rows:
- [2, 2]
...
box.execute("SELECT 1+1, 1+1;")
---
- metadata:
- name: COLUMN_1
type: integer
- name: COLUMN_2
type: integer
rows:
- [2, 2]
...
---
src/box/sql/select.c | 27 +-
src/box/sql/sqlInt.h | 15 +
test/box/function1.result | 12 +-
test/sql-tap/colname.test.lua | 72 ++++-
test/sql-tap/select1.test.lua | 21 +-
test/sql-tap/select6.test.lua | 22 +-
test/sql-tap/view.test.lua | 4 +-
test/sql/bind.result | 42 +--
test/sql/boolean.result | 354 ++++++++++-----------
test/sql/collation.result | 14 +-
test/sql/errinj.result | 2 +-
test/sql/foreign-keys.result | 4 +-
test/sql/full_metadata.result | 23 +-
test/sql/func-recreate.result | 2 +-
test/sql/gh-3199-no-mem-leaks.result | 24 +-
test/sql/gh-3888-values-blob-assert.result | 8 +-
test/sql/icu-upper-lower.result | 82 ++---
test/sql/integer-overflow.result | 14 +-
test/sql/iproto.result | 18 +-
test/sql/max-on-index.result | 6 +-
test/sql/misc.result | 12 +-
test/sql/persistency.result | 66 ++--
test/sql/prepared.result | 36 +--
test/sql/row-count.result | 40 +--
test/sql/transition.result | 66 ++--
test/sql/types.result | 224 +++++++------
26 files changed, 637 insertions(+), 573 deletions(-)
diff --git a/src/box/sql/select.c b/src/box/sql/select.c
index f39484013..d65266586 100644
--- a/src/box/sql/select.c
+++ b/src/box/sql/select.c
@@ -1815,6 +1815,7 @@ generate_column_metadata(struct Parse *pParse, struct SrcList *pTabList,
vdbe_metadata_set_col_nullability(v, i, -1);
const char *colname = pEList->a[i].zName;
const char *span = pEList->a[i].zSpan;
+ p = sqlExprSkipCollate(p);
if (p->op == TK_COLUMN || p->op == TK_AGG_COLUMN) {
char *zCol;
int iCol = p->iColumn;
@@ -1847,19 +1848,19 @@ generate_column_metadata(struct Parse *pParse, struct SrcList *pTabList,
if (space->sequence != NULL &&
space->sequence_fieldno == (uint32_t) iCol)
vdbe_metadata_set_col_autoincrement(v, i);
- if (colname != NULL)
+ if (span != NULL)
vdbe_metadata_set_col_span(v, i, span);
}
} else {
const char *z = NULL;
- if (colname != NULL)
+ if (colname != NULL) {
z = colname;
- else if (span != NULL)
- z = span;
- else
- z = tt_sprintf("column%d", i + 1);
+ } else {
+ uint32_t idx = ++pParse->autoname_i;
+ z = sql_generate_column_name(idx);
+ }
vdbe_metadata_set_col_name(v, i, z);
- if (is_full_meta && colname != NULL)
+ if (is_full_meta)
vdbe_metadata_set_col_span(v, i, span);
}
}
@@ -1948,14 +1949,14 @@ sqlColumnsFromExprList(Parse * parse, ExprList * expr_list,
} else if (pColExpr->op == TK_ID) {
assert(!ExprHasProperty(pColExpr, EP_IntValue));
zName = pColExpr->u.zToken;
- } else {
- /* Use the original text of the column expression as its name */
- zName = expr_list->a[i].zSpan;
}
}
- if (zName == NULL)
- zName = "_auto_field_";
- zName = sqlMPrintf(db, "%s", zName);
+ if (zName == NULL) {
+ uint32_t idx = ++parse->autoname_i;
+ zName = sqlDbStrDup(db, sql_generate_column_name(idx));
+ } else {
+ zName = sqlDbStrDup(db, zName);
+ }
/* Make sure the column name is unique. If the name is not unique,
* append an integer to the name so that it becomes unique.
diff --git a/src/box/sql/sqlInt.h b/src/box/sql/sqlInt.h
index 37283e506..adf90d824 100644
--- a/src/box/sql/sqlInt.h
+++ b/src/box/sql/sqlInt.h
@@ -2227,6 +2227,8 @@ struct Parse {
TriggerPrg *pTriggerPrg; /* Linked list of coded triggers */
With *pWith; /* Current WITH clause, or NULL */
With *pWithToFree; /* Free this WITH object at the end of the parse */
+ /** Index of previous auto generated name. */
+ uint32_t autoname_i;
/** Space triggers are being coded for. */
struct space *triggered_space;
/**
@@ -4530,4 +4532,17 @@ void
sql_setting_set(struct Parse *parse_context, struct Token *name,
struct Expr *value);
+/**
+ * Return a string of the form "COLUMN_N", where N is @a number.
+ *
+ * We decided to name every auto generated column in output by
+ * this pattern (like PostgreSQL), because it is more convenient
+ * than "_auto_name_" and naming with span like MariaDB do.
+ */
+static inline const char *
+sql_generate_column_name(uint32_t number)
+{
+ return tt_sprintf("COLUMN_%d", number);
+}
+
#endif /* sqlINT_H */
diff --git a/test/box/function1.result b/test/box/function1.result
index b91d63c51..f198168c1 100644
--- a/test/box/function1.result
+++ b/test/box/function1.result
@@ -449,7 +449,7 @@ box.execute('SELECT "function1.divide"(6, 3, 3)')
box.execute('SELECT "function1.divide"(6, 3)')
---
- metadata:
- - name: '"function1.divide"(6, 3)'
+ - name: COLUMN_1
type: number
rows:
- [2]
@@ -457,7 +457,7 @@ box.execute('SELECT "function1.divide"(6, 3)')
box.execute('SELECT "function1.divide"(5, 2)')
---
- metadata:
- - name: '"function1.divide"(5, 2)'
+ - name: COLUMN_1
type: number
rows:
- [2.5]
@@ -482,7 +482,7 @@ test_run:cmd("setopt delimiter ''");
box.execute('SELECT summarize(1, 2)')
---
- metadata:
- - name: summarize(1, 2)
+ - name: COLUMN_1
type: number
rows:
- [3]
@@ -505,7 +505,7 @@ test_run:cmd("setopt delimiter ''");
box.execute('SELECT summarize(1, 2)')
---
- metadata:
- - name: summarize(1, 2)
+ - name: COLUMN_1
type: number
rows:
- [3]
@@ -519,7 +519,7 @@ box.func.SUMMARIZE:drop()
box.execute('SELECT lua(\'return 1 + 1\')')
---
- metadata:
- - name: lua('return 1 + 1')
+ - name: COLUMN_1
type: any
rows:
- [2]
@@ -537,7 +537,7 @@ box.execute('SELECT lua(\'return box.cfg()\')')
box.execute('SELECT lua(\'return box.cfg.memtx_memory\')')
---
- metadata:
- - name: lua('return box.cfg.memtx_memory')
+ - name: COLUMN_1
type: any
rows:
- [107374182]
diff --git a/test/sql-tap/colname.test.lua b/test/sql-tap/colname.test.lua
index caa61a07a..e895c040b 100755
--- a/test/sql-tap/colname.test.lua
+++ b/test/sql-tap/colname.test.lua
@@ -1,6 +1,6 @@
#!/usr/bin/env tarantool
test = require("sqltester")
-test:plan(62)
+test:plan(69)
--!./tcltestrunner.lua
-- 2008 July 15
@@ -94,7 +94,7 @@ test:do_execsql2_test(
SELECT +tabc.a, -tabc.b, tabc.c, * FROM tabc
]], {
-- <colname-2.3>
- "+tabc.a",1,"-tabc.b",-2,"C",3,"A",1,"B",2,"C",3
+ "COLUMN_1",1,"COLUMN_2",-2,"C",3,"A",1,"B",2,"C",3
-- </colname-2.3>
})
@@ -194,7 +194,7 @@ test:do_execsql2_test(
SELECT +tabc.a, -tabc.b, tabc.c FROM tabc
]], {
-- <colname-3.3>
- "+tabc.a", 1, "-tabc.b", -2, "C", 3
+ "COLUMN_1",1,"COLUMN_2",-2,"C",3
-- </colname-3.3>
})
@@ -314,7 +314,7 @@ test:do_execsql2_test(
SELECT +tabc.a, -tabc.b, tabc.c FROM tabc
]], {
-- <colname-4.3>
- "+tabc.a", 1, "-tabc.b", -2, "TABC.C", 3
+ "COLUMN_1",1,"COLUMN_2",-2,"TABC.C",3
-- </colname-4.3>
})
@@ -635,4 +635,68 @@ test:do_catchsql_test(
[[ CREATE INDEX t1c ON table1('c'); ]],
{1, "/Tarantool does not support functional indexes/"})
+--
+-- gh-3962: Check auto generated names in different selects.
+--
+test:do_execsql2_test(
+ "colname-12.1",
+ [[
+ VALUES(1, 2, 'aaa');
+ ]], {
+ "COLUMN_1",1,"COLUMN_2",2,"COLUMN_3","aaa"
+ })
+
+test:do_execsql2_test(
+ "colname-12.2",
+ [[
+ SELECT * FROM (VALUES (1+1, 1+1, 'aaa'));
+ ]], {
+ "COLUMN_1",2,"COLUMN_2",2,"COLUMN_3","aaa"
+ })
+
+test:do_execsql2_test(
+ "colname-12.3",
+ [[
+ SELECT 1+1, 1+1, 'aaa';
+ ]], {
+ "COLUMN_1",2,"COLUMN_2",2,"COLUMN_3","aaa"
+ })
+
+test:do_execsql2_test(
+ "colname-12.4",
+ [[
+ SELECT * FROM (SELECT * FROM (VALUES(1, 2, 'aaa'))),
+ (SELECT * FROM (VALUES(1, 2, 'aaa')))
+ ]], {
+ "COLUMN_1",1,"COLUMN_2",2,"COLUMN_3","aaa","COLUMN_4",1,"COLUMN_5",2,
+ "COLUMN_6","aaa"
+ })
+
+test:do_execsql2_test(
+ "colname-12.5",
+ [[
+ CREATE TABLE j (s1 SCALAR PRIMARY KEY);
+ INSERT INTO j VALUES(1);
+ ]], {})
+
+--
+-- Column named as 's1', because <COLLATE> is skipped in such
+-- expressions.
+--
+test:do_execsql2_test(
+ "colname-12.6",
+ [[
+ SELECT s1 COLLATE "unicode_ci" FROM j;
+ ]], {
+ "S1",1
+ })
+
+test:do_catchsql_test(
+ "colname-12.7",
+ [[
+ SELECT s1 COLLATE "unicode_ci" FROM j ORDER BY column_1;
+ ]], {
+ 1,"Can’t resolve field 'COLUMN_1'"
+ })
+
test:finish_test()
diff --git a/test/sql-tap/select1.test.lua b/test/sql-tap/select1.test.lua
index fbebfab37..80e94b019 100755
--- a/test/sql-tap/select1.test.lua
+++ b/test/sql-tap/select1.test.lua
@@ -1032,7 +1032,7 @@ test:do_catchsql2_test(
SELECT f1+F2 FROM test1 ORDER BY f2
]], {
-- <select1-6.4a>
- 0, {"f1+F2", 33, "f1+F2", 77}
+ 0, {"COLUMN_1",33,"COLUMN_1",77}
-- </select1-6.4a>
})
@@ -1042,7 +1042,7 @@ test:do_catchsql2_test(
SELECT test1.f1+F2 FROM test1 ORDER BY f2
]], {
-- <select1-6.5>
- 0, {"test1.f1+F2", 33, "test1.f1+F2", 77}
+ 0, {"COLUMN_1",33,"COLUMN_1",77}
-- </select1-6.5>
})
@@ -1059,7 +1059,7 @@ test:do_test(
return table.insert(v,msg) or v
end, {
-- <select1-6.5.1>
- 0, {'test1.f1+F2', 33, 'test1.f1+F2', 77}
+ 0, {"COLUMN_1",33,"COLUMN_1",77}
-- </select1-6.5.1>
})
@@ -1068,7 +1068,7 @@ test:do_catchsql2_test(
[[SELECT test1.f1+F2, t1 FROM test1, test2
ORDER BY f2]], {
-- <select1-6.6>
- 0, {"test1.f1+F2", 33, "T1", "abc", "test1.f1+F2", 77, "T1", "abc"}
+ 0, {"COLUMN_1",33,"T1","abc","COLUMN_1",77,"T1","abc"}
-- </select1-6.6>
})
@@ -1161,7 +1161,7 @@ test:do_test(
]]
end, {
-- <select1-6.9.5>
- "123.45", 123.45
+ "COLUMN_1",123.45
-- </select1-6.9.5>
})
@@ -1189,7 +1189,8 @@ test:do_test(
return x
end, {
-- <select1-6.9.7>
- "A.F1", 11, "A.F2", 22, "sql_subquery.5", 5, "sql_subquery.6", 6
+ "A.F1", 11, "A.F2", 22, "sql_subquery.COLUMN_1", 5,
+ "sql_subquery.COLUMN_2", 6
-- </select1-6.9.7>
})
@@ -1816,7 +1817,7 @@ test:do_execsql2_test(
SELECT * FROM t3, (SELECT max(a), max(b) FROM t4) as "tx"
]], {
-- <select1-11.14>
- "ID", 0, "A", "1", "B", "2", "max(a)", 3, "max(b)", "4"
+ "ID", 0, "A", "1", "B", "2", "COLUMN_1", 3, "COLUMN_2", "4"
-- </select1-11.14>
})
@@ -1826,7 +1827,7 @@ test:do_execsql2_test(
SELECT y.*, t3.* FROM t3, (SELECT max(a), max(b) FROM t4) AS y
]], {
-- <select1-11.15>
- "max(a)", 3, "max(b)", "4", "ID", 0, "A", "1", "B", "2"
+ "COLUMN_1", 3, "COLUMN_2", "4", "ID", 0, "A", "1", "B", "2"
-- </select1-11.15>
})
@@ -1850,7 +1851,7 @@ test:do_execsql2_test(
SELECT 1+2+3
]], {
-- <select1-12.1>
- "1+2+3", 6
+ "COLUMN_1",6
-- </select1-12.1>
})
@@ -1860,7 +1861,7 @@ test:do_execsql2_test(
SELECT 1,'hello',2
]], {
-- <select1-12.2>
- '1', 1, "'hello'", "hello", '2', 2
+ "COLUMN_1",1,"COLUMN_2","hello","COLUMN_3",2
-- </select1-12.2>
})
diff --git a/test/sql-tap/select6.test.lua b/test/sql-tap/select6.test.lua
index c9960dc29..380fd67c1 100755
--- a/test/sql-tap/select6.test.lua
+++ b/test/sql-tap/select6.test.lua
@@ -128,9 +128,9 @@ test:do_execsql_test(
test:do_execsql_test(
"select6-1.7",
[=[
- SELECT a.y, a."count(*)", "max(x)", "count(*)"
- FROM (SELECT count(*),y FROM t1 GROUP BY y) AS a,
- (SELECT max(x),y FROM t1 GROUP BY y) as b
+ SELECT a.y, a.COLUMN_1, COLUMN_2, COLUMN_1
+ FROM (SELECT count(*), y FROM t1 GROUP BY y) AS a,
+ (SELECT max(x), y FROM t1 GROUP BY y) as b
WHERE a.y=b.y ORDER BY a.y
]=], {
-- <select6-1.7>
@@ -154,9 +154,9 @@ test:do_execsql_test(
test:do_execsql_test(
"select6-1.9",
[=[
- SELECT q, p, r, b."min(x)+y"
+ SELECT q, p, r, min
FROM (SELECT count(*) as p , y as q FROM t1 GROUP BY y) AS a,
- (SELECT max(x) as r, y as s, min(x)+y FROM t1 GROUP BY y) as b
+ (SELECT max(x) as r, y as s, min(x)+y AS min FROM t1 GROUP BY y) as b
WHERE q=s ORDER BY s
]=], {
-- <select6-1.9>
@@ -247,9 +247,9 @@ test:do_execsql_test(
test:do_execsql_test(
"select6-2.7",
[=[
- SELECT a.b, a."count(*)", "max(a)", "count(*)"
- FROM (SELECT count(*),b FROM t2 GROUP BY b) AS a,
- (SELECT max(a),b FROM t2 GROUP BY b) as b
+ SELECT a.b, a.count, max, count
+ FROM (SELECT count(*) AS count, b FROM t2 GROUP BY b) AS a,
+ (SELECT max(a) AS max, b FROM t2 GROUP BY b) as b
WHERE a.b=b.b ORDER BY a.b
]=], {
-- <select6-2.7>
@@ -432,8 +432,8 @@ test:do_execsql_test(
test:do_execsql_test(
"select6-3.14",
[=[
- SELECT "count(*)",y FROM (SELECT count(*), y FROM t1 GROUP BY y)
- ORDER BY "count(*)"
+ SELECT count, y FROM (SELECT count(*) AS count, y FROM t1 GROUP BY y)
+ ORDER BY count
]=], {
-- <select6-3.14>
1, 1, 2, 2, 4, 3, 5, 5, 8, 4
@@ -443,7 +443,7 @@ test:do_execsql_test(
test:do_execsql_test(
"select6-3.15",
[=[
- SELECT "count(*)",y FROM (SELECT count(*), y FROM t1 GROUP BY y)
+ SELECT count, y FROM (SELECT count(*) AS count, y FROM t1 GROUP BY y)
ORDER BY y
]=], {
-- <select6-3.15>
diff --git a/test/sql-tap/view.test.lua b/test/sql-tap/view.test.lua
index e553b91c7..66374e374 100755
--- a/test/sql-tap/view.test.lua
+++ b/test/sql-tap/view.test.lua
@@ -265,7 +265,7 @@ test:do_execsql2_test(
SELECT * FROM v1 LIMIT 1
]], {
-- <view-3.3.1>
- "XYZ", 2, "PQR", 7, "c-b", 1
+ "XYZ", 2, "PQR", 7, "COLUMN_1", 1
-- </view-3.3.1>
})
@@ -276,7 +276,7 @@ test:do_execsql2_test(
SELECT * FROM v1b LIMIT 1
]], {
-- <view-3.3.2>
- "A", 2, "b+c", 7, "C", 4
+ "A", 2, "COLUMN_1", 7, "C", 4
-- </view-3.3.2>
})
diff --git a/test/sql/bind.result b/test/sql/bind.result
index b24094052..cb0302885 100644
--- a/test/sql/bind.result
+++ b/test/sql/bind.result
@@ -77,11 +77,11 @@ execute('SELECT * FROM test WHERE id = :value', parameters)
execute('SELECT ?, ?, ?', {1, 2, 3})
---
- metadata:
- - name: '?'
+ - name: COLUMN_1
type: integer
- - name: '?'
+ - name: COLUMN_2
type: integer
- - name: '?'
+ - name: COLUMN_3
type: integer
rows:
- [1, 2, 3]
@@ -107,11 +107,11 @@ parameters[3][':value1'] = 11
execute('SELECT ?, :value1, @value2', parameters)
---
- metadata:
- - name: '?'
+ - name: COLUMN_1
type: integer
- - name: :value1
+ - name: COLUMN_2
type: integer
- - name: '@value2'
+ - name: COLUMN_3
type: integer
rows:
- [10, 11, 12]
@@ -149,22 +149,22 @@ parameters[6]['@value2'] = 6
execute('SELECT :value3, ?, :value1, ?, ?, @value2, ?, :value3', parameters)
---
- metadata:
- - name: :value3
+ - name: COLUMN_1
type: integer
- - name: '?'
+ - name: COLUMN_2
type: integer
- - name: :value1
+ - name: COLUMN_3
type: integer
- - name: '?'
+ - name: COLUMN_4
type: integer
- - name: '?'
+ - name: COLUMN_5
type: integer
- - name: '@value2'
+ - name: COLUMN_6
type: integer
- - name: '?'
+ - name: COLUMN_7
+ type: boolean
+ - name: COLUMN_8
type: boolean
- - name: :value3
- type: integer
rows:
- [1, 2, 3, 4, 5, 6, null, 1]
...
@@ -175,15 +175,15 @@ msgpack = require('msgpack')
execute('SELECT ?, ?, ?, ?, ?', {'abc', -123.456, msgpack.NULL, true, false})
---
- metadata:
- - name: '?'
+ - name: COLUMN_1
type: text
- - name: '?'
+ - name: COLUMN_2
type: numeric
- - name: '?'
+ - name: COLUMN_3
type: boolean
- - name: '?'
+ - name: COLUMN_4
type: boolean
- - name: '?'
+ - name: COLUMN_5
type: boolean
rows:
- ['abc', -123.456, null, true, false]
@@ -290,7 +290,7 @@ execute('SELECT :value', parameters)
execute('SELECT ? ', {18446744073709551615ULL})
---
- metadata:
- - name: '?'
+ - name: COLUMN_1
type: integer
rows:
- [18446744073709551615]
diff --git a/test/sql/boolean.result b/test/sql/boolean.result
index 112e41a12..51ec5820b 100644
--- a/test/sql/boolean.result
+++ b/test/sql/boolean.result
@@ -241,7 +241,7 @@ i > 0
SELECT return_type(a) FROM t;
| ---
| - metadata:
- | - name: return_type(a)
+ | - name: COLUMN_1
| type: string
| rows:
| - ['boolean']
@@ -250,7 +250,7 @@ SELECT return_type(a) FROM t;
SELECT return_type('false');
| ---
| - metadata:
- | - name: return_type('false')
+ | - name: COLUMN_1
| type: string
| rows:
| - ['string']
@@ -258,7 +258,7 @@ SELECT return_type('false');
SELECT is_boolean(a) FROM t LIMIT 1;
| ---
| - metadata:
- | - name: is_boolean(a)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -266,7 +266,7 @@ SELECT is_boolean(a) FROM t LIMIT 1;
SELECT is_boolean('true');
| ---
| - metadata:
- | - name: is_boolean('true')
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -281,7 +281,7 @@ SELECT abs(a) FROM t0;
SELECT lower(a) FROM t0;
| ---
| - metadata:
- | - name: lower(a)
+ | - name: COLUMN_1
| type: string
| rows:
| - ['false']
@@ -292,7 +292,7 @@ SELECT lower(a) FROM t0;
SELECT upper(a) FROM t0;
| ---
| - metadata:
- | - name: upper(a)
+ | - name: COLUMN_1
| type: string
| rows:
| - ['FALSE']
@@ -303,7 +303,7 @@ SELECT upper(a) FROM t0;
SELECT quote(a) FROM t0;
| ---
| - metadata:
- | - name: quote(a)
+ | - name: COLUMN_1
| type: string
| rows:
| - ['FALSE']
@@ -315,7 +315,7 @@ SELECT quote(a) FROM t0;
SELECT length(a) FROM t0;
| ---
| - metadata:
- | - name: length(a)
+ | - name: COLUMN_1
| type: integer
| rows:
| - [5]
@@ -326,7 +326,7 @@ SELECT length(a) FROM t0;
SELECT typeof(a) FROM t0;
| ---
| - metadata:
- | - name: typeof(a)
+ | - name: COLUMN_1
| type: string
| rows:
| - ['boolean']
@@ -344,7 +344,7 @@ SELECT AVG(a) FROM t0;
SELECT MIN(a) FROM t0;
| ---
| - metadata:
- | - name: MIN(a)
+ | - name: COLUMN_1
| type: scalar
| rows:
| - [false]
@@ -352,7 +352,7 @@ SELECT MIN(a) FROM t0;
SELECT MAX(a) FROM t0;
| ---
| - metadata:
- | - name: MAX(a)
+ | - name: COLUMN_1
| type: scalar
| rows:
| - [true]
@@ -365,7 +365,7 @@ SELECT SUM(a) FROM t0;
SELECT COUNT(a) FROM t0;
| ---
| - metadata:
- | - name: COUNT(a)
+ | - name: COLUMN_1
| type: integer
| rows:
| - [2]
@@ -378,7 +378,7 @@ SELECT TOTAL(a) FROM t0;
SELECT GROUP_CONCAT(a, ' +++ ') FROM t0;
| ---
| - metadata:
- | - name: GROUP_CONCAT(a, ' +++ ')
+ | - name: COLUMN_1
| type: string
| rows:
| - ['FALSE +++ TRUE']
@@ -392,13 +392,13 @@ SELECT GROUP_CONCAT(a, ' +++ ') FROM t0;
box.execute('SELECT ?, ?, return_type($1), typeof($2);', {true, false})
| ---
| - metadata:
- | - name: '?'
+ | - name: COLUMN_1
| type: boolean
- | - name: '?'
+ | - name: COLUMN_2
| type: boolean
- | - name: return_type($1)
+ | - name: COLUMN_3
| type: string
- | - name: typeof($2)
+ | - name: COLUMN_4
| type: string
| rows:
| - [true, false, 'boolean', 'boolean']
@@ -422,9 +422,9 @@ parameters[2][':value1'] = false
box.execute('SELECT :value1, @value2;', parameters)
| ---
| - metadata:
- | - name: :value1
+ | - name: COLUMN_1
| type: boolean
- | - name: '@value2'
+ | - name: COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -501,9 +501,9 @@ INSERT INTO t3 VALUES (4, false)
SELECT cast(true AS INTEGER), cast(false AS INTEGER);
| ---
| - metadata:
- | - name: cast(true AS INTEGER)
+ | - name: COLUMN_1
| type: integer
- | - name: cast(false AS INTEGER)
+ | - name: COLUMN_2
| type: integer
| rows:
| - [1, 0]
@@ -511,9 +511,9 @@ SELECT cast(true AS INTEGER), cast(false AS INTEGER);
SELECT cast(true AS NUMBER), cast(false AS NUMBER);
| ---
| - metadata:
- | - name: cast(true AS NUMBER)
+ | - name: COLUMN_1
| type: number
- | - name: cast(false AS NUMBER)
+ | - name: COLUMN_2
| type: number
| rows:
| - [1, 0]
@@ -522,9 +522,9 @@ SELECT cast(true AS NUMBER), cast(false AS NUMBER);
SELECT cast(true AS TEXT), cast(false AS TEXT);
| ---
| - metadata:
- | - name: cast(true AS TEXT)
+ | - name: COLUMN_1
| type: string
- | - name: cast(false AS TEXT)
+ | - name: COLUMN_2
| type: string
| rows:
| - ['TRUE', 'FALSE']
@@ -532,9 +532,9 @@ SELECT cast(true AS TEXT), cast(false AS TEXT);
SELECT cast(true AS BOOLEAN), cast(false AS BOOLEAN);
| ---
| - metadata:
- | - name: cast(true AS BOOLEAN)
+ | - name: COLUMN_1
| type: boolean
- | - name: cast(false AS BOOLEAN)
+ | - name: COLUMN_2
| type: boolean
| rows:
| - [true, false]
@@ -544,11 +544,11 @@ SELECT cast(true AS BOOLEAN), cast(false AS BOOLEAN);
SELECT cast(100 AS BOOLEAN), cast(1 AS BOOLEAN), cast(0 AS BOOLEAN);
| ---
| - metadata:
- | - name: cast(100 AS BOOLEAN)
+ | - name: COLUMN_1
| type: boolean
- | - name: cast(1 AS BOOLEAN)
+ | - name: COLUMN_2
| type: boolean
- | - name: cast(0 AS BOOLEAN)
+ | - name: COLUMN_3
| type: boolean
| rows:
| - [true, true, false]
@@ -556,9 +556,9 @@ SELECT cast(100 AS BOOLEAN), cast(1 AS BOOLEAN), cast(0 AS BOOLEAN);
SELECT cast(0.123 AS BOOLEAN), cast(0.0 AS BOOLEAN);
| ---
| - metadata:
- | - name: cast(0.123 AS BOOLEAN)
+ | - name: COLUMN_1
| type: boolean
- | - name: cast(0.0 AS BOOLEAN)
+ | - name: COLUMN_2
| type: boolean
| rows:
| - [true, false]
@@ -566,9 +566,9 @@ SELECT cast(0.123 AS BOOLEAN), cast(0.0 AS BOOLEAN);
SELECT cast('true' AS BOOLEAN), cast('false' AS BOOLEAN);
| ---
| - metadata:
- | - name: cast('true' AS BOOLEAN)
+ | - name: COLUMN_1
| type: boolean
- | - name: cast('false' AS BOOLEAN)
+ | - name: COLUMN_2
| type: boolean
| rows:
| - [true, false]
@@ -576,9 +576,9 @@ SELECT cast('true' AS BOOLEAN), cast('false' AS BOOLEAN);
SELECT cast('TRUE' AS BOOLEAN), cast('FALSE' AS BOOLEAN);
| ---
| - metadata:
- | - name: cast('TRUE' AS BOOLEAN)
+ | - name: COLUMN_1
| type: boolean
- | - name: cast('FALSE' AS BOOLEAN)
+ | - name: COLUMN_2
| type: boolean
| rows:
| - [true, false]
@@ -887,7 +887,7 @@ SELECT a, COUNT(*) FROM (SELECT * FROM t4 UNION SELECT * FROM t5) GROUP BY a;
| - metadata:
| - name: A
| type: boolean
- | - name: COUNT(*)
+ | - name: COLUMN_1
| type: integer
| rows:
| - [false, 3]
@@ -907,7 +907,7 @@ INSERT INTO t6 VALUES (true, false), (false, true);
SELECT NOT true;
| ---
| - metadata:
- | - name: NOT true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -915,7 +915,7 @@ SELECT NOT true;
SELECT NOT false;
| ---
| - metadata:
- | - name: NOT false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -925,7 +925,7 @@ SELECT a, NOT a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: NOT a
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, true]
@@ -935,7 +935,7 @@ SELECT a, NOT a FROM t;
SELECT true AND true;
| ---
| - metadata:
- | - name: true AND true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -943,7 +943,7 @@ SELECT true AND true;
SELECT true AND false;
| ---
| - metadata:
- | - name: true AND false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -951,7 +951,7 @@ SELECT true AND false;
SELECT false AND true;
| ---
| - metadata:
- | - name: false AND true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -959,7 +959,7 @@ SELECT false AND true;
SELECT false AND false;
| ---
| - metadata:
- | - name: false AND false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -967,7 +967,7 @@ SELECT false AND false;
SELECT true OR true;
| ---
| - metadata:
- | - name: true OR true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -975,7 +975,7 @@ SELECT true OR true;
SELECT true OR false;
| ---
| - metadata:
- | - name: true OR false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -983,7 +983,7 @@ SELECT true OR false;
SELECT false OR true;
| ---
| - metadata:
- | - name: false OR true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -991,7 +991,7 @@ SELECT false OR true;
SELECT false OR false;
| ---
| - metadata:
- | - name: false OR false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -1002,7 +1002,7 @@ SELECT a, true AND a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: true AND a
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -1013,7 +1013,7 @@ SELECT a, false AND a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: false AND a
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -1024,7 +1024,7 @@ SELECT a, true OR a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: true OR a
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, true]
@@ -1035,7 +1035,7 @@ SELECT a, false OR a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: false OR a
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -1046,7 +1046,7 @@ SELECT a, a AND true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a AND true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -1057,7 +1057,7 @@ SELECT a, a AND false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a AND false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -1068,7 +1068,7 @@ SELECT a, a OR true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a OR true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, true]
@@ -1079,7 +1079,7 @@ SELECT a, a OR false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a OR false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -1093,7 +1093,7 @@ SELECT a, a1, a AND a1 FROM t, t6;
| type: boolean
| - name: A1
| type: boolean
- | - name: a AND a1
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false, false]
@@ -1108,7 +1108,7 @@ SELECT a, a1, a OR a1 FROM t, t6;
| type: boolean
| - name: A1
| type: boolean
- | - name: a OR a1
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false, false]
@@ -1622,7 +1622,7 @@ SELECT a1, a2, a2 || a2 FROM t6;
SELECT true > true;
| ---
| - metadata:
- | - name: true > true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -1630,7 +1630,7 @@ SELECT true > true;
SELECT true > false;
| ---
| - metadata:
- | - name: true > false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -1638,7 +1638,7 @@ SELECT true > false;
SELECT false > true;
| ---
| - metadata:
- | - name: false > true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -1646,7 +1646,7 @@ SELECT false > true;
SELECT false > false;
| ---
| - metadata:
- | - name: false > false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -1654,7 +1654,7 @@ SELECT false > false;
SELECT true < true;
| ---
| - metadata:
- | - name: true < true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -1662,7 +1662,7 @@ SELECT true < true;
SELECT true < false;
| ---
| - metadata:
- | - name: true < false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -1670,7 +1670,7 @@ SELECT true < false;
SELECT false < true;
| ---
| - metadata:
- | - name: false < true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -1678,7 +1678,7 @@ SELECT false < true;
SELECT false < false;
| ---
| - metadata:
- | - name: false < false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -1689,7 +1689,7 @@ SELECT a, true > a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: true > a
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, true]
@@ -1700,7 +1700,7 @@ SELECT a, false > a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: false > a
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -1711,7 +1711,7 @@ SELECT a, true < a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: true < a
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -1722,7 +1722,7 @@ SELECT a, false < a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: false < a
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -1733,7 +1733,7 @@ SELECT a, a > true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a > true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -1744,7 +1744,7 @@ SELECT a, a > false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a > false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -1755,7 +1755,7 @@ SELECT a, a < true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a < true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, true]
@@ -1766,7 +1766,7 @@ SELECT a, a < false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a < false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -1780,7 +1780,7 @@ SELECT a, a1, a > a1 FROM t, t6;
| type: boolean
| - name: A1
| type: boolean
- | - name: a > a1
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false, false]
@@ -1795,7 +1795,7 @@ SELECT a, a1, a < a1 FROM t, t6;
| type: boolean
| - name: A1
| type: boolean
- | - name: a < a1
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false, false]
@@ -1807,7 +1807,7 @@ SELECT a, a1, a < a1 FROM t, t6;
SELECT true >= true;
| ---
| - metadata:
- | - name: true >= true
+ | - name: COLUMN_1
| type: any
| rows:
| - [true]
@@ -1815,7 +1815,7 @@ SELECT true >= true;
SELECT true >= false;
| ---
| - metadata:
- | - name: true >= false
+ | - name: COLUMN_1
| type: any
| rows:
| - [true]
@@ -1823,7 +1823,7 @@ SELECT true >= false;
SELECT false >= true;
| ---
| - metadata:
- | - name: false >= true
+ | - name: COLUMN_1
| type: any
| rows:
| - [false]
@@ -1831,7 +1831,7 @@ SELECT false >= true;
SELECT false >= false;
| ---
| - metadata:
- | - name: false >= false
+ | - name: COLUMN_1
| type: any
| rows:
| - [true]
@@ -1839,7 +1839,7 @@ SELECT false >= false;
SELECT true <= true;
| ---
| - metadata:
- | - name: true <= true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -1847,7 +1847,7 @@ SELECT true <= true;
SELECT true <= false;
| ---
| - metadata:
- | - name: true <= false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -1855,7 +1855,7 @@ SELECT true <= false;
SELECT false <= true;
| ---
| - metadata:
- | - name: false <= true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -1863,7 +1863,7 @@ SELECT false <= true;
SELECT false <= false;
| ---
| - metadata:
- | - name: false <= false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -1874,7 +1874,7 @@ SELECT a, true >= a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: true >= a
+ | - name: COLUMN_1
| type: any
| rows:
| - [false, true]
@@ -1885,7 +1885,7 @@ SELECT a, false >= a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: false >= a
+ | - name: COLUMN_1
| type: any
| rows:
| - [false, true]
@@ -1896,7 +1896,7 @@ SELECT a, true <= a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: true <= a
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -1907,7 +1907,7 @@ SELECT a, false <= a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: false <= a
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, true]
@@ -1918,7 +1918,7 @@ SELECT a, a >= true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a >= true
+ | - name: COLUMN_1
| type: any
| rows:
| - [false, false]
@@ -1929,7 +1929,7 @@ SELECT a, a >= false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a >= false
+ | - name: COLUMN_1
| type: any
| rows:
| - [false, true]
@@ -1940,7 +1940,7 @@ SELECT a, a <= true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a <= true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, true]
@@ -1951,7 +1951,7 @@ SELECT a, a <= false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a <= false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, true]
@@ -1965,7 +1965,7 @@ SELECT a, a1, a >= a1 FROM t, t6;
| type: boolean
| - name: A1
| type: boolean
- | - name: a >= a1
+ | - name: COLUMN_1
| type: any
| rows:
| - [false, false, true]
@@ -1980,7 +1980,7 @@ SELECT a, a1, a <= a1 FROM t, t6;
| type: boolean
| - name: A1
| type: boolean
- | - name: a <= a1
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false, true]
@@ -1992,7 +1992,7 @@ SELECT a, a1, a <= a1 FROM t, t6;
SELECT true == true;
| ---
| - metadata:
- | - name: true == true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2000,7 +2000,7 @@ SELECT true == true;
SELECT true == false;
| ---
| - metadata:
- | - name: true == false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2008,7 +2008,7 @@ SELECT true == false;
SELECT false == true;
| ---
| - metadata:
- | - name: false == true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2016,7 +2016,7 @@ SELECT false == true;
SELECT false == false;
| ---
| - metadata:
- | - name: false == false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2024,7 +2024,7 @@ SELECT false == false;
SELECT true != true;
| ---
| - metadata:
- | - name: true != true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2032,7 +2032,7 @@ SELECT true != true;
SELECT true != false;
| ---
| - metadata:
- | - name: true != false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2040,7 +2040,7 @@ SELECT true != false;
SELECT false != true;
| ---
| - metadata:
- | - name: false != true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2048,7 +2048,7 @@ SELECT false != true;
SELECT false != false;
| ---
| - metadata:
- | - name: false != false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2059,7 +2059,7 @@ SELECT a, true == a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: true == a
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -2070,7 +2070,7 @@ SELECT a, false == a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: false == a
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, true]
@@ -2081,7 +2081,7 @@ SELECT a, true != a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: true != a
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, true]
@@ -2092,7 +2092,7 @@ SELECT a, false != a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: false != a
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -2103,7 +2103,7 @@ SELECT a, a == true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a == true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -2114,7 +2114,7 @@ SELECT a, a == false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a == false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, true]
@@ -2125,7 +2125,7 @@ SELECT a, a != true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a != true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, true]
@@ -2136,7 +2136,7 @@ SELECT a, a != false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a != false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -2150,7 +2150,7 @@ SELECT a, a1, a == a1 FROM t, t6;
| type: boolean
| - name: A1
| type: boolean
- | - name: a == a1
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false, true]
@@ -2165,7 +2165,7 @@ SELECT a, a1, a != a1 FROM t, t6;
| type: boolean
| - name: A1
| type: boolean
- | - name: a != a1
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false, false]
@@ -2177,7 +2177,7 @@ SELECT a, a1, a != a1 FROM t, t6;
SELECT true IN (true);
| ---
| - metadata:
- | - name: true IN (true)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2185,7 +2185,7 @@ SELECT true IN (true);
SELECT false IN (true);
| ---
| - metadata:
- | - name: false IN (true)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2193,7 +2193,7 @@ SELECT false IN (true);
SELECT true IN (false);
| ---
| - metadata:
- | - name: true IN (false)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2201,7 +2201,7 @@ SELECT true IN (false);
SELECT false IN (false);
| ---
| - metadata:
- | - name: false IN (false)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2209,7 +2209,7 @@ SELECT false IN (false);
SELECT true IN (true, false);
| ---
| - metadata:
- | - name: true IN (true, false)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2217,7 +2217,7 @@ SELECT true IN (true, false);
SELECT false IN (true, false);
| ---
| - metadata:
- | - name: false IN (true, false)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2225,7 +2225,7 @@ SELECT false IN (true, false);
SELECT true IN (SELECT a1 FROM t6);
| ---
| - metadata:
- | - name: true IN (SELECT a1 FROM t6)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2233,7 +2233,7 @@ SELECT true IN (SELECT a1 FROM t6);
SELECT false IN (SELECT a1 FROM t6);
| ---
| - metadata:
- | - name: false IN (SELECT a1 FROM t6)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2241,7 +2241,7 @@ SELECT false IN (SELECT a1 FROM t6);
SELECT true IN (SELECT a1 FROM t6 LIMIT 1);
| ---
| - metadata:
- | - name: true IN (SELECT a1 FROM t6 LIMIT 1)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2249,7 +2249,7 @@ SELECT true IN (SELECT a1 FROM t6 LIMIT 1);
SELECT false IN (SELECT a1 FROM t6 LIMIT 1);
| ---
| - metadata:
- | - name: false IN (SELECT a1 FROM t6 LIMIT 1)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2257,7 +2257,7 @@ SELECT false IN (SELECT a1 FROM t6 LIMIT 1);
SELECT true IN (1, 1.2, 'true', false);
| ---
| - metadata:
- | - name: true IN (1, 1.2, 'true', false)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2265,7 +2265,7 @@ SELECT true IN (1, 1.2, 'true', false);
SELECT false IN (1, 1.2, 'true', false);
| ---
| - metadata:
- | - name: false IN (1, 1.2, 'true', false)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2276,7 +2276,7 @@ SELECT a, a IN (true) FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a IN (true)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -2287,7 +2287,7 @@ SELECT a, a IN (false) FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a IN (false)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, true]
@@ -2298,7 +2298,7 @@ SELECT a, a IN (true, false) FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a IN (true, false)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, true]
@@ -2309,7 +2309,7 @@ SELECT a, a IN (SELECT a1 FROM t6 LIMIT 1) FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a IN (SELECT a1 FROM t6 LIMIT 1)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, true]
@@ -2320,7 +2320,7 @@ SELECT a, a IN (SELECT a1 FROM t6) FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a IN (SELECT a1 FROM t6)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, true]
@@ -2331,7 +2331,7 @@ SELECT a, a IN (1, 1.2, 'true', false) FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a IN (1, 1.2, 'true', false)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, true]
@@ -2341,7 +2341,7 @@ SELECT a, a IN (1, 1.2, 'true', false) FROM t;
SELECT true BETWEEN true AND true;
| ---
| - metadata:
- | - name: true BETWEEN true AND true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2349,7 +2349,7 @@ SELECT true BETWEEN true AND true;
SELECT false BETWEEN true AND true;
| ---
| - metadata:
- | - name: false BETWEEN true AND true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2357,7 +2357,7 @@ SELECT false BETWEEN true AND true;
SELECT true BETWEEN false AND false;
| ---
| - metadata:
- | - name: true BETWEEN false AND false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2365,7 +2365,7 @@ SELECT true BETWEEN false AND false;
SELECT false BETWEEN false AND false;
| ---
| - metadata:
- | - name: false BETWEEN false AND false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2373,7 +2373,7 @@ SELECT false BETWEEN false AND false;
SELECT true BETWEEN true AND false;
| ---
| - metadata:
- | - name: true BETWEEN true AND false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2381,7 +2381,7 @@ SELECT true BETWEEN true AND false;
SELECT false BETWEEN true AND false;
| ---
| - metadata:
- | - name: false BETWEEN true AND false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2389,7 +2389,7 @@ SELECT false BETWEEN true AND false;
SELECT true BETWEEN false AND true;
| ---
| - metadata:
- | - name: true BETWEEN false AND true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2397,7 +2397,7 @@ SELECT true BETWEEN false AND true;
SELECT false BETWEEN false AND true;
| ---
| - metadata:
- | - name: false BETWEEN false AND true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2408,7 +2408,7 @@ SELECT a, a BETWEEN true AND true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a BETWEEN true AND true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -2419,7 +2419,7 @@ SELECT a, a BETWEEN false AND false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a BETWEEN false AND false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, true]
@@ -2430,7 +2430,7 @@ SELECT a, a BETWEEN true AND false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a BETWEEN true AND false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -2441,7 +2441,7 @@ SELECT a, a BETWEEN false AND true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a BETWEEN false AND true
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, true]
@@ -2466,7 +2466,7 @@ SELECT true AND 2;
SELECT false AND 2;
| ---
| - metadata:
- | - name: false AND 2
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2489,7 +2489,7 @@ SELECT 2 AND true;
SELECT 2 AND false;
| ---
| - metadata:
- | - name: 2 AND false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2556,7 +2556,7 @@ SELECT b, false AND b FROM t7;
| - metadata:
| - name: B
| type: integer
- | - name: false AND b
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [123, false]
@@ -2581,7 +2581,7 @@ SELECT b, b AND false FROM t7;
| - metadata:
| - name: B
| type: integer
- | - name: b AND false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [123, false]
@@ -3861,7 +3861,7 @@ SELECT a2, b, b != a2 FROM t6, t7;
SELECT true IN (0, 1, 2, 3);
| ---
| - metadata:
- | - name: true IN (0, 1, 2, 3)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -3869,7 +3869,7 @@ SELECT true IN (0, 1, 2, 3);
SELECT false IN (0, 1, 2, 3);
| ---
| - metadata:
- | - name: false IN (0, 1, 2, 3)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -3889,7 +3889,7 @@ SELECT a1, a1 IN (0, 1, 2, 3) FROM t6
| - metadata:
| - name: A1
| type: boolean
- | - name: a1 IN (0, 1, 2, 3)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false, false]
@@ -3935,7 +3935,7 @@ SELECT true AND 2.3;
SELECT false AND 2.3;
| ---
| - metadata:
- | - name: false AND 2.3
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -3958,7 +3958,7 @@ SELECT 2.3 AND true;
SELECT 2.3 AND false;
| ---
| - metadata:
- | - name: 2.3 AND false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -4025,7 +4025,7 @@ SELECT c, false AND c FROM t8;
| - metadata:
| - name: C
| type: number
- | - name: false AND c
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [4.56, false]
@@ -4050,7 +4050,7 @@ SELECT c, c AND false FROM t8;
| - metadata:
| - name: C
| type: number
- | - name: c AND false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [4.56, false]
@@ -5006,7 +5006,7 @@ SELECT a2, c, c != a2 FROM t6, t8;
SELECT true IN (0.1, 1.2, 2.3, 3.4);
| ---
| - metadata:
- | - name: true IN (0.1, 1.2, 2.3, 3.4)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5014,7 +5014,7 @@ SELECT true IN (0.1, 1.2, 2.3, 3.4);
SELECT false IN (0.1, 1.2, 2.3, 3.4);
| ---
| - metadata:
- | - name: false IN (0.1, 1.2, 2.3, 3.4)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5022,7 +5022,7 @@ SELECT false IN (0.1, 1.2, 2.3, 3.4);
SELECT a1 IN (0.1, 1.2, 2.3, 3.4) FROM t6 LIMIT 1;
| ---
| - metadata:
- | - name: a1 IN (0.1, 1.2, 2.3, 3.4)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5030,7 +5030,7 @@ SELECT a1 IN (0.1, 1.2, 2.3, 3.4) FROM t6 LIMIT 1;
SELECT a2 IN (0.1, 1.2, 2.3, 3.4) FROM t6 LIMIT 1;
| ---
| - metadata:
- | - name: a2 IN (0.1, 1.2, 2.3, 3.4)
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5095,7 +5095,7 @@ SELECT true AND 'abc';
SELECT false AND 'abc';
| ---
| - metadata:
- | - name: false AND 'abc'
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5118,7 +5118,7 @@ SELECT 'abc' AND true;
SELECT 'abc' AND false;
| ---
| - metadata:
- | - name: '''abc'' AND false'
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5185,7 +5185,7 @@ SELECT d, false AND d FROM t9;
| - metadata:
| - name: D
| type: string
- | - name: false AND d
+ | - name: COLUMN_1
| type: boolean
| rows:
| - ['AsdF', false]
@@ -5210,7 +5210,7 @@ SELECT d, d AND false FROM t9;
| - metadata:
| - name: D
| type: string
- | - name: d AND false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - ['AsdF', false]
@@ -5470,7 +5470,7 @@ SELECT true AND 'TRUE';
SELECT false AND 'TRUE';
| ---
| - metadata:
- | - name: false AND 'TRUE'
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5493,7 +5493,7 @@ SELECT 'TRUE' AND true;
SELECT 'TRUE' AND false;
| ---
| - metadata:
- | - name: '''TRUE'' AND false'
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5560,7 +5560,7 @@ SELECT d, false AND d FROM t9 WHERE d = 'TRUE';
| - metadata:
| - name: D
| type: string
- | - name: false AND d
+ | - name: COLUMN_1
| type: boolean
| rows:
| - ['TRUE', false]
@@ -5585,7 +5585,7 @@ SELECT d, d AND false FROM t9 WHERE d = 'TRUE';
| - metadata:
| - name: D
| type: string
- | - name: d AND false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - ['TRUE', false]
@@ -5650,7 +5650,7 @@ SELECT true AND 'true';
SELECT false AND 'true';
| ---
| - metadata:
- | - name: false AND 'true'
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5673,7 +5673,7 @@ SELECT 'true' AND true;
SELECT 'true' AND false;
| ---
| - metadata:
- | - name: '''true'' AND false'
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5740,7 +5740,7 @@ SELECT d, false AND d FROM t9 WHERE d = 'true';
| - metadata:
| - name: D
| type: string
- | - name: false AND d
+ | - name: COLUMN_1
| type: boolean
| rows:
| - ['true', false]
@@ -5765,7 +5765,7 @@ SELECT d, d AND false FROM t9 WHERE d = 'true';
| - metadata:
| - name: D
| type: string
- | - name: d AND false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - ['true', false]
@@ -5830,7 +5830,7 @@ SELECT true AND 'FALSE';
SELECT false AND 'FALSE';
| ---
| - metadata:
- | - name: false AND 'FALSE'
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5853,7 +5853,7 @@ SELECT 'FALSE' AND true;
SELECT 'FALSE' AND false;
| ---
| - metadata:
- | - name: '''FALSE'' AND false'
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5920,7 +5920,7 @@ SELECT d, false AND d FROM t9 WHERE d = 'FALSE';
| - metadata:
| - name: D
| type: string
- | - name: false AND d
+ | - name: COLUMN_1
| type: boolean
| rows:
| - ['FALSE', false]
@@ -5945,7 +5945,7 @@ SELECT d, d AND false FROM t9 WHERE d = 'FALSE';
| - metadata:
| - name: D
| type: string
- | - name: d AND false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - ['FALSE', false]
@@ -6010,7 +6010,7 @@ SELECT true AND 'false';
SELECT false AND 'false';
| ---
| - metadata:
- | - name: false AND 'false'
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -6033,7 +6033,7 @@ SELECT 'false' AND true;
SELECT 'false' AND false;
| ---
| - metadata:
- | - name: '''false'' AND false'
+ | - name: COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -6100,7 +6100,7 @@ SELECT d, false AND d FROM t9 WHERE d = 'false';
| - metadata:
| - name: D
| type: string
- | - name: false AND d
+ | - name: COLUMN_1
| type: boolean
| rows:
| - ['false', false]
@@ -6125,7 +6125,7 @@ SELECT d, d AND false FROM t9 WHERE d = 'false';
| - metadata:
| - name: D
| type: string
- | - name: d AND false
+ | - name: COLUMN_1
| type: boolean
| rows:
| - ['false', false]
diff --git a/test/sql/collation.result b/test/sql/collation.result
index 4e4c27ef0..ea39b0294 100644
--- a/test/sql/collation.result
+++ b/test/sql/collation.result
@@ -111,7 +111,7 @@ box.execute([[SELECT descriptor, upper(letter), letter FROM tu where UPPER(lette
- metadata:
- name: DESCRIPTOR
type: string
- - name: upper(letter)
+ - name: COLUMN_1
type: string
- name: LETTER
type: string
@@ -124,7 +124,7 @@ box.execute([[SELECT descriptor, upper(letter COLLATE "GERMAN"), letter FROM tu
- metadata:
- name: DESCRIPTOR
type: string
- - name: upper(letter COLLATE "GERMAN")
+ - name: COLUMN_1
type: string
- name: LETTER
type: string
@@ -335,14 +335,14 @@ box.execute("SELECT a FROM t UNION SELECT c FROM t;")
box.execute("SELECT c COLLATE \"binary\" FROM t UNION SELECT a FROM t;")
---
- metadata:
- - name: c COLLATE "binary"
+ - name: C
type: string
rows: []
...
box.execute("SELECT b COLLATE \"unicode\" FROM t UNION SELECT a FROM t;")
---
- metadata:
- - name: b COLLATE "unicode"
+ - name: B
type: string
rows: []
...
@@ -1128,7 +1128,7 @@ box.execute("INSERT INTO jj VALUES (1,'A'), (2,'a')")
box.execute("SELECT DISTINCT trim(s2) FROM jj;")
---
- metadata:
- - name: trim(s2)
+ - name: COLUMN_1
type: string
rows:
- ['A']
@@ -1140,7 +1140,7 @@ box.execute("INSERT INTO jj VALUES (3, 'aS'), (4, 'AS');")
box.execute("SELECT DISTINCT replace(s2, 'S', 's') FROM jj;")
---
- metadata:
- - name: replace(s2, 'S', 's')
+ - name: COLUMN_1
type: string
rows:
- ['A']
@@ -1149,7 +1149,7 @@ box.execute("SELECT DISTINCT replace(s2, 'S', 's') FROM jj;")
box.execute("SELECT DISTINCT substr(s2, 1, 1) FROM jj;")
---
- metadata:
- - name: substr(s2, 1, 1)
+ - name: COLUMN_1
type: string
rows:
- ['A']
diff --git a/test/sql/errinj.result b/test/sql/errinj.result
index 68c001f28..f19203bc6 100644
--- a/test/sql/errinj.result
+++ b/test/sql/errinj.result
@@ -120,7 +120,7 @@ insert_res
select_res
---
- metadata:
- - name: '1'
+ - name: COLUMN_1
type: integer
rows:
- [1]
diff --git a/test/sql/foreign-keys.result b/test/sql/foreign-keys.result
index f1d973443..33689a06e 100644
--- a/test/sql/foreign-keys.result
+++ b/test/sql/foreign-keys.result
@@ -357,7 +357,7 @@ box.execute('ALTER TABLE tc ADD CONSTRAINT fk1 FOREIGN KEY (id) REFERENCES tp(id
box.execute('SELECT row_count();')
---
- metadata:
- - name: row_count()
+ - name: COLUMN_1
type: integer
rows:
- [1]
@@ -374,7 +374,7 @@ box.execute('ALTER TABLE tc DROP CONSTRAINT fk1;')
box.execute('SELECT row_count();')
---
- metadata:
- - name: row_count()
+ - name: COLUMN_1
type: integer
rows:
- [1]
diff --git a/test/sql/full_metadata.result b/test/sql/full_metadata.result
index 5a93c41ec..d8b7e59e6 100644
--- a/test/sql/full_metadata.result
+++ b/test/sql/full_metadata.result
@@ -57,7 +57,7 @@ execute("SELECT 'aSd' COLLATE \"unicode_ci\";")
| - metadata:
| - type: string
| span: '''aSd'' COLLATE "unicode_ci"'
- | name: '''aSd'' COLLATE "unicode_ci"'
+ | name: COLUMN_1
| collation: unicode_ci
| rows:
| - ['aSd']
@@ -65,7 +65,7 @@ execute("SELECT 'aSd' COLLATE \"unicode_ci\";")
execute("SELECT c FROM t;")
| ---
| - metadata:
- | - span: C
+ | - span: c
| type: string
| is_nullable: true
| name: C
@@ -76,9 +76,10 @@ execute("SELECT c FROM t;")
execute("SELECT c COLLATE \"unicode\" FROM t;")
| ---
| - metadata:
- | - type: string
- | span: c COLLATE "unicode"
- | name: c COLLATE "unicode"
+ | - span: c COLLATE "unicode"
+ | type: string
+ | is_nullable: true
+ | name: C
| collation: unicode
| rows:
| - ['aSd']
@@ -89,16 +90,16 @@ execute("SELECT c COLLATE \"unicode\" FROM t;")
execute("SELECT id, a, c FROM t;")
| ---
| - metadata:
- | - span: ID
+ | - span: id
| type: integer
| is_autoincrement: true
| name: ID
| is_nullable: false
| - type: integer
- | span: A
+ | span: a
| name: A
| is_nullable: false
- | - span: C
+ | - span: c
| type: string
| is_nullable: true
| name: C
@@ -165,7 +166,7 @@ execute("SELECT *, id + 1 AS x, a AS y, c || 'abc' FROM t;")
| is_nullable: false
| - type: string
| span: c || 'abc'
- | name: c || 'abc'
+ | name: COLUMN_1
| rows:
| - [1, 1, 'aSd', 2, 1, 'aSdabc']
| ...
@@ -185,8 +186,8 @@ execute("SELECT * FROM v;")
| name: Y
| is_nullable: false
| - type: string
- | span: c || 'abc'
- | name: c || 'abc'
+ | span: COLUMN_1
+ | name: COLUMN_1
| rows:
| - [2, 1, 'aSdabc']
| ...
diff --git a/test/sql/func-recreate.result b/test/sql/func-recreate.result
index 3709df787..5fd2b79c0 100644
--- a/test/sql/func-recreate.result
+++ b/test/sql/func-recreate.result
@@ -48,7 +48,7 @@ test_run:cmd("setopt delimiter ''");
ch:get()
---
- metadata:
- - name: WAITFOR(0.2)
+ - name: COLUMN_1
type: number
rows:
- [0.2]
diff --git a/test/sql/gh-3199-no-mem-leaks.result b/test/sql/gh-3199-no-mem-leaks.result
index d8590779a..6ce8df436 100644
--- a/test/sql/gh-3199-no-mem-leaks.result
+++ b/test/sql/gh-3199-no-mem-leaks.result
@@ -32,7 +32,7 @@ box.execute('SELECT x, y, x + y FROM test ORDER BY y')
type: integer
- name: Y
type: integer
- - name: x + y
+ - name: COLUMN_1
type: integer
rows:
- [1, 1, 2]
@@ -49,7 +49,7 @@ box.execute('SELECT x, y, x + y FROM test ORDER BY y')
type: integer
- name: Y
type: integer
- - name: x + y
+ - name: COLUMN_1
type: integer
rows:
- [1, 1, 2]
@@ -62,7 +62,7 @@ box.execute('SELECT x, y, x + y FROM test ORDER BY y')
type: integer
- name: Y
type: integer
- - name: x + y
+ - name: COLUMN_1
type: integer
rows:
- [1, 1, 2]
@@ -75,7 +75,7 @@ box.execute('SELECT x, y, x + y FROM test ORDER BY y')
type: integer
- name: Y
type: integer
- - name: x + y
+ - name: COLUMN_1
type: integer
rows:
- [1, 1, 2]
@@ -88,7 +88,7 @@ box.execute('SELECT x, y, x + y FROM test ORDER BY y')
type: integer
- name: Y
type: integer
- - name: x + y
+ - name: COLUMN_1
type: integer
rows:
- [1, 1, 2]
@@ -115,7 +115,7 @@ box.execute('SELECT a, id + 2, b FROM test2 WHERE b < id * 2 ORDER BY a ')
- metadata:
- name: A
type: string
- - name: id + 2
+ - name: COLUMN_1
type: integer
- name: B
type: integer
@@ -134,7 +134,7 @@ box.execute('SELECT a, id + 2 * b, a FROM test2 WHERE b < id * 2 ORDER BY a ')
- metadata:
- name: A
type: string
- - name: id + 2 * b
+ - name: COLUMN_1
type: integer
- name: A
type: string
@@ -149,7 +149,7 @@ box.execute('SELECT a, id + 2 * b, a FROM test2 WHERE b < id * 2 ORDER BY a ')
- metadata:
- name: A
type: string
- - name: id + 2 * b
+ - name: COLUMN_1
type: integer
- name: A
type: string
@@ -164,7 +164,7 @@ box.execute('SELECT a, id + 2 * b, a FROM test2 WHERE b < id * 2 ORDER BY a ')
- metadata:
- name: A
type: string
- - name: id + 2 * b
+ - name: COLUMN_1
type: integer
- name: A
type: string
@@ -183,7 +183,7 @@ box.execute('SELECT x, y + 3 * b, b FROM test2, test WHERE b = x')
- metadata:
- name: X
type: integer
- - name: y + 3 * b
+ - name: COLUMN_1
type: integer
- name: B
type: integer
@@ -196,7 +196,7 @@ box.execute('SELECT x, y + 3 * b, b FROM test2, test WHERE b = x')
- metadata:
- name: X
type: integer
- - name: y + 3 * b
+ - name: COLUMN_1
type: integer
- name: B
type: integer
@@ -209,7 +209,7 @@ box.execute('SELECT x, y + 3 * b, b FROM test2, test WHERE b = x')
- metadata:
- name: X
type: integer
- - name: y + 3 * b
+ - name: COLUMN_1
type: integer
- name: B
type: integer
diff --git a/test/sql/gh-3888-values-blob-assert.result b/test/sql/gh-3888-values-blob-assert.result
index 0a1af28f2..669f2eb2f 100644
--- a/test/sql/gh-3888-values-blob-assert.result
+++ b/test/sql/gh-3888-values-blob-assert.result
@@ -51,7 +51,7 @@ box.execute('SELECT TheColumnName')
box.execute('VALUES(-0.5e-2)')
---
- metadata:
- - name: column1
+ - name: COLUMN_1
type: double
rows:
- [-0.005]
@@ -59,7 +59,7 @@ box.execute('VALUES(-0.5e-2)')
box.execute('SELECT X\'507265766564\'')
---
- metadata:
- - name: X'507265766564'
+ - name: COLUMN_1
type: varbinary
rows:
- ['Preved']
@@ -68,7 +68,7 @@ box.execute('SELECT X\'507265766564\'')
box.execute('SELECT 3.14')
---
- metadata:
- - name: '3.14'
+ - name: COLUMN_1
type: double
rows:
- [3.14]
@@ -76,7 +76,7 @@ box.execute('SELECT 3.14')
box.execute('SELECT X\'4D6564766564\'')
---
- metadata:
- - name: X'4D6564766564'
+ - name: COLUMN_1
type: varbinary
rows:
- ['Medved']
diff --git a/test/sql/icu-upper-lower.result b/test/sql/icu-upper-lower.result
index f7b9dfa38..3ecc07d94 100644
--- a/test/sql/icu-upper-lower.result
+++ b/test/sql/icu-upper-lower.result
@@ -23,11 +23,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Zəfər, jaketini də, papağını da götür, bu axşam hava çox soyuq
- olacaq. ')
+ - name: COLUMN_1
type: string
- - name: upper(' Zəfər, jaketini də, papağını da götür, bu axşam hava çox soyuq
- olacaq. ')
+ - name: COLUMN_2
type: string
rows:
- [' zəfər, jaketini də, papağını da götür, bu axşam hava çox soyuq olacaq. ',
@@ -38,9 +36,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' The quick brown fox jumps over the lazy dog. ')
+ - name: COLUMN_1
type: string
- - name: upper(' The quick brown fox jumps over the lazy dog. ')
+ - name: COLUMN_2
type: string
rows:
- [' the quick brown fox jumps over the lazy dog. ', ' THE QUICK BROWN FOX
@@ -52,9 +50,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' The quick brown fox jumps over the lazy dog. ')
+ - name: COLUMN_1
type: string
- - name: upper(' The quick brown fox jumps over the lazy dog. ')
+ - name: COLUMN_2
type: string
rows:
- [' the quick brown fox jumps over the lazy dog. ', ' THE QUICK BROWN FOX
@@ -66,11 +64,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Բել դղյակի ձախ ժամն օֆ ազգությանը ցպահանջ չճշտած վնաս էր եւ
- փառք ')
+ - name: COLUMN_1
type: string
- - name: upper(' Բել դղյակի ձախ ժամն օֆ ազգությանը ցպահանջ չճշտած վնաս էր եւ
- փառք ')
+ - name: COLUMN_2
type: string
rows:
- [' բել դղյակի ձախ ժամն օֆ ազգությանը ցպահանջ չճշտած վնաս էր եւ փառք ', ' ԲԵԼ
@@ -82,11 +78,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' У Іўі худы жвавы чорт у зялёнай камізэльцы пабег пад’есці фаршу
- з юшкай ')
+ - name: COLUMN_1
type: string
- - name: upper(' У Іўі худы жвавы чорт у зялёнай камізэльцы пабег пад’есці фаршу
- з юшкай ')
+ - name: COLUMN_2
type: string
rows:
- [' у іўі худы жвавы чорт у зялёнай камізэльцы пабег пад’есці фаршу з юшкай ',
@@ -98,11 +92,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Τάχιστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός
- ')
+ - name: COLUMN_1
type: string
- - name: upper(' Τάχιστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός
- ')
+ - name: COLUMN_2
type: string
rows:
- [' τάχιστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός ', ' ΤΆΧΙΣΤΗ
@@ -114,11 +106,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Chuaigh bé mhórshách le dlúthspád fíorfhinn trí hata mo dhea-phorcáin
- bhig ')
+ - name: COLUMN_1
type: string
- - name: upper(' Chuaigh bé mhórshách le dlúthspád fíorfhinn trí hata mo dhea-phorcáin
- bhig ')
+ - name: COLUMN_2
type: string
rows:
- [' chuaigh bé mhórshách le dlúthspád fíorfhinn trí hata mo dhea-phorcáin bhig ',
@@ -130,9 +120,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Quiere la boca exhausta vid, kiwi, piña y fugaz jamón ')
+ - name: COLUMN_1
type: string
- - name: upper(' Quiere la boca exhausta vid, kiwi, piña y fugaz jamón ')
+ - name: COLUMN_2
type: string
rows:
- [' quiere la boca exhausta vid, kiwi, piña y fugaz jamón ', ' QUIERE LA
@@ -144,9 +134,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' 키스의 고유조건은 입술끼리 만나야 하고 특별한 기술은 필요치 않다 ')
+ - name: COLUMN_1
type: string
- - name: upper(' 키스의 고유조건은 입술끼리 만나야 하고 특별한 기술은 필요치 않다 ')
+ - name: COLUMN_2
type: string
rows:
- [' 키스의 고유조건은 입술끼리 만나야 하고 특별한 기술은 필요치 않다 ', ' 키스의 고유조건은 입술끼리 만나야 하고 특별한
@@ -158,9 +148,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Glāžšķūņa rūķīši dzērumā čiepj Baha koncertflīģeļu vākus ')
+ - name: COLUMN_1
type: string
- - name: upper(' Glāžšķūņa rūķīši dzērumā čiepj Baha koncertflīģeļu vākus ')
+ - name: COLUMN_2
type: string
rows:
- [' glāžšķūņa rūķīši dzērumā čiepj baha koncertflīģeļu vākus ', ' GLĀŽŠĶŪŅA
@@ -172,11 +162,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Zwölf große Boxkämpfer jagen Viktor quer über den Sylter Deich
- ')
+ - name: COLUMN_1
type: string
- - name: upper(' Zwölf große Boxkämpfer jagen Viktor quer über den Sylter Deich
- ')
+ - name: COLUMN_2
type: string
rows:
- [' zwölf große boxkämpfer jagen viktor quer über den sylter deich ', ' ZWÖLF
@@ -188,9 +176,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Pchnąć w tę łódź jeża lub ośm skrzyń fig. ')
+ - name: COLUMN_1
type: string
- - name: upper(' Pchnąć w tę łódź jeża lub ośm skrzyń fig. ')
+ - name: COLUMN_2
type: string
rows:
- [' pchnąć w tę łódź jeża lub ośm skrzyń fig. ', ' PCHNĄĆ W TĘ ŁÓDŹ JEŻA
@@ -202,9 +190,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Чуєш їх, доцю, га? Кумедна ж ти, прощайся без ґольфів! ')
+ - name: COLUMN_1
type: string
- - name: upper(' Чуєш їх, доцю, га? Кумедна ж ти, прощайся без ґольфів! ')
+ - name: COLUMN_2
type: string
rows:
- [' чуєш їх, доцю, га? кумедна ж ти, прощайся без ґольфів! ', ' ЧУЄШ ЇХ,
@@ -216,9 +204,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Příliš žluťoučký kůň úpěl ďábelské ódy ')
+ - name: COLUMN_1
type: string
- - name: upper(' Příliš žluťoučký kůň úpěl ďábelské ódy ')
+ - name: COLUMN_2
type: string
rows:
- [' příliš žluťoučký kůň úpěl ďábelské ódy ', ' PŘÍLIŠ ŽLUŤOUČKÝ KŮŇ ÚPĚL
@@ -230,11 +218,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Laŭ Ludoviko Zamenhof bongustas freŝa ĉeĥa manĝaĵo kun spicoj
- ')
+ - name: COLUMN_1
type: string
- - name: upper(' Laŭ Ludoviko Zamenhof bongustas freŝa ĉeĥa manĝaĵo kun spicoj
- ')
+ - name: COLUMN_2
type: string
rows:
- [' laŭ ludoviko zamenhof bongustas freŝa ĉeĥa manĝaĵo kun spicoj ', ' LAŬ
@@ -246,9 +232,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' いろはにほへと ちりぬるを わかよたれそ つねならむ うゐのおくやま けふこえて あさきゆめみし ゑひもせす ')
+ - name: COLUMN_1
type: string
- - name: upper(' いろはにほへと ちりぬるを わかよたれそ つねならむ うゐのおくやま けふこえて あさきゆめみし ゑひもせす ')
+ - name: COLUMN_2
type: string
rows:
- [' いろはにほへと ちりぬるを わかよたれそ つねならむ うゐのおくやま けふこえて あさきゆめみし ゑひもせす ', ' いろはにほへと
@@ -260,9 +246,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: 'lower('' Pijamalı hasta yağız şoföre çabucak güvendi. EXTRA: İ '')'
+ - name: COLUMN_1
type: string
- - name: 'upper('' Pijamalı hasta yağız şoföre çabucak güvendi. EXTRA: İ '')'
+ - name: COLUMN_2
type: string
rows:
- [' pijamalı hasta yağız şoföre çabucak güvendi. extra: i̇ ', ' PIJAMALI
diff --git a/test/sql/integer-overflow.result b/test/sql/integer-overflow.result
index 6269cb547..a56fb2412 100644
--- a/test/sql/integer-overflow.result
+++ b/test/sql/integer-overflow.result
@@ -19,7 +19,7 @@ box.execute('SELECT (2147483647 * 2147483647 * 2147483647);')
box.execute('SELECT (-9223372036854775808 / -1);')
---
- metadata:
- - name: (-9223372036854775808 / -1)
+ - name: COLUMN_1
type: integer
rows:
- [9223372036854775808]
@@ -32,7 +32,7 @@ box.execute('SELECT (-9223372036854775808 - 1);')
box.execute('SELECT (9223372036854775807 + 1);')
---
- metadata:
- - name: (9223372036854775807 + 1)
+ - name: COLUMN_1
type: integer
rows:
- [9223372036854775808]
@@ -50,7 +50,7 @@ box.execute('SELECT 18446744073709551615 * 2;')
box.execute('SELECT (-9223372036854775807 * (-2));')
---
- metadata:
- - name: (-9223372036854775807 * (-2))
+ - name: COLUMN_1
type: integer
rows:
- [18446744073709551614]
@@ -60,7 +60,7 @@ box.execute('SELECT (-9223372036854775807 * (-2));')
box.execute('SELECT 9223372036854775808;')
---
- metadata:
- - name: '9223372036854775808'
+ - name: COLUMN_1
type: integer
rows:
- [9223372036854775808]
@@ -74,7 +74,7 @@ box.execute('SELECT -9223372036854775809;')
box.execute('SELECT 9223372036854775808 - 1;')
---
- metadata:
- - name: 9223372036854775808 - 1
+ - name: COLUMN_1
type: integer
rows:
- [9223372036854775807]
@@ -82,7 +82,7 @@ box.execute('SELECT 9223372036854775808 - 1;')
box.execute('SELECT 18446744073709551615;')
---
- metadata:
- - name: '18446744073709551615'
+ - name: COLUMN_1
type: integer
rows:
- [18446744073709551615]
@@ -98,7 +98,7 @@ box.execute('SELECT 18446744073709551616;')
box.execute('SELECT CAST(\'9223372036854775808\' AS INTEGER);')
---
- metadata:
- - name: CAST('9223372036854775808' AS INTEGER)
+ - name: COLUMN_1
type: integer
rows:
- [9223372036854775808]
diff --git a/test/sql/iproto.result b/test/sql/iproto.result
index 44ba499a0..ee1047fc1 100644
--- a/test/sql/iproto.result
+++ b/test/sql/iproto.result
@@ -372,11 +372,11 @@ parameters[3] = 33
cn:execute('select $2, $1, $3', parameters)
---
- metadata:
- - name: $2
+ - name: COLUMN_1
type: integer
- - name: $1
+ - name: COLUMN_2
type: integer
- - name: $3
+ - name: COLUMN_3
type: integer
rows:
- [22, 11, 33]
@@ -736,7 +736,7 @@ res.metadata
cn:execute("SELECT zeroblob(1);")
---
- metadata:
- - name: zeroblob(1)
+ - name: COLUMN_1
type: varbinary
rows:
- ["\0"]
@@ -749,7 +749,7 @@ res = cn:execute("SELECT randomblob(1);")
...
res.metadata
---
-- - name: randomblob(1)
+- - name: COLUMN_1
type: varbinary
...
-- Type set during compilation stage, and since min/max are accept
@@ -759,7 +759,7 @@ res.metadata
cn:execute("SELECT LEAST(1, 2, 3);")
---
- metadata:
- - name: LEAST(1, 2, 3)
+ - name: COLUMN_1
type: scalar
rows:
- [1]
@@ -767,7 +767,7 @@ cn:execute("SELECT LEAST(1, 2, 3);")
cn:execute("SELECT GREATEST(1, 2, 3);")
---
- metadata:
- - name: GREATEST(1, 2, 3)
+ - name: COLUMN_1
type: scalar
rows:
- [3]
@@ -803,7 +803,7 @@ s = box.prepare([[ SELECT ?; ]])
s:execute({42})
---
- metadata:
- - name: '?'
+ - name: COLUMN_1
type: integer
rows:
- [42]
@@ -811,7 +811,7 @@ s:execute({42})
box.execute('SELECT 1;')
---
- metadata:
- - name: '1'
+ - name: COLUMN_1
type: integer
rows:
- [1]
diff --git a/test/sql/max-on-index.result b/test/sql/max-on-index.result
index 1cd488f85..a90f30993 100644
--- a/test/sql/max-on-index.result
+++ b/test/sql/max-on-index.result
@@ -48,7 +48,7 @@ box.execute("INSERT INTO test2 VALUES(1, 2)");
box.execute("SELECT MAX(f1) FROM test1")
---
- metadata:
- - name: MAX(f1)
+ - name: COLUMN_1
type: scalar
rows:
- [4]
@@ -56,7 +56,7 @@ box.execute("SELECT MAX(f1) FROM test1")
box.execute("SELECT MAX(f2) FROM test1")
---
- metadata:
- - name: MAX(f2)
+ - name: COLUMN_1
type: scalar
rows:
- [3]
@@ -64,7 +64,7 @@ box.execute("SELECT MAX(f2) FROM test1")
box.execute("SELECT MAX(f1) FROM test2")
---
- metadata:
- - name: MAX(f1)
+ - name: COLUMN_1
type: scalar
rows:
- [1]
diff --git a/test/sql/misc.result b/test/sql/misc.result
index 0190a5897..6af11bfba 100644
--- a/test/sql/misc.result
+++ b/test/sql/misc.result
@@ -11,7 +11,7 @@ _ = box.space._session_settings:update('sql_default_engine', {{'=', 2, engine}})
box.execute('select 1;')
---
- metadata:
- - name: '1'
+ - name: COLUMN_1
type: integer
rows:
- [1]
@@ -78,7 +78,7 @@ box.execute('CREATE TABLE test (id INTEGER PRIMARY KEY, b TEXT CONSTRAINT c1 COL
box.execute('SELECT 1;')
---
- metadata:
- - name: '1'
+ - name: COLUMN_1
type: integer
rows:
- [1]
@@ -86,7 +86,7 @@ box.execute('SELECT 1;')
box.execute('SELECT 1.5;')
---
- metadata:
- - name: '1.5'
+ - name: COLUMN_1
type: double
rows:
- [1.5]
@@ -94,7 +94,7 @@ box.execute('SELECT 1.5;')
box.execute('SELECT 1.0;')
---
- metadata:
- - name: '1.0'
+ - name: COLUMN_1
type: double
rows:
- [1]
@@ -102,7 +102,7 @@ box.execute('SELECT 1.0;')
box.execute('SELECT \'abc\';')
---
- metadata:
- - name: '''abc'''
+ - name: COLUMN_1
type: string
rows:
- ['abc']
@@ -110,7 +110,7 @@ box.execute('SELECT \'abc\';')
box.execute('SELECT X\'4D6564766564\'')
---
- metadata:
- - name: X'4D6564766564'
+ - name: COLUMN_1
type: varbinary
rows:
- ['Medved']
diff --git a/test/sql/persistency.result b/test/sql/persistency.result
index 6d14d4c4e..95dde5714 100644
--- a/test/sql/persistency.result
+++ b/test/sql/persistency.result
@@ -41,9 +41,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows:
- ['foo', 1, 42, 'awesome']
@@ -57,9 +57,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar LIMIT 2")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows:
- ['foo', 1, 42, 'awesome']
@@ -72,9 +72,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo=2")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows:
- ['bar', 2, 42, 'awesome']
@@ -86,9 +86,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo>2")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows:
- ['foobar', 1000, 42, 'awesome']
@@ -100,9 +100,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo>=2")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows:
- ['bar', 2, 42, 'awesome']
@@ -115,9 +115,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo=10000")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows: []
...
@@ -128,9 +128,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo>10000")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows: []
...
@@ -141,9 +141,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<2")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows:
- ['foo', 1, 42, 'awesome']
@@ -155,9 +155,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<2.001")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows:
- ['foo', 1, 42, 'awesome']
@@ -170,9 +170,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<=2")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows:
- ['foo', 1, 42, 'awesome']
@@ -185,9 +185,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<100")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows:
- ['foo', 1, 42, 'awesome']
@@ -200,9 +200,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE bar='foo'")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows:
- ['foo', 1, 42, 'awesome']
@@ -210,7 +210,7 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE bar='foo'")
box.execute("SELECT count(*) FROM foobar")
---
- metadata:
- - name: count(*)
+ - name: COLUMN_1
type: integer
rows:
- [3]
@@ -218,7 +218,7 @@ box.execute("SELECT count(*) FROM foobar")
box.execute("SELECT count(*) FROM foobar WHERE bar='foo'")
---
- metadata:
- - name: count(*)
+ - name: COLUMN_1
type: integer
rows:
- [1]
@@ -230,9 +230,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar ORDER BY bar")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows:
- ['bar', 2, 42, 'awesome']
@@ -246,9 +246,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar ORDER BY bar DESC")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows:
- ['foobar', 1000, 42, 'awesome']
@@ -263,7 +263,7 @@ box.execute("REPLACE INTO foobar VALUES (1, 'cacodaemon')")
box.execute("SELECT COUNT(*) FROM foobar WHERE foo=1")
---
- metadata:
- - name: COUNT(*)
+ - name: COLUMN_1
type: integer
rows:
- [1]
@@ -271,7 +271,7 @@ box.execute("SELECT COUNT(*) FROM foobar WHERE foo=1")
box.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'")
---
- metadata:
- - name: COUNT(*)
+ - name: COLUMN_1
type: integer
rows:
- [1]
@@ -283,7 +283,7 @@ box.execute("DELETE FROM foobar WHERE bar='cacodaemon'")
box.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'")
---
- metadata:
- - name: COUNT(*)
+ - name: COLUMN_1
type: integer
rows:
- [0]
diff --git a/test/sql/prepared.result b/test/sql/prepared.result
index 666f6e1d3..428329b34 100644
--- a/test/sql/prepared.result
+++ b/test/sql/prepared.result
@@ -425,13 +425,13 @@ s = prepare("SELECT count(*), count(a - 3), max(b), abs(id) FROM test WHERE b =
execute(s.stmt_id)
| ---
| - metadata:
- | - name: count(*)
+ | - name: COLUMN_1
| type: integer
- | - name: count(a - 3)
+ | - name: COLUMN_2
| type: integer
- | - name: max(b)
+ | - name: COLUMN_3
| type: scalar
- | - name: abs(id)
+ | - name: COLUMN_4
| type: number
| rows:
| - [1, 1, '3', 1]
@@ -439,13 +439,13 @@ execute(s.stmt_id)
execute(s.stmt_id)
| ---
| - metadata:
- | - name: count(*)
+ | - name: COLUMN_1
| type: integer
- | - name: count(a - 3)
+ | - name: COLUMN_2
| type: integer
- | - name: max(b)
+ | - name: COLUMN_3
| type: scalar
- | - name: abs(id)
+ | - name: COLUMN_4
| type: number
| rows:
| - [1, 1, '3', 1]
@@ -480,7 +480,7 @@ res = execute(s.stmt_id)
| ...
res.metadata
| ---
- | - - name: group_concat(TRIM(TRAILING FROM t),x'0a')
+ | - - name: COLUMN_1
| type: string
| ...
unprepare(s.stmt_id)
@@ -838,11 +838,11 @@ s = prepare('SELECT :a, :b, :c');
execute(s.stmt_id, {{[':a'] = 1}, {[':b'] = 2}, {[':c'] = 3}});
| ---
| - metadata:
- | - name: :a
+ | - name: COLUMN_1
| type: integer
- | - name: :b
+ | - name: COLUMN_2
| type: integer
- | - name: :c
+ | - name: COLUMN_3
| type: integer
| rows:
| - [1, 2, 3]
@@ -850,11 +850,11 @@ execute(s.stmt_id, {{[':a'] = 1}, {[':b'] = 2}, {[':c'] = 3}});
execute(s.stmt_id, {{[':a'] = 1}, {[':b'] = 2}});
| ---
| - metadata:
- | - name: :a
+ | - name: COLUMN_1
| type: integer
- | - name: :b
+ | - name: COLUMN_2
| type: integer
- | - name: :c
+ | - name: COLUMN_3
| type: boolean
| rows:
| - [1, 2, null]
@@ -862,11 +862,11 @@ execute(s.stmt_id, {{[':a'] = 1}, {[':b'] = 2}});
execute(s.stmt_id);
| ---
| - metadata:
- | - name: :a
+ | - name: COLUMN_1
| type: boolean
- | - name: :b
+ | - name: COLUMN_2
| type: boolean
- | - name: :c
+ | - name: COLUMN_3
| type: boolean
| rows:
| - [null, null, null]
diff --git a/test/sql/row-count.result b/test/sql/row-count.result
index 02acd79b5..7591d1630 100644
--- a/test/sql/row-count.result
+++ b/test/sql/row-count.result
@@ -16,7 +16,7 @@ box.execute("CREATE TABLE t1 (s1 VARCHAR(10) PRIMARY KEY);")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: COLUMN_1
type: integer
rows:
- [1]
@@ -24,7 +24,7 @@ box.execute("SELECT ROW_COUNT();")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: COLUMN_1
type: integer
rows:
- [0]
@@ -36,7 +36,7 @@ box.execute("CREATE TABLE t2 (s1 VARCHAR(10) PRIMARY KEY, s2 VARCHAR(10) REFEREN
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: COLUMN_1
type: integer
rows:
- [1]
@@ -52,7 +52,7 @@ box.execute("INSERT INTO t3 VALUES (0, 0, 0);")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: COLUMN_1
type: integer
rows:
- [1]
@@ -64,7 +64,7 @@ box.execute("CREATE TRIGGER x AFTER DELETE ON t1 FOR EACH ROW BEGIN UPDATE t3 SE
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: COLUMN_1
type: integer
rows:
- [1]
@@ -76,7 +76,7 @@ box.execute("INSERT INTO t1 VALUES ('a');")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: COLUMN_1
type: integer
rows:
- [1]
@@ -88,7 +88,7 @@ box.execute("INSERT INTO t2 VALUES ('a','a');")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: COLUMN_1
type: integer
rows:
- [1]
@@ -100,7 +100,7 @@ box.execute("INSERT INTO t1 VALUES ('b'), ('c'), ('d');")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: COLUMN_1
type: integer
rows:
- [3]
@@ -113,7 +113,7 @@ box.execute("REPLACE INTO t2 VALUES('a', 'c');")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: COLUMN_1
type: integer
rows:
- [2]
@@ -125,7 +125,7 @@ box.execute("DELETE FROM t1;")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: COLUMN_1
type: integer
rows:
- [4]
@@ -141,7 +141,7 @@ box.execute("TRUNCATE TABLE t3;")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: COLUMN_1
type: integer
rows:
- [0]
@@ -157,7 +157,7 @@ box.execute("UPDATE t3 SET i2 = 666;")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: COLUMN_1
type: integer
rows:
- [3]
@@ -172,7 +172,7 @@ box.execute("DELETE FROM t3 WHERE 0 = 0;")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: COLUMN_1
type: integer
rows:
- [3]
@@ -188,7 +188,7 @@ box.execute("DELETE FROM t3")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: COLUMN_1
type: integer
rows:
- [3]
@@ -222,7 +222,7 @@ box.execute("DELETE FROM tt1 WHERE id = 2;")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: COLUMN_1
type: integer
rows:
- [1]
@@ -252,7 +252,7 @@ box.execute("START TRANSACTION;")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: COLUMN_1
type: integer
rows:
- [0]
@@ -264,7 +264,7 @@ box.execute("COMMIT;")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: COLUMN_1
type: integer
rows:
- [0]
@@ -277,7 +277,7 @@ box.execute("COMMIT;")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: COLUMN_1
type: integer
rows:
- [0]
@@ -286,7 +286,7 @@ box.execute("SELECT ROW_COUNT();")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: COLUMN_1
type: integer
rows:
- [0]
@@ -308,7 +308,7 @@ box.execute("EXPLAIN QUERY PLAN INSERT INTO t1 VALUES ('b'), ('c'), ('d');")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: COLUMN_1
type: integer
rows:
- [0]
diff --git a/test/sql/transition.result b/test/sql/transition.result
index c14055b4e..8680e3cec 100644
--- a/test/sql/transition.result
+++ b/test/sql/transition.result
@@ -38,9 +38,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows:
- ['foo', 1, 42, 'awesome']
@@ -54,9 +54,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar LIMIT 2")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows:
- ['foo', 1, 42, 'awesome']
@@ -69,9 +69,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo=2")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows:
- ['bar', 2, 42, 'awesome']
@@ -83,9 +83,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo>2")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows:
- ['foobar', 1000, 42, 'awesome']
@@ -97,9 +97,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo>=2")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows:
- ['bar', 2, 42, 'awesome']
@@ -112,9 +112,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo=10000")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows: []
...
@@ -125,9 +125,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo>10000")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows: []
...
@@ -138,9 +138,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<2")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows:
- ['foo', 1, 42, 'awesome']
@@ -152,9 +152,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<2.001")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows:
- ['foo', 1, 42, 'awesome']
@@ -167,9 +167,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<=2")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows:
- ['foo', 1, 42, 'awesome']
@@ -182,9 +182,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<100")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows:
- ['foo', 1, 42, 'awesome']
@@ -197,9 +197,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE bar='foo'")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows:
- ['foo', 1, 42, 'awesome']
@@ -207,7 +207,7 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE bar='foo'")
box.execute("SELECT count(*) FROM foobar")
---
- metadata:
- - name: count(*)
+ - name: COLUMN_1
type: integer
rows:
- [3]
@@ -215,7 +215,7 @@ box.execute("SELECT count(*) FROM foobar")
box.execute("SELECT count(*) FROM foobar WHERE bar='foo'")
---
- metadata:
- - name: count(*)
+ - name: COLUMN_1
type: integer
rows:
- [1]
@@ -227,9 +227,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar ORDER BY bar")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows:
- ['bar', 2, 42, 'awesome']
@@ -243,9 +243,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar ORDER BY bar DESC")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: COLUMN_1
type: integer
- - name: '''awesome'''
+ - name: COLUMN_2
type: string
rows:
- ['foobar', 1000, 42, 'awesome']
@@ -260,7 +260,7 @@ box.execute("REPLACE INTO foobar VALUES (1, 'cacodaemon')")
box.execute("SELECT COUNT(*) FROM foobar WHERE foo=1")
---
- metadata:
- - name: COUNT(*)
+ - name: COLUMN_1
type: integer
rows:
- [1]
@@ -268,7 +268,7 @@ box.execute("SELECT COUNT(*) FROM foobar WHERE foo=1")
box.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'")
---
- metadata:
- - name: COUNT(*)
+ - name: COLUMN_1
type: integer
rows:
- [1]
@@ -280,7 +280,7 @@ box.execute("DELETE FROM foobar WHERE bar='cacodaemon'")
box.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'")
---
- metadata:
- - name: COUNT(*)
+ - name: COLUMN_1
type: integer
rows:
- [0]
diff --git a/test/sql/types.result b/test/sql/types.result
index 54aff460e..8204b22bd 100644
--- a/test/sql/types.result
+++ b/test/sql/types.result
@@ -54,8 +54,8 @@ box.execute("CREATE VIEW v1 AS SELECT b + a, b - a FROM t1;")
...
box.space.V1:format()
---
-- [{'type': 'number', 'nullable_action': 'none', 'name': 'b + a', 'is_nullable': true},
- {'type': 'number', 'nullable_action': 'none', 'name': 'b - a', 'is_nullable': true}]
+- [{'type': 'number', 'nullable_action': 'none', 'name': 'COLUMN_1', 'is_nullable': true},
+ {'type': 'number', 'nullable_action': 'none', 'name': 'COLUMN_2', 'is_nullable': true}]
...
-- gh-2494: index's part also features correct declared type.
--
@@ -197,7 +197,7 @@ box.execute("SELECT randomblob(5) || 'x';")
box.execute("VALUES (TYPEOF(randomblob(5) || zeroblob(5)));")
---
- metadata:
- - name: column1
+ - name: COLUMN_1
type: string
rows:
- ['varbinary']
@@ -230,7 +230,7 @@ box.execute("SELECT * FROM t1 WHERE 'blob' LIKE x'0000';")
box.execute("SELECT s LIKE NULL FROM t1;")
---
- metadata:
- - name: s LIKE NULL
+ - name: COLUMN_1
type: integer
rows:
- [null]
@@ -256,7 +256,7 @@ box.execute("SELECT * FROM t1 WHERE 'int' LIKE 4;")
box.execute("SELECT NULL LIKE s FROM t1;")
---
- metadata:
- - name: NULL LIKE s
+ - name: COLUMN_1
type: integer
rows:
- [null]
@@ -295,7 +295,7 @@ box.space.T1:drop()
box.execute('SELECT 1 + 1;')
---
- metadata:
- - name: 1 + 1
+ - name: COLUMN_1
type: integer
rows:
- [2]
@@ -303,7 +303,7 @@ box.execute('SELECT 1 + 1;')
box.execute('SELECT 1 + 1.1;')
---
- metadata:
- - name: 1 + 1.1
+ - name: COLUMN_1
type: double
rows:
- [2.1]
@@ -311,7 +311,7 @@ box.execute('SELECT 1 + 1.1;')
box.execute('SELECT \'9223372036854\' + 1;')
---
- metadata:
- - name: '''9223372036854'' + 1'
+ - name: COLUMN_1
type: integer
rows:
- [9223372036855]
@@ -320,7 +320,7 @@ box.execute('SELECT \'9223372036854\' + 1;')
box.execute('SELECT ?', {true})
---
- metadata:
- - name: '?'
+ - name: COLUMN_1
type: boolean
rows:
- [true]
@@ -481,7 +481,7 @@ s:drop()
box.execute("SELECT 18446744073709551615 > 18446744073709551614;")
---
- metadata:
- - name: 18446744073709551615 > 18446744073709551614
+ - name: COLUMN_1
type: boolean
rows:
- [true]
@@ -489,7 +489,7 @@ box.execute("SELECT 18446744073709551615 > 18446744073709551614;")
box.execute("SELECT 18446744073709551615 > -9223372036854775808;")
---
- metadata:
- - name: 18446744073709551615 > -9223372036854775808
+ - name: COLUMN_1
type: boolean
rows:
- [true]
@@ -497,7 +497,7 @@ box.execute("SELECT 18446744073709551615 > -9223372036854775808;")
box.execute("SELECT -1 < 18446744073709551615;")
---
- metadata:
- - name: -1 < 18446744073709551615
+ - name: COLUMN_1
type: boolean
rows:
- [true]
@@ -505,7 +505,7 @@ box.execute("SELECT -1 < 18446744073709551615;")
box.execute("SELECT 1.5 < 18446744073709551615")
---
- metadata:
- - name: 1.5 < 18446744073709551615
+ - name: COLUMN_1
type: boolean
rows:
- [true]
@@ -513,7 +513,7 @@ box.execute("SELECT 1.5 < 18446744073709551615")
box.execute("SELECT 1.5 > 18446744073709551615")
---
- metadata:
- - name: 1.5 > 18446744073709551615
+ - name: COLUMN_1
type: boolean
rows:
- [false]
@@ -521,7 +521,7 @@ box.execute("SELECT 1.5 > 18446744073709551615")
box.execute("SELECT 18446744073709551615 > 1.5")
---
- metadata:
- - name: 18446744073709551615 > 1.5
+ - name: COLUMN_1
type: boolean
rows:
- [true]
@@ -529,7 +529,7 @@ box.execute("SELECT 18446744073709551615 > 1.5")
box.execute("SELECT 18446744073709551615 < 1.5")
---
- metadata:
- - name: 18446744073709551615 < 1.5
+ - name: COLUMN_1
type: boolean
rows:
- [false]
@@ -537,7 +537,7 @@ box.execute("SELECT 18446744073709551615 < 1.5")
box.execute("SELECT 18446744073709551615 = 18446744073709551615;")
---
- metadata:
- - name: 18446744073709551615 = 18446744073709551615
+ - name: COLUMN_1
type: boolean
rows:
- [true]
@@ -545,7 +545,7 @@ box.execute("SELECT 18446744073709551615 = 18446744073709551615;")
box.execute("SELECT 18446744073709551615 > -9223372036854775808;")
---
- metadata:
- - name: 18446744073709551615 > -9223372036854775808
+ - name: COLUMN_1
type: boolean
rows:
- [true]
@@ -553,7 +553,7 @@ box.execute("SELECT 18446744073709551615 > -9223372036854775808;")
box.execute("SELECT 18446744073709551615 < -9223372036854775808;")
---
- metadata:
- - name: 18446744073709551615 < -9223372036854775808
+ - name: COLUMN_1
type: boolean
rows:
- [false]
@@ -561,7 +561,7 @@ box.execute("SELECT 18446744073709551615 < -9223372036854775808;")
box.execute("SELECT -1 < 18446744073709551615;")
---
- metadata:
- - name: -1 < 18446744073709551615
+ - name: COLUMN_1
type: boolean
rows:
- [true]
@@ -569,7 +569,7 @@ box.execute("SELECT -1 < 18446744073709551615;")
box.execute("SELECT -1 > 18446744073709551615;")
---
- metadata:
- - name: -1 > 18446744073709551615
+ - name: COLUMN_1
type: boolean
rows:
- [false]
@@ -577,7 +577,7 @@ box.execute("SELECT -1 > 18446744073709551615;")
box.execute("SELECT 18446744073709551610 - 18446744073709551615;")
---
- metadata:
- - name: 18446744073709551610 - 18446744073709551615
+ - name: COLUMN_1
type: integer
rows:
- [-5]
@@ -585,7 +585,7 @@ box.execute("SELECT 18446744073709551610 - 18446744073709551615;")
box.execute("SELECT 18446744073709551615 = null;")
---
- metadata:
- - name: 18446744073709551615 = null
+ - name: COLUMN_1
type: boolean
rows:
- [null]
@@ -593,7 +593,7 @@ box.execute("SELECT 18446744073709551615 = null;")
box.execute("SELECT 18446744073709551615 = 18446744073709551615.0;")
---
- metadata:
- - name: 18446744073709551615 = 18446744073709551615.0
+ - name: COLUMN_1
type: boolean
rows:
- [false]
@@ -601,7 +601,7 @@ box.execute("SELECT 18446744073709551615 = 18446744073709551615.0;")
box.execute("SELECT 18446744073709551615.0 > 18446744073709551615")
---
- metadata:
- - name: 18446744073709551615.0 > 18446744073709551615
+ - name: COLUMN_1
type: boolean
rows:
- [true]
@@ -609,7 +609,7 @@ box.execute("SELECT 18446744073709551615.0 > 18446744073709551615")
box.execute("SELECT 18446744073709551615 IN ('18446744073709551615', 18446744073709551615.0)")
---
- metadata:
- - name: 18446744073709551615 IN ('18446744073709551615', 18446744073709551615.0)
+ - name: COLUMN_1
type: boolean
rows:
- [true]
@@ -617,7 +617,7 @@ box.execute("SELECT 18446744073709551615 IN ('18446744073709551615', 18446744073
box.execute("SELECT 1 LIMIT 18446744073709551615;")
---
- metadata:
- - name: '1'
+ - name: COLUMN_1
type: integer
rows:
- [1]
@@ -625,7 +625,7 @@ box.execute("SELECT 1 LIMIT 18446744073709551615;")
box.execute("SELECT 1 LIMIT 1 OFFSET 18446744073709551614;")
---
- metadata:
- - name: '1'
+ - name: COLUMN_1
type: integer
rows: []
...
@@ -637,7 +637,7 @@ box.execute("SELECT CAST('18446744073' || '709551616' AS INTEGER);")
box.execute("SELECT CAST('18446744073' || '709551615' AS INTEGER);")
---
- metadata:
- - name: CAST('18446744073' || '709551615' AS INTEGER)
+ - name: COLUMN_1
type: integer
rows:
- [18446744073709551615]
@@ -645,7 +645,7 @@ box.execute("SELECT CAST('18446744073' || '709551615' AS INTEGER);")
box.execute("SELECT 18446744073709551610 + 5;")
---
- metadata:
- - name: 18446744073709551610 + 5
+ - name: COLUMN_1
type: integer
rows:
- [18446744073709551615]
@@ -653,7 +653,7 @@ box.execute("SELECT 18446744073709551610 + 5;")
box.execute("SELECT 18446744073709551615 * 1;")
---
- metadata:
- - name: 18446744073709551615 * 1
+ - name: COLUMN_1
type: integer
rows:
- [18446744073709551615]
@@ -661,7 +661,7 @@ box.execute("SELECT 18446744073709551615 * 1;")
box.execute("SELECT 1 / 18446744073709551615;")
---
- metadata:
- - name: 1 / 18446744073709551615
+ - name: COLUMN_1
type: integer
rows:
- [0]
@@ -669,7 +669,7 @@ box.execute("SELECT 1 / 18446744073709551615;")
box.execute("SELECT 18446744073709551615 / 18446744073709551615;")
---
- metadata:
- - name: 18446744073709551615 / 18446744073709551615
+ - name: COLUMN_1
type: integer
rows:
- [1]
@@ -677,7 +677,7 @@ box.execute("SELECT 18446744073709551615 / 18446744073709551615;")
box.execute("SELECT 18446744073709551615 / -9223372036854775808;")
---
- metadata:
- - name: 18446744073709551615 / -9223372036854775808
+ - name: COLUMN_1
type: integer
rows:
- [-1]
@@ -771,7 +771,7 @@ box.execute("INSERT INTO t VALUES (2, -1);")
box.execute("SELECT sum(i) FROM t;")
---
- metadata:
- - name: sum(i)
+ - name: COLUMN_1
type: number
rows:
- [18446744073709551613]
@@ -779,7 +779,7 @@ box.execute("SELECT sum(i) FROM t;")
box.execute("SELECT avg(i) FROM t;")
---
- metadata:
- - name: avg(i)
+ - name: COLUMN_1
type: number
rows:
- [6148914691236516864]
@@ -787,7 +787,7 @@ box.execute("SELECT avg(i) FROM t;")
box.execute("SELECT total(i) FROM t;")
---
- metadata:
- - name: total(i)
+ - name: COLUMN_1
type: number
rows:
- [1.844674407371e+19]
@@ -795,7 +795,7 @@ box.execute("SELECT total(i) FROM t;")
box.execute("SELECT min(i) FROM t;")
---
- metadata:
- - name: min(i)
+ - name: COLUMN_1
type: scalar
rows:
- [-1]
@@ -803,7 +803,7 @@ box.execute("SELECT min(i) FROM t;")
box.execute("SELECT max(i) FROM t;")
---
- metadata:
- - name: max(i)
+ - name: COLUMN_1
type: scalar
rows:
- [18446744073709551613]
@@ -811,7 +811,7 @@ box.execute("SELECT max(i) FROM t;")
box.execute("SELECT count(i) FROM t;")
---
- metadata:
- - name: count(i)
+ - name: COLUMN_1
type: integer
rows:
- [3]
@@ -819,7 +819,7 @@ box.execute("SELECT count(i) FROM t;")
box.execute("SELECT group_concat(i) FROM t;")
---
- metadata:
- - name: group_concat(i)
+ - name: COLUMN_1
type: string
rows:
- ['1,-1,18446744073709551613']
@@ -831,7 +831,7 @@ box.execute("DELETE FROM t WHERE i < 18446744073709551613;")
box.execute("SELECT lower(i) FROM t;")
---
- metadata:
- - name: lower(i)
+ - name: COLUMN_1
type: string
rows:
- ['18446744073709551613']
@@ -839,7 +839,7 @@ box.execute("SELECT lower(i) FROM t;")
box.execute("SELECT upper(i) FROM t;")
---
- metadata:
- - name: upper(i)
+ - name: COLUMN_1
type: string
rows:
- ['18446744073709551613']
@@ -847,7 +847,7 @@ box.execute("SELECT upper(i) FROM t;")
box.execute("SELECT abs(i) FROM t;")
---
- metadata:
- - name: abs(i)
+ - name: COLUMN_1
type: number
rows:
- [18446744073709551613]
@@ -855,7 +855,7 @@ box.execute("SELECT abs(i) FROM t;")
box.execute("SELECT typeof(i) FROM t;")
---
- metadata:
- - name: typeof(i)
+ - name: COLUMN_1
type: string
rows:
- ['integer']
@@ -863,7 +863,7 @@ box.execute("SELECT typeof(i) FROM t;")
box.execute("SELECT quote(i) FROM t;")
---
- metadata:
- - name: quote(i)
+ - name: COLUMN_1
type: string
rows:
- [18446744073709551613]
@@ -871,7 +871,7 @@ box.execute("SELECT quote(i) FROM t;")
box.execute("SELECT LEAST(-1, i) FROM t;")
---
- metadata:
- - name: LEAST(-1, i)
+ - name: COLUMN_1
type: scalar
rows:
- [-1]
@@ -879,7 +879,7 @@ box.execute("SELECT LEAST(-1, i) FROM t;")
box.execute("SELECT quote(i) FROM t;")
---
- metadata:
- - name: quote(i)
+ - name: COLUMN_1
type: string
rows:
- [18446744073709551613]
@@ -1012,7 +1012,7 @@ box.space.T1:drop()
box.execute("SELECT CAST(18446744073709551615 AS NUMBER);")
---
- metadata:
- - name: CAST(18446744073709551615 AS NUMBER)
+ - name: COLUMN_1
type: number
rows:
- [18446744073709551615]
@@ -1020,7 +1020,7 @@ box.execute("SELECT CAST(18446744073709551615 AS NUMBER);")
box.execute("SELECT CAST(18446744073709551615 AS TEXT);")
---
- metadata:
- - name: CAST(18446744073709551615 AS TEXT)
+ - name: COLUMN_1
type: string
rows:
- ['18446744073709551615']
@@ -1028,7 +1028,7 @@ box.execute("SELECT CAST(18446744073709551615 AS TEXT);")
box.execute("SELECT CAST(18446744073709551615 AS SCALAR);")
---
- metadata:
- - name: CAST(18446744073709551615 AS SCALAR)
+ - name: COLUMN_1
type: scalar
rows:
- [18446744073709551615]
@@ -1036,7 +1036,7 @@ box.execute("SELECT CAST(18446744073709551615 AS SCALAR);")
box.execute("SELECT CAST(18446744073709551615 AS BOOLEAN);")
---
- metadata:
- - name: CAST(18446744073709551615 AS BOOLEAN)
+ - name: COLUMN_1
type: boolean
rows:
- [true]
@@ -1044,7 +1044,7 @@ box.execute("SELECT CAST(18446744073709551615 AS BOOLEAN);")
box.execute("SELECT CAST('18446744073709551615' AS INTEGER);")
---
- metadata:
- - name: CAST('18446744073709551615' AS INTEGER)
+ - name: COLUMN_1
type: integer
rows:
- [18446744073709551615]
@@ -1077,7 +1077,7 @@ box.execute("SELECT id FROM t1;")
box.execute("SELECT CAST(123 AS UNSIGNED);")
---
- metadata:
- - name: CAST(123 AS UNSIGNED)
+ - name: COLUMN_1
type: unsigned
rows:
- [123]
@@ -1090,7 +1090,7 @@ box.execute("SELECT CAST(-123 AS UNSIGNED);")
box.execute("SELECT CAST(1.5 AS UNSIGNED);")
---
- metadata:
- - name: CAST(1.5 AS UNSIGNED)
+ - name: COLUMN_1
type: unsigned
rows:
- [1]
@@ -1098,7 +1098,7 @@ box.execute("SELECT CAST(1.5 AS UNSIGNED);")
box.execute("SELECT CAST(-1.5 AS UNSIGNED);")
---
- metadata:
- - name: CAST(-1.5 AS UNSIGNED)
+ - name: COLUMN_1
type: unsigned
rows:
- [-1]
@@ -1106,7 +1106,7 @@ box.execute("SELECT CAST(-1.5 AS UNSIGNED);")
box.execute("SELECT CAST(true AS UNSIGNED);")
---
- metadata:
- - name: CAST(true AS UNSIGNED)
+ - name: COLUMN_1
type: unsigned
rows:
- [1]
@@ -1114,7 +1114,7 @@ box.execute("SELECT CAST(true AS UNSIGNED);")
box.execute("SELECT CAST('123' AS UNSIGNED);")
---
- metadata:
- - name: CAST('123' AS UNSIGNED)
+ - name: COLUMN_1
type: unsigned
rows:
- [123]
@@ -1146,7 +1146,7 @@ box.space.T:drop()
box.execute("SELECT CASE 1 WHEN 1 THEN x'0000000000' WHEN 2 THEN 'str' END")
---
- metadata:
- - name: CASE 1 WHEN 1 THEN x'0000000000' WHEN 2 THEN 'str' END
+ - name: COLUMN_1
type: scalar
rows:
- ["\0\0\0\0\0"]
@@ -1154,7 +1154,7 @@ box.execute("SELECT CASE 1 WHEN 1 THEN x'0000000000' WHEN 2 THEN 'str' END")
box.execute("SELECT CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 END")
---
- metadata:
- - name: CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 END
+ - name: COLUMN_1
type: integer
rows:
- [666]
@@ -1162,7 +1162,7 @@ box.execute("SELECT CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 END")
box.execute("SELECT CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 ELSE 321 END")
---
- metadata:
- - name: CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 ELSE 321 END
+ - name: COLUMN_1
type: integer
rows:
- [666]
@@ -1170,7 +1170,7 @@ box.execute("SELECT CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 ELSE 321 END")
box.execute("SELECT CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 ELSE 'asd' END")
---
- metadata:
- - name: CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 ELSE 'asd' END
+ - name: COLUMN_1
type: scalar
rows:
- [666]
@@ -1178,8 +1178,7 @@ box.execute("SELECT CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 ELSE 'asd' END")
box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN 'd' THEN 4 WHEN 'e' THEN 5 WHEN 'f' THEN 6 END;")
---
- metadata:
- - name: CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN 'd' THEN 4
- WHEN 'e' THEN 5 WHEN 'f' THEN 6 END
+ - name: COLUMN_1
type: integer
rows:
- [1]
@@ -1187,8 +1186,7 @@ box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHE
box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN 'd' THEN 4 WHEN 'e' THEN 5 WHEN 'f' THEN 'asd' END;")
---
- metadata:
- - name: CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN 'd' THEN 4
- WHEN 'e' THEN 5 WHEN 'f' THEN 'asd' END
+ - name: COLUMN_1
type: scalar
rows:
- [1]
@@ -1196,8 +1194,7 @@ box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHE
box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN 'd' THEN 4 WHEN 'e' THEN 5 WHEN 'f' THEN 6 ELSE 'asd' END;")
---
- metadata:
- - name: CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN 'd' THEN 4
- WHEN 'e' THEN 5 WHEN 'f' THEN 6 ELSE 'asd' END
+ - name: COLUMN_1
type: scalar
rows:
- [1]
@@ -1205,8 +1202,7 @@ box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHE
box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN 'd' THEN 4 WHEN 'e' THEN 5 WHEN 'f' THEN 6 ELSE 7 END;")
---
- metadata:
- - name: CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN 'd' THEN 4
- WHEN 'e' THEN 5 WHEN 'f' THEN 6 ELSE 7 END
+ - name: COLUMN_1
type: integer
rows:
- [1]
@@ -1284,7 +1280,7 @@ box.execute("SELECT total(v) FROM t;")
box.execute("SELECT min(v) FROM t;")
---
- metadata:
- - name: min(v)
+ - name: COLUMN_1
type: scalar
rows:
- ['abc']
@@ -1292,7 +1288,7 @@ box.execute("SELECT min(v) FROM t;")
box.execute("SELECT max(v) FROM t;")
---
- metadata:
- - name: max(v)
+ - name: COLUMN_1
type: scalar
rows:
- ['abc']
@@ -1300,7 +1296,7 @@ box.execute("SELECT max(v) FROM t;")
box.execute("SELECT count(v) FROM t;")
---
- metadata:
- - name: count(v)
+ - name: COLUMN_1
type: integer
rows:
- [1]
@@ -1308,7 +1304,7 @@ box.execute("SELECT count(v) FROM t;")
box.execute("SELECT group_concat(v) FROM t;")
---
- metadata:
- - name: group_concat(v)
+ - name: COLUMN_1
type: string
rows:
- ['abc']
@@ -1331,7 +1327,7 @@ box.execute("SELECT abs(v) FROM t;")
box.execute("SELECT typeof(v) FROM t;")
---
- metadata:
- - name: typeof(v)
+ - name: COLUMN_1
type: string
rows:
- ['varbinary']
@@ -1339,7 +1335,7 @@ box.execute("SELECT typeof(v) FROM t;")
box.execute("SELECT quote(v) FROM t;")
---
- metadata:
- - name: quote(v)
+ - name: COLUMN_1
type: string
rows:
- ['X''616263''']
@@ -1347,7 +1343,7 @@ box.execute("SELECT quote(v) FROM t;")
box.execute("SELECT LEAST(v, x'') FROM t;")
---
- metadata:
- - name: LEAST(v, x'')
+ - name: COLUMN_1
type: scalar
rows:
- ['']
@@ -1467,7 +1463,7 @@ box.execute("SELECT CAST(true AS VARBINARY);")
box.execute("SELECT CAST('asd' AS VARBINARY);")
---
- metadata:
- - name: CAST('asd' AS VARBINARY)
+ - name: COLUMN_1
type: varbinary
rows:
- ['asd']
@@ -1475,7 +1471,7 @@ box.execute("SELECT CAST('asd' AS VARBINARY);")
box.execute("SELECT CAST(x'' AS VARBINARY);")
---
- metadata:
- - name: CAST(x'' AS VARBINARY)
+ - name: COLUMN_1
type: varbinary
rows:
- ['']
@@ -1494,9 +1490,9 @@ box.execute("INSERT INTO t VALUES (1, 1, 1), (2, NULL, NULL);")
box.execute("SELECT typeof(a), typeof(s) FROM t;")
---
- metadata:
- - name: typeof(a)
+ - name: COLUMN_1
type: string
- - name: typeof(s)
+ - name: COLUMN_2
type: string
rows:
- ['integer', 'integer']
@@ -1513,7 +1509,7 @@ box.execute('INSERT INTO t1 VALUES (1, NULL, NULL);')
box.execute('SELECT typeof(a & b) FROM t1;')
---
- metadata:
- - name: typeof(a & b)
+ - name: COLUMN_1
type: string
rows:
- ['integer']
@@ -1521,11 +1517,11 @@ box.execute('SELECT typeof(a & b) FROM t1;')
box.execute('SELECT typeof(a), typeof(b), typeof(a & b) FROM t1')
---
- metadata:
- - name: typeof(a)
+ - name: COLUMN_1
type: string
- - name: typeof(b)
+ - name: COLUMN_2
type: string
- - name: typeof(a & b)
+ - name: COLUMN_3
type: string
rows:
- ['integer', 'integer', 'integer']
@@ -1533,7 +1529,7 @@ box.execute('SELECT typeof(a), typeof(b), typeof(a & b) FROM t1')
box.execute("SELECT typeof(CAST(0 AS UNSIGNED));")
---
- metadata:
- - name: typeof(CAST(0 AS UNSIGNED))
+ - name: COLUMN_1
type: string
rows:
- ['unsigned']
@@ -1693,7 +1689,7 @@ box.execute('DROP TABLE t1;')
box.execute("SELECT 1.0;")
---
- metadata:
- - name: '1.0'
+ - name: COLUMN_1
type: double
rows:
- [1]
@@ -1701,7 +1697,7 @@ box.execute("SELECT 1.0;")
box.execute("SELECT .01;")
---
- metadata:
- - name: '.01'
+ - name: COLUMN_1
type: double
rows:
- [0.01]
@@ -1709,7 +1705,7 @@ box.execute("SELECT .01;")
box.execute("SELECT CAST(1 AS DOUBLE);")
---
- metadata:
- - name: CAST(1 AS DOUBLE)
+ - name: COLUMN_1
type: double
rows:
- [1]
@@ -1717,7 +1713,7 @@ box.execute("SELECT CAST(1 AS DOUBLE);")
box.execute("SELECT CAST(1.123 AS DOUBLE);")
---
- metadata:
- - name: CAST(1.123 AS DOUBLE)
+ - name: COLUMN_1
type: double
rows:
- [1.123]
@@ -1735,7 +1731,7 @@ box.execute("SELECT CAST('asd' AS DOUBLE);")
box.execute("SELECT CAST('1' AS DOUBLE);")
---
- metadata:
- - name: CAST('1' AS DOUBLE)
+ - name: COLUMN_1
type: double
rows:
- [1]
@@ -1743,7 +1739,7 @@ box.execute("SELECT CAST('1' AS DOUBLE);")
box.execute("SELECT CAST('1.123' AS DOUBLE);")
---
- metadata:
- - name: CAST('1.123' AS DOUBLE)
+ - name: COLUMN_1
type: double
rows:
- [1.123]
@@ -1761,7 +1757,7 @@ box.execute("SELECT CAST(x'35' AS DOUBLE);")
box.execute("SELECT CAST(CAST(x'35' AS STRING) AS DOUBLE);")
---
- metadata:
- - name: CAST(CAST(x'35' AS STRING) AS DOUBLE)
+ - name: COLUMN_1
type: double
rows:
- [5]
@@ -1795,7 +1791,7 @@ box.execute('SELECT * FROM t;')
box.execute('SELECT d / 100 FROM t;')
---
- metadata:
- - name: d / 100
+ - name: COLUMN_1
type: double
rows:
- [0.1]
@@ -1828,7 +1824,7 @@ box.execute('SELECT * from t WHERE d = 3.3;')
box.execute("SELECT sum(d) FROM t;")
---
- metadata:
- - name: sum(d)
+ - name: COLUMN_1
type: number
rows:
- [18000000000000000000]
@@ -1836,7 +1832,7 @@ box.execute("SELECT sum(d) FROM t;")
box.execute("SELECT avg(d) FROM t;")
---
- metadata:
- - name: avg(d)
+ - name: COLUMN_1
type: number
rows:
- [4500000000000000000]
@@ -1844,7 +1840,7 @@ box.execute("SELECT avg(d) FROM t;")
box.execute("SELECT total(d) FROM t;")
---
- metadata:
- - name: total(d)
+ - name: COLUMN_1
type: number
rows:
- [18000000000000000000]
@@ -1852,7 +1848,7 @@ box.execute("SELECT total(d) FROM t;")
box.execute("SELECT min(d) FROM t;")
---
- metadata:
- - name: min(d)
+ - name: COLUMN_1
type: scalar
rows:
- [-2]
@@ -1860,7 +1856,7 @@ box.execute("SELECT min(d) FROM t;")
box.execute("SELECT max(d) FROM t;")
---
- metadata:
- - name: max(d)
+ - name: COLUMN_1
type: scalar
rows:
- [18000000000000000000]
@@ -1868,7 +1864,7 @@ box.execute("SELECT max(d) FROM t;")
box.execute("SELECT count(d) FROM t;")
---
- metadata:
- - name: count(d)
+ - name: COLUMN_1
type: integer
rows:
- [4]
@@ -1876,7 +1872,7 @@ box.execute("SELECT count(d) FROM t;")
box.execute("SELECT group_concat(d) FROM t;")
---
- metadata:
- - name: group_concat(d)
+ - name: COLUMN_1
type: string
rows:
- ['10.0,-2.0,3.3,1.8e+19']
@@ -1884,7 +1880,7 @@ box.execute("SELECT group_concat(d) FROM t;")
box.execute("SELECT lower(d) FROM t;")
---
- metadata:
- - name: lower(d)
+ - name: COLUMN_1
type: string
rows:
- ['10.0']
@@ -1895,7 +1891,7 @@ box.execute("SELECT lower(d) FROM t;")
box.execute("SELECT upper(d) FROM t;")
---
- metadata:
- - name: upper(d)
+ - name: COLUMN_1
type: string
rows:
- ['10.0']
@@ -1906,7 +1902,7 @@ box.execute("SELECT upper(d) FROM t;")
box.execute("SELECT abs(d) FROM t;")
---
- metadata:
- - name: abs(d)
+ - name: COLUMN_1
type: number
rows:
- [10]
@@ -1917,7 +1913,7 @@ box.execute("SELECT abs(d) FROM t;")
box.execute("SELECT typeof(d) FROM t;")
---
- metadata:
- - name: typeof(d)
+ - name: COLUMN_1
type: string
rows:
- ['double']
@@ -1928,7 +1924,7 @@ box.execute("SELECT typeof(d) FROM t;")
box.execute("SELECT quote(d) FROM t;")
---
- metadata:
- - name: quote(d)
+ - name: COLUMN_1
type: string
rows:
- ['10.0']
@@ -1939,7 +1935,7 @@ box.execute("SELECT quote(d) FROM t;")
box.execute("SELECT LEAST(d, 0) FROM t;")
---
- metadata:
- - name: LEAST(d, 0)
+ - name: COLUMN_1
type: scalar
rows:
- [0]
@@ -2081,9 +2077,9 @@ box.execute("DROP TABLE t4;")
box.execute("SELECT 1.0, typeof(1.0);")
---
- metadata:
- - name: '1.0'
+ - name: COLUMN_1
type: double
- - name: typeof(1.0)
+ - name: COLUMN_2
type: string
rows:
- [1, 'double']
@@ -2091,9 +2087,9 @@ box.execute("SELECT 1.0, typeof(1.0);")
box.execute("SELECT CAST(2 AS DOUBLE), typeof(CAST(2 AS DOUBLE));")
---
- metadata:
- - name: CAST(2 AS DOUBLE)
+ - name: COLUMN_1
type: double
- - name: typeof(CAST(2 AS DOUBLE))
+ - name: COLUMN_2
type: string
rows:
- [2, 'double']
@@ -2101,9 +2097,9 @@ box.execute("SELECT CAST(2 AS DOUBLE), typeof(CAST(2 AS DOUBLE));")
box.execute("SELECT 3e3, typeof(3e3);")
---
- metadata:
- - name: '3e3'
+ - name: COLUMN_1
type: double
- - name: typeof(3e3)
+ - name: COLUMN_2
type: string
rows:
- [3000, 'double']
@@ -2121,7 +2117,7 @@ box.execute("SELECT d, TYPEOF(d) FROM t5;")
- metadata:
- name: D
type: double
- - name: TYPEOF(d)
+ - name: COLUMN_1
type: string
rows:
- [4, 'double']
--
2.21.0 (Apple Git-122)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Tarantool-patches] [PATCH] sql: use unify pattern for column names
2020-04-26 23:08 ` Roman Khabibov
@ 2020-05-01 19:35 ` Vladislav Shpilevoy
0 siblings, 0 replies; 9+ messages in thread
From: Vladislav Shpilevoy @ 2020-05-01 19:35 UTC (permalink / raw)
To: Roman Khabibov; +Cc: tarantool-patches
Hi! Thanks for the fixes!
>>> diff --git a/src/box/sql/select.c b/src/box/sql/select.c
>>> index 65e41f219..f39983761 100644
>>> --- a/src/box/sql/select.c
>>> +++ b/src/box/sql/select.c
>>> @@ -1946,14 +1946,13 @@ sqlColumnsFromExprList(Parse * parse, ExprList * expr_list,
>>> } else if (pColExpr->op == TK_ID) {
>>> assert(!ExprHasProperty(pColExpr, EP_IntValue));
>>> zName = pColExpr->u.zToken;
>>> - } else {
>>> - /* Use the original text of the column expression as its name */
>>> - zName = expr_list->a[i].zSpan;
>>> }
>>> }
>>> - if (zName == NULL)
>>> - zName = "_auto_field_";
>>> - zName = sqlMPrintf(db, "%s", zName);
>>> + if (zName == NULL) {
>>> + uint32_t idx = ++parse->autoname_i;
>>> + zName = (char *) sql_generate_column_name(idx);
>>
>> 2. Wait, I remember I asked to keep it const. I even provided a mini patch
>> how to keep it without casts. Why did you leave non-const char here?
> I know, but now I do uint32_t idx = ++parse->autoname_i;, so I need if else
> and your construction is not suitable already.
In that case you could provide your own construction. After all, I am not
the author of the patch.
In that particular case it can be solved by just making zName declared as
'const char *' instead of 'char *'. In your second commit.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Tarantool-patches] [PATCH] sql: use unify pattern for column names
@ 2020-02-16 10:14 Roman Khabibov
0 siblings, 0 replies; 9+ messages in thread
From: Roman Khabibov @ 2020-02-16 10:14 UTC (permalink / raw)
To: tarantool-patches
Name resulting columns generated by an expression or <VALUES>
construction by the "_COLUMN_N" pattern.
Closes #3962
@TarantoolBot document
Title: Column naming in SQL
Now, every auto generated column is named by the "_COLUMN_N"
pattern, where N is the number of column in a query. Auto
generated column is a column in a query result generated by an
expression or a column from <VALUES> construction.
---
Branch: https://github.com/tarantool/tarantool/tree/romanhabibov/gh-3962-column
Issue: https://github.com/tarantool/tarantool/issues/3962
src/box/sql/select.c | 8 +-
src/box/sql/sqlInt.h | 13 +
test/box/function1.result | 12 +-
test/sql-tap/colname.test.lua | 6 +-
test/sql-tap/select1.test.lua | 14 +-
test/sql/bind.result | 42 +-
test/sql/boolean.result | 350 ++++-----
test/sql/collation.result | 14 +-
test/sql/errinj.result | 2 +-
test/sql/foreign-keys.result | 4 +-
test/sql/full_metadata.result | 6 +-
test/sql/func-recreate.result | 2 +-
test/sql/gh-3199-no-mem-leaks.result | 24 +-
test/sql/gh-3888-values-blob-assert.result | 125 ++--
test/sql/icu-upper-lower.result | 82 +-
test/sql/integer-overflow.result | 14 +-
test/sql/iproto.result | 14 +-
test/sql/max-on-index.result | 6 +-
test/sql/misc.result | 299 ++++----
test/sql/persistency.result | 826 +++++++++++----------
test/sql/prepared.result | 18 +-
test/sql/row-count.result | 40 +-
test/sql/transition.result | 66 +-
test/sql/types.result | 222 +++---
24 files changed, 1119 insertions(+), 1090 deletions(-)
diff --git a/src/box/sql/select.c b/src/box/sql/select.c
index 65e41f219..a3e53f13b 100644
--- a/src/box/sql/select.c
+++ b/src/box/sql/select.c
@@ -1852,12 +1852,10 @@ generate_column_metadata(struct Parse *pParse, struct SrcList *pTabList,
const char *z = NULL;
if (colname != NULL)
z = colname;
- else if (span != NULL)
- z = span;
else
- z = tt_sprintf("column%d", i + 1);
+ z = sql_generate_column_name(i + 1);
vdbe_metadata_set_col_name(v, i, z);
- if (is_full_meta && colname != NULL)
+ if (is_full_meta)
vdbe_metadata_set_col_span(v, i, span);
}
}
@@ -1952,7 +1950,7 @@ sqlColumnsFromExprList(Parse * parse, ExprList * expr_list,
}
}
if (zName == NULL)
- zName = "_auto_field_";
+ zName = sql_generate_column_name(i + 1);
zName = sqlMPrintf(db, "%s", zName);
/* Make sure the column name is unique. If the name is not unique,
diff --git a/src/box/sql/sqlInt.h b/src/box/sql/sqlInt.h
index d1fcf4761..3d1b0a76e 100644
--- a/src/box/sql/sqlInt.h
+++ b/src/box/sql/sqlInt.h
@@ -4510,4 +4510,17 @@ int
sql_fieldno_by_name(struct Parse *parse_context, struct Expr *field_name,
uint32_t *fieldno);
+/**
+ * Return a string of the form "_COLUMN_N", where N is @a number.
+ *
+ * @param number Number of column.
+ *
+ * @retval string success.
+ */
+static inline char *
+sql_generate_column_name(uint32_t number)
+{
+ return (char *) tt_sprintf("_COLUMN_%d", number);
+}
+
#endif /* sqlINT_H */
diff --git a/test/box/function1.result b/test/box/function1.result
index b91d63c51..86cea4f3b 100644
--- a/test/box/function1.result
+++ b/test/box/function1.result
@@ -449,7 +449,7 @@ box.execute('SELECT "function1.divide"(6, 3, 3)')
box.execute('SELECT "function1.divide"(6, 3)')
---
- metadata:
- - name: '"function1.divide"(6, 3)'
+ - name: _COLUMN_1
type: number
rows:
- [2]
@@ -457,7 +457,7 @@ box.execute('SELECT "function1.divide"(6, 3)')
box.execute('SELECT "function1.divide"(5, 2)')
---
- metadata:
- - name: '"function1.divide"(5, 2)'
+ - name: _COLUMN_1
type: number
rows:
- [2.5]
@@ -482,7 +482,7 @@ test_run:cmd("setopt delimiter ''");
box.execute('SELECT summarize(1, 2)')
---
- metadata:
- - name: summarize(1, 2)
+ - name: _COLUMN_1
type: number
rows:
- [3]
@@ -505,7 +505,7 @@ test_run:cmd("setopt delimiter ''");
box.execute('SELECT summarize(1, 2)')
---
- metadata:
- - name: summarize(1, 2)
+ - name: _COLUMN_1
type: number
rows:
- [3]
@@ -519,7 +519,7 @@ box.func.SUMMARIZE:drop()
box.execute('SELECT lua(\'return 1 + 1\')')
---
- metadata:
- - name: lua('return 1 + 1')
+ - name: _COLUMN_1
type: any
rows:
- [2]
@@ -537,7 +537,7 @@ box.execute('SELECT lua(\'return box.cfg()\')')
box.execute('SELECT lua(\'return box.cfg.memtx_memory\')')
---
- metadata:
- - name: lua('return box.cfg.memtx_memory')
+ - name: _COLUMN_1
type: any
rows:
- [107374182]
diff --git a/test/sql-tap/colname.test.lua b/test/sql-tap/colname.test.lua
index caa61a07a..f8cd5cc0e 100755
--- a/test/sql-tap/colname.test.lua
+++ b/test/sql-tap/colname.test.lua
@@ -94,7 +94,7 @@ test:do_execsql2_test(
SELECT +tabc.a, -tabc.b, tabc.c, * FROM tabc
]], {
-- <colname-2.3>
- "+tabc.a",1,"-tabc.b",-2,"C",3,"A",1,"B",2,"C",3
+ "_COLUMN_1",1,"_COLUMN_2",-2,"C",3,"A",1,"B",2,"C",3
-- </colname-2.3>
})
@@ -194,7 +194,7 @@ test:do_execsql2_test(
SELECT +tabc.a, -tabc.b, tabc.c FROM tabc
]], {
-- <colname-3.3>
- "+tabc.a", 1, "-tabc.b", -2, "C", 3
+ "_COLUMN_1",1,"_COLUMN_2",-2,"C",3
-- </colname-3.3>
})
@@ -314,7 +314,7 @@ test:do_execsql2_test(
SELECT +tabc.a, -tabc.b, tabc.c FROM tabc
]], {
-- <colname-4.3>
- "+tabc.a", 1, "-tabc.b", -2, "TABC.C", 3
+ "_COLUMN_1",1,"_COLUMN_2",-2,"TABC.C",3
-- </colname-4.3>
})
diff --git a/test/sql-tap/select1.test.lua b/test/sql-tap/select1.test.lua
index fbebfab37..f983843e5 100755
--- a/test/sql-tap/select1.test.lua
+++ b/test/sql-tap/select1.test.lua
@@ -1032,7 +1032,7 @@ test:do_catchsql2_test(
SELECT f1+F2 FROM test1 ORDER BY f2
]], {
-- <select1-6.4a>
- 0, {"f1+F2", 33, "f1+F2", 77}
+ 0, {"_COLUMN_1",33,"_COLUMN_1",77}
-- </select1-6.4a>
})
@@ -1042,7 +1042,7 @@ test:do_catchsql2_test(
SELECT test1.f1+F2 FROM test1 ORDER BY f2
]], {
-- <select1-6.5>
- 0, {"test1.f1+F2", 33, "test1.f1+F2", 77}
+ 0, {"_COLUMN_1",33,"_COLUMN_1",77}
-- </select1-6.5>
})
@@ -1059,7 +1059,7 @@ test:do_test(
return table.insert(v,msg) or v
end, {
-- <select1-6.5.1>
- 0, {'test1.f1+F2', 33, 'test1.f1+F2', 77}
+ 0, {"_COLUMN_1",33,"_COLUMN_1",77}
-- </select1-6.5.1>
})
@@ -1068,7 +1068,7 @@ test:do_catchsql2_test(
[[SELECT test1.f1+F2, t1 FROM test1, test2
ORDER BY f2]], {
-- <select1-6.6>
- 0, {"test1.f1+F2", 33, "T1", "abc", "test1.f1+F2", 77, "T1", "abc"}
+ 0, {"_COLUMN_1",33,"T1","abc","_COLUMN_1",77,"T1","abc"}
-- </select1-6.6>
})
@@ -1161,7 +1161,7 @@ test:do_test(
]]
end, {
-- <select1-6.9.5>
- "123.45", 123.45
+ "_COLUMN_1",123.45
-- </select1-6.9.5>
})
@@ -1850,7 +1850,7 @@ test:do_execsql2_test(
SELECT 1+2+3
]], {
-- <select1-12.1>
- "1+2+3", 6
+ "_COLUMN_1",6
-- </select1-12.1>
})
@@ -1860,7 +1860,7 @@ test:do_execsql2_test(
SELECT 1,'hello',2
]], {
-- <select1-12.2>
- '1', 1, "'hello'", "hello", '2', 2
+ "_COLUMN_1",1,"_COLUMN_2","hello","_COLUMN_3",2
-- </select1-12.2>
})
diff --git a/test/sql/bind.result b/test/sql/bind.result
index b24094052..fd6eac834 100644
--- a/test/sql/bind.result
+++ b/test/sql/bind.result
@@ -77,11 +77,11 @@ execute('SELECT * FROM test WHERE id = :value', parameters)
execute('SELECT ?, ?, ?', {1, 2, 3})
---
- metadata:
- - name: '?'
+ - name: _COLUMN_1
type: integer
- - name: '?'
+ - name: _COLUMN_2
type: integer
- - name: '?'
+ - name: _COLUMN_3
type: integer
rows:
- [1, 2, 3]
@@ -107,11 +107,11 @@ parameters[3][':value1'] = 11
execute('SELECT ?, :value1, @value2', parameters)
---
- metadata:
- - name: '?'
+ - name: _COLUMN_1
type: integer
- - name: :value1
+ - name: _COLUMN_2
type: integer
- - name: '@value2'
+ - name: _COLUMN_3
type: integer
rows:
- [10, 11, 12]
@@ -149,22 +149,22 @@ parameters[6]['@value2'] = 6
execute('SELECT :value3, ?, :value1, ?, ?, @value2, ?, :value3', parameters)
---
- metadata:
- - name: :value3
+ - name: _COLUMN_1
type: integer
- - name: '?'
+ - name: _COLUMN_2
type: integer
- - name: :value1
+ - name: _COLUMN_3
type: integer
- - name: '?'
+ - name: _COLUMN_4
type: integer
- - name: '?'
+ - name: _COLUMN_5
type: integer
- - name: '@value2'
+ - name: _COLUMN_6
type: integer
- - name: '?'
+ - name: _COLUMN_7
+ type: boolean
+ - name: _COLUMN_8
type: boolean
- - name: :value3
- type: integer
rows:
- [1, 2, 3, 4, 5, 6, null, 1]
...
@@ -175,15 +175,15 @@ msgpack = require('msgpack')
execute('SELECT ?, ?, ?, ?, ?', {'abc', -123.456, msgpack.NULL, true, false})
---
- metadata:
- - name: '?'
+ - name: _COLUMN_1
type: text
- - name: '?'
+ - name: _COLUMN_2
type: numeric
- - name: '?'
+ - name: _COLUMN_3
type: boolean
- - name: '?'
+ - name: _COLUMN_4
type: boolean
- - name: '?'
+ - name: _COLUMN_5
type: boolean
rows:
- ['abc', -123.456, null, true, false]
@@ -290,7 +290,7 @@ execute('SELECT :value', parameters)
execute('SELECT ? ', {18446744073709551615ULL})
---
- metadata:
- - name: '?'
+ - name: _COLUMN_1
type: integer
rows:
- [18446744073709551615]
diff --git a/test/sql/boolean.result b/test/sql/boolean.result
index 7769d0cb3..8fe4306a0 100644
--- a/test/sql/boolean.result
+++ b/test/sql/boolean.result
@@ -241,7 +241,7 @@ i > 0
SELECT return_type(a) FROM t;
| ---
| - metadata:
- | - name: return_type(a)
+ | - name: _COLUMN_1
| type: string
| rows:
| - ['boolean']
@@ -250,7 +250,7 @@ SELECT return_type(a) FROM t;
SELECT return_type('false');
| ---
| - metadata:
- | - name: return_type('false')
+ | - name: _COLUMN_1
| type: string
| rows:
| - ['string']
@@ -258,7 +258,7 @@ SELECT return_type('false');
SELECT is_boolean(a) FROM t LIMIT 1;
| ---
| - metadata:
- | - name: is_boolean(a)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -266,7 +266,7 @@ SELECT is_boolean(a) FROM t LIMIT 1;
SELECT is_boolean('true');
| ---
| - metadata:
- | - name: is_boolean('true')
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -281,7 +281,7 @@ SELECT abs(a) FROM t0;
SELECT lower(a) FROM t0;
| ---
| - metadata:
- | - name: lower(a)
+ | - name: _COLUMN_1
| type: string
| rows:
| - ['false']
@@ -292,7 +292,7 @@ SELECT lower(a) FROM t0;
SELECT upper(a) FROM t0;
| ---
| - metadata:
- | - name: upper(a)
+ | - name: _COLUMN_1
| type: string
| rows:
| - ['FALSE']
@@ -303,7 +303,7 @@ SELECT upper(a) FROM t0;
SELECT quote(a) FROM t0;
| ---
| - metadata:
- | - name: quote(a)
+ | - name: _COLUMN_1
| type: string
| rows:
| - ['FALSE']
@@ -315,7 +315,7 @@ SELECT quote(a) FROM t0;
SELECT length(a) FROM t0;
| ---
| - metadata:
- | - name: length(a)
+ | - name: _COLUMN_1
| type: integer
| rows:
| - [5]
@@ -326,7 +326,7 @@ SELECT length(a) FROM t0;
SELECT typeof(a) FROM t0;
| ---
| - metadata:
- | - name: typeof(a)
+ | - name: _COLUMN_1
| type: string
| rows:
| - ['boolean']
@@ -344,7 +344,7 @@ SELECT AVG(a) FROM t0;
SELECT MIN(a) FROM t0;
| ---
| - metadata:
- | - name: MIN(a)
+ | - name: _COLUMN_1
| type: scalar
| rows:
| - [false]
@@ -352,7 +352,7 @@ SELECT MIN(a) FROM t0;
SELECT MAX(a) FROM t0;
| ---
| - metadata:
- | - name: MAX(a)
+ | - name: _COLUMN_1
| type: scalar
| rows:
| - [true]
@@ -365,7 +365,7 @@ SELECT SUM(a) FROM t0;
SELECT COUNT(a) FROM t0;
| ---
| - metadata:
- | - name: COUNT(a)
+ | - name: _COLUMN_1
| type: integer
| rows:
| - [2]
@@ -378,7 +378,7 @@ SELECT TOTAL(a) FROM t0;
SELECT GROUP_CONCAT(a, ' +++ ') FROM t0;
| ---
| - metadata:
- | - name: GROUP_CONCAT(a, ' +++ ')
+ | - name: _COLUMN_1
| type: string
| rows:
| - ['FALSE +++ TRUE']
@@ -392,13 +392,13 @@ SELECT GROUP_CONCAT(a, ' +++ ') FROM t0;
box.execute('SELECT ?, ?, return_type($1), typeof($2);', {true, false})
| ---
| - metadata:
- | - name: '?'
+ | - name: _COLUMN_1
| type: boolean
- | - name: '?'
+ | - name: _COLUMN_2
| type: boolean
- | - name: return_type($1)
+ | - name: _COLUMN_3
| type: string
- | - name: typeof($2)
+ | - name: _COLUMN_4
| type: string
| rows:
| - [true, false, 'boolean', 'boolean']
@@ -422,9 +422,9 @@ parameters[2][':value1'] = false
box.execute('SELECT :value1, @value2;', parameters)
| ---
| - metadata:
- | - name: :value1
+ | - name: _COLUMN_1
| type: boolean
- | - name: '@value2'
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -501,9 +501,9 @@ INSERT INTO t3 VALUES (4, false)
SELECT cast(true AS INTEGER), cast(false AS INTEGER);
| ---
| - metadata:
- | - name: cast(true AS INTEGER)
+ | - name: _COLUMN_1
| type: integer
- | - name: cast(false AS INTEGER)
+ | - name: _COLUMN_2
| type: integer
| rows:
| - [1, 0]
@@ -517,9 +517,9 @@ SELECT cast(true AS NUMBER), cast(false AS NUMBER);
SELECT cast(true AS TEXT), cast(false AS TEXT);
| ---
| - metadata:
- | - name: cast(true AS TEXT)
+ | - name: _COLUMN_1
| type: string
- | - name: cast(false AS TEXT)
+ | - name: _COLUMN_2
| type: string
| rows:
| - ['TRUE', 'FALSE']
@@ -527,9 +527,9 @@ SELECT cast(true AS TEXT), cast(false AS TEXT);
SELECT cast(true AS BOOLEAN), cast(false AS BOOLEAN);
| ---
| - metadata:
- | - name: cast(true AS BOOLEAN)
+ | - name: _COLUMN_1
| type: boolean
- | - name: cast(false AS BOOLEAN)
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [true, false]
@@ -539,11 +539,11 @@ SELECT cast(true AS BOOLEAN), cast(false AS BOOLEAN);
SELECT cast(100 AS BOOLEAN), cast(1 AS BOOLEAN), cast(0 AS BOOLEAN);
| ---
| - metadata:
- | - name: cast(100 AS BOOLEAN)
+ | - name: _COLUMN_1
| type: boolean
- | - name: cast(1 AS BOOLEAN)
+ | - name: _COLUMN_2
| type: boolean
- | - name: cast(0 AS BOOLEAN)
+ | - name: _COLUMN_3
| type: boolean
| rows:
| - [true, true, false]
@@ -551,9 +551,9 @@ SELECT cast(100 AS BOOLEAN), cast(1 AS BOOLEAN), cast(0 AS BOOLEAN);
SELECT cast(0.123 AS BOOLEAN), cast(0.0 AS BOOLEAN);
| ---
| - metadata:
- | - name: cast(0.123 AS BOOLEAN)
+ | - name: _COLUMN_1
| type: boolean
- | - name: cast(0.0 AS BOOLEAN)
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [true, false]
@@ -561,9 +561,9 @@ SELECT cast(0.123 AS BOOLEAN), cast(0.0 AS BOOLEAN);
SELECT cast('true' AS BOOLEAN), cast('false' AS BOOLEAN);
| ---
| - metadata:
- | - name: cast('true' AS BOOLEAN)
+ | - name: _COLUMN_1
| type: boolean
- | - name: cast('false' AS BOOLEAN)
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [true, false]
@@ -571,9 +571,9 @@ SELECT cast('true' AS BOOLEAN), cast('false' AS BOOLEAN);
SELECT cast('TRUE' AS BOOLEAN), cast('FALSE' AS BOOLEAN);
| ---
| - metadata:
- | - name: cast('TRUE' AS BOOLEAN)
+ | - name: _COLUMN_1
| type: boolean
- | - name: cast('FALSE' AS BOOLEAN)
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [true, false]
@@ -882,7 +882,7 @@ SELECT a, COUNT(*) FROM (SELECT * FROM t4 UNION SELECT * FROM t5) GROUP BY a;
| - metadata:
| - name: A
| type: boolean
- | - name: COUNT(*)
+ | - name: _COLUMN_2
| type: integer
| rows:
| - [false, 3]
@@ -902,7 +902,7 @@ INSERT INTO t6 VALUES (true, false), (false, true);
SELECT NOT true;
| ---
| - metadata:
- | - name: NOT true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -910,7 +910,7 @@ SELECT NOT true;
SELECT NOT false;
| ---
| - metadata:
- | - name: NOT false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -920,7 +920,7 @@ SELECT a, NOT a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: NOT a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -930,7 +930,7 @@ SELECT a, NOT a FROM t;
SELECT true AND true;
| ---
| - metadata:
- | - name: true AND true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -938,7 +938,7 @@ SELECT true AND true;
SELECT true AND false;
| ---
| - metadata:
- | - name: true AND false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -946,7 +946,7 @@ SELECT true AND false;
SELECT false AND true;
| ---
| - metadata:
- | - name: false AND true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -954,7 +954,7 @@ SELECT false AND true;
SELECT false AND false;
| ---
| - metadata:
- | - name: false AND false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -962,7 +962,7 @@ SELECT false AND false;
SELECT true OR true;
| ---
| - metadata:
- | - name: true OR true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -970,7 +970,7 @@ SELECT true OR true;
SELECT true OR false;
| ---
| - metadata:
- | - name: true OR false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -978,7 +978,7 @@ SELECT true OR false;
SELECT false OR true;
| ---
| - metadata:
- | - name: false OR true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -986,7 +986,7 @@ SELECT false OR true;
SELECT false OR false;
| ---
| - metadata:
- | - name: false OR false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -997,7 +997,7 @@ SELECT a, true AND a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: true AND a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -1008,7 +1008,7 @@ SELECT a, false AND a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: false AND a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -1019,7 +1019,7 @@ SELECT a, true OR a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: true OR a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -1030,7 +1030,7 @@ SELECT a, false OR a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: false OR a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -1041,7 +1041,7 @@ SELECT a, a AND true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a AND true
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -1052,7 +1052,7 @@ SELECT a, a AND false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a AND false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -1063,7 +1063,7 @@ SELECT a, a OR true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a OR true
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -1074,7 +1074,7 @@ SELECT a, a OR false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a OR false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -1088,7 +1088,7 @@ SELECT a, a1, a AND a1 FROM t, t6;
| type: boolean
| - name: A1
| type: boolean
- | - name: a AND a1
+ | - name: _COLUMN_3
| type: boolean
| rows:
| - [false, false, false]
@@ -1103,7 +1103,7 @@ SELECT a, a1, a OR a1 FROM t, t6;
| type: boolean
| - name: A1
| type: boolean
- | - name: a OR a1
+ | - name: _COLUMN_3
| type: boolean
| rows:
| - [false, false, false]
@@ -1617,7 +1617,7 @@ SELECT a1, a2, a2 || a2 FROM t6;
SELECT true > true;
| ---
| - metadata:
- | - name: true > true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -1625,7 +1625,7 @@ SELECT true > true;
SELECT true > false;
| ---
| - metadata:
- | - name: true > false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -1633,7 +1633,7 @@ SELECT true > false;
SELECT false > true;
| ---
| - metadata:
- | - name: false > true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -1641,7 +1641,7 @@ SELECT false > true;
SELECT false > false;
| ---
| - metadata:
- | - name: false > false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -1649,7 +1649,7 @@ SELECT false > false;
SELECT true < true;
| ---
| - metadata:
- | - name: true < true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -1657,7 +1657,7 @@ SELECT true < true;
SELECT true < false;
| ---
| - metadata:
- | - name: true < false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -1665,7 +1665,7 @@ SELECT true < false;
SELECT false < true;
| ---
| - metadata:
- | - name: false < true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -1673,7 +1673,7 @@ SELECT false < true;
SELECT false < false;
| ---
| - metadata:
- | - name: false < false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -1684,7 +1684,7 @@ SELECT a, true > a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: true > a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -1695,7 +1695,7 @@ SELECT a, false > a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: false > a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -1706,7 +1706,7 @@ SELECT a, true < a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: true < a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -1717,7 +1717,7 @@ SELECT a, false < a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: false < a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -1728,7 +1728,7 @@ SELECT a, a > true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a > true
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -1739,7 +1739,7 @@ SELECT a, a > false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a > false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -1750,7 +1750,7 @@ SELECT a, a < true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a < true
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -1761,7 +1761,7 @@ SELECT a, a < false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a < false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -1775,7 +1775,7 @@ SELECT a, a1, a > a1 FROM t, t6;
| type: boolean
| - name: A1
| type: boolean
- | - name: a > a1
+ | - name: _COLUMN_3
| type: boolean
| rows:
| - [false, false, false]
@@ -1790,7 +1790,7 @@ SELECT a, a1, a < a1 FROM t, t6;
| type: boolean
| - name: A1
| type: boolean
- | - name: a < a1
+ | - name: _COLUMN_3
| type: boolean
| rows:
| - [false, false, false]
@@ -1802,7 +1802,7 @@ SELECT a, a1, a < a1 FROM t, t6;
SELECT true >= true;
| ---
| - metadata:
- | - name: true >= true
+ | - name: _COLUMN_1
| type: any
| rows:
| - [true]
@@ -1810,7 +1810,7 @@ SELECT true >= true;
SELECT true >= false;
| ---
| - metadata:
- | - name: true >= false
+ | - name: _COLUMN_1
| type: any
| rows:
| - [true]
@@ -1818,7 +1818,7 @@ SELECT true >= false;
SELECT false >= true;
| ---
| - metadata:
- | - name: false >= true
+ | - name: _COLUMN_1
| type: any
| rows:
| - [false]
@@ -1826,7 +1826,7 @@ SELECT false >= true;
SELECT false >= false;
| ---
| - metadata:
- | - name: false >= false
+ | - name: _COLUMN_1
| type: any
| rows:
| - [true]
@@ -1834,7 +1834,7 @@ SELECT false >= false;
SELECT true <= true;
| ---
| - metadata:
- | - name: true <= true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -1842,7 +1842,7 @@ SELECT true <= true;
SELECT true <= false;
| ---
| - metadata:
- | - name: true <= false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -1850,7 +1850,7 @@ SELECT true <= false;
SELECT false <= true;
| ---
| - metadata:
- | - name: false <= true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -1858,7 +1858,7 @@ SELECT false <= true;
SELECT false <= false;
| ---
| - metadata:
- | - name: false <= false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -1869,7 +1869,7 @@ SELECT a, true >= a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: true >= a
+ | - name: _COLUMN_2
| type: any
| rows:
| - [false, true]
@@ -1880,7 +1880,7 @@ SELECT a, false >= a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: false >= a
+ | - name: _COLUMN_2
| type: any
| rows:
| - [false, true]
@@ -1891,7 +1891,7 @@ SELECT a, true <= a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: true <= a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -1902,7 +1902,7 @@ SELECT a, false <= a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: false <= a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -1913,7 +1913,7 @@ SELECT a, a >= true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a >= true
+ | - name: _COLUMN_2
| type: any
| rows:
| - [false, false]
@@ -1924,7 +1924,7 @@ SELECT a, a >= false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a >= false
+ | - name: _COLUMN_2
| type: any
| rows:
| - [false, true]
@@ -1935,7 +1935,7 @@ SELECT a, a <= true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a <= true
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -1946,7 +1946,7 @@ SELECT a, a <= false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a <= false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -1960,7 +1960,7 @@ SELECT a, a1, a >= a1 FROM t, t6;
| type: boolean
| - name: A1
| type: boolean
- | - name: a >= a1
+ | - name: _COLUMN_3
| type: any
| rows:
| - [false, false, true]
@@ -1975,7 +1975,7 @@ SELECT a, a1, a <= a1 FROM t, t6;
| type: boolean
| - name: A1
| type: boolean
- | - name: a <= a1
+ | - name: _COLUMN_3
| type: boolean
| rows:
| - [false, false, true]
@@ -1987,7 +1987,7 @@ SELECT a, a1, a <= a1 FROM t, t6;
SELECT true == true;
| ---
| - metadata:
- | - name: true == true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -1995,7 +1995,7 @@ SELECT true == true;
SELECT true == false;
| ---
| - metadata:
- | - name: true == false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2003,7 +2003,7 @@ SELECT true == false;
SELECT false == true;
| ---
| - metadata:
- | - name: false == true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2011,7 +2011,7 @@ SELECT false == true;
SELECT false == false;
| ---
| - metadata:
- | - name: false == false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2019,7 +2019,7 @@ SELECT false == false;
SELECT true != true;
| ---
| - metadata:
- | - name: true != true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2027,7 +2027,7 @@ SELECT true != true;
SELECT true != false;
| ---
| - metadata:
- | - name: true != false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2035,7 +2035,7 @@ SELECT true != false;
SELECT false != true;
| ---
| - metadata:
- | - name: false != true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2043,7 +2043,7 @@ SELECT false != true;
SELECT false != false;
| ---
| - metadata:
- | - name: false != false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2054,7 +2054,7 @@ SELECT a, true == a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: true == a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -2065,7 +2065,7 @@ SELECT a, false == a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: false == a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -2076,7 +2076,7 @@ SELECT a, true != a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: true != a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -2087,7 +2087,7 @@ SELECT a, false != a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: false != a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -2098,7 +2098,7 @@ SELECT a, a == true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a == true
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -2109,7 +2109,7 @@ SELECT a, a == false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a == false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -2120,7 +2120,7 @@ SELECT a, a != true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a != true
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -2131,7 +2131,7 @@ SELECT a, a != false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a != false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -2145,7 +2145,7 @@ SELECT a, a1, a == a1 FROM t, t6;
| type: boolean
| - name: A1
| type: boolean
- | - name: a == a1
+ | - name: _COLUMN_3
| type: boolean
| rows:
| - [false, false, true]
@@ -2160,7 +2160,7 @@ SELECT a, a1, a != a1 FROM t, t6;
| type: boolean
| - name: A1
| type: boolean
- | - name: a != a1
+ | - name: _COLUMN_3
| type: boolean
| rows:
| - [false, false, false]
@@ -2172,7 +2172,7 @@ SELECT a, a1, a != a1 FROM t, t6;
SELECT true IN (true);
| ---
| - metadata:
- | - name: true IN (true)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2180,7 +2180,7 @@ SELECT true IN (true);
SELECT false IN (true);
| ---
| - metadata:
- | - name: false IN (true)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2188,7 +2188,7 @@ SELECT false IN (true);
SELECT true IN (false);
| ---
| - metadata:
- | - name: true IN (false)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2196,7 +2196,7 @@ SELECT true IN (false);
SELECT false IN (false);
| ---
| - metadata:
- | - name: false IN (false)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2204,7 +2204,7 @@ SELECT false IN (false);
SELECT true IN (true, false);
| ---
| - metadata:
- | - name: true IN (true, false)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2212,7 +2212,7 @@ SELECT true IN (true, false);
SELECT false IN (true, false);
| ---
| - metadata:
- | - name: false IN (true, false)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2220,7 +2220,7 @@ SELECT false IN (true, false);
SELECT true IN (SELECT a1 FROM t6);
| ---
| - metadata:
- | - name: true IN (SELECT a1 FROM t6)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2228,7 +2228,7 @@ SELECT true IN (SELECT a1 FROM t6);
SELECT false IN (SELECT a1 FROM t6);
| ---
| - metadata:
- | - name: false IN (SELECT a1 FROM t6)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2236,7 +2236,7 @@ SELECT false IN (SELECT a1 FROM t6);
SELECT true IN (SELECT a1 FROM t6 LIMIT 1);
| ---
| - metadata:
- | - name: true IN (SELECT a1 FROM t6 LIMIT 1)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2244,7 +2244,7 @@ SELECT true IN (SELECT a1 FROM t6 LIMIT 1);
SELECT false IN (SELECT a1 FROM t6 LIMIT 1);
| ---
| - metadata:
- | - name: false IN (SELECT a1 FROM t6 LIMIT 1)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2252,7 +2252,7 @@ SELECT false IN (SELECT a1 FROM t6 LIMIT 1);
SELECT true IN (1, 1.2, 'true', false);
| ---
| - metadata:
- | - name: true IN (1, 1.2, 'true', false)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2260,7 +2260,7 @@ SELECT true IN (1, 1.2, 'true', false);
SELECT false IN (1, 1.2, 'true', false);
| ---
| - metadata:
- | - name: false IN (1, 1.2, 'true', false)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2271,7 +2271,7 @@ SELECT a, a IN (true) FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a IN (true)
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -2282,7 +2282,7 @@ SELECT a, a IN (false) FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a IN (false)
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -2293,7 +2293,7 @@ SELECT a, a IN (true, false) FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a IN (true, false)
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -2304,7 +2304,7 @@ SELECT a, a IN (SELECT a1 FROM t6 LIMIT 1) FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a IN (SELECT a1 FROM t6 LIMIT 1)
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -2315,7 +2315,7 @@ SELECT a, a IN (SELECT a1 FROM t6) FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a IN (SELECT a1 FROM t6)
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -2326,7 +2326,7 @@ SELECT a, a IN (1, 1.2, 'true', false) FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a IN (1, 1.2, 'true', false)
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -2336,7 +2336,7 @@ SELECT a, a IN (1, 1.2, 'true', false) FROM t;
SELECT true BETWEEN true AND true;
| ---
| - metadata:
- | - name: true BETWEEN true AND true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2344,7 +2344,7 @@ SELECT true BETWEEN true AND true;
SELECT false BETWEEN true AND true;
| ---
| - metadata:
- | - name: false BETWEEN true AND true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2352,7 +2352,7 @@ SELECT false BETWEEN true AND true;
SELECT true BETWEEN false AND false;
| ---
| - metadata:
- | - name: true BETWEEN false AND false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2360,7 +2360,7 @@ SELECT true BETWEEN false AND false;
SELECT false BETWEEN false AND false;
| ---
| - metadata:
- | - name: false BETWEEN false AND false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2368,7 +2368,7 @@ SELECT false BETWEEN false AND false;
SELECT true BETWEEN true AND false;
| ---
| - metadata:
- | - name: true BETWEEN true AND false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2376,7 +2376,7 @@ SELECT true BETWEEN true AND false;
SELECT false BETWEEN true AND false;
| ---
| - metadata:
- | - name: false BETWEEN true AND false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2384,7 +2384,7 @@ SELECT false BETWEEN true AND false;
SELECT true BETWEEN false AND true;
| ---
| - metadata:
- | - name: true BETWEEN false AND true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2392,7 +2392,7 @@ SELECT true BETWEEN false AND true;
SELECT false BETWEEN false AND true;
| ---
| - metadata:
- | - name: false BETWEEN false AND true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2403,7 +2403,7 @@ SELECT a, a BETWEEN true AND true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a BETWEEN true AND true
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -2414,7 +2414,7 @@ SELECT a, a BETWEEN false AND false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a BETWEEN false AND false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -2425,7 +2425,7 @@ SELECT a, a BETWEEN true AND false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a BETWEEN true AND false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -2436,7 +2436,7 @@ SELECT a, a BETWEEN false AND true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a BETWEEN false AND true
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -2461,7 +2461,7 @@ SELECT true AND 2;
SELECT false AND 2;
| ---
| - metadata:
- | - name: false AND 2
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2484,7 +2484,7 @@ SELECT 2 AND true;
SELECT 2 AND false;
| ---
| - metadata:
- | - name: 2 AND false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2551,7 +2551,7 @@ SELECT b, false AND b FROM t7;
| - metadata:
| - name: B
| type: integer
- | - name: false AND b
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [123, false]
@@ -2576,7 +2576,7 @@ SELECT b, b AND false FROM t7;
| - metadata:
| - name: B
| type: integer
- | - name: b AND false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [123, false]
@@ -3856,7 +3856,7 @@ SELECT a2, b, b != a2 FROM t6, t7;
SELECT true IN (0, 1, 2, 3);
| ---
| - metadata:
- | - name: true IN (0, 1, 2, 3)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -3864,7 +3864,7 @@ SELECT true IN (0, 1, 2, 3);
SELECT false IN (0, 1, 2, 3);
| ---
| - metadata:
- | - name: false IN (0, 1, 2, 3)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -3884,7 +3884,7 @@ SELECT a1, a1 IN (0, 1, 2, 3) FROM t6
| - metadata:
| - name: A1
| type: boolean
- | - name: a1 IN (0, 1, 2, 3)
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -3930,7 +3930,7 @@ SELECT true AND 2.3;
SELECT false AND 2.3;
| ---
| - metadata:
- | - name: false AND 2.3
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -3953,7 +3953,7 @@ SELECT 2.3 AND true;
SELECT 2.3 AND false;
| ---
| - metadata:
- | - name: 2.3 AND false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -4020,7 +4020,7 @@ SELECT c, false AND c FROM t8;
| - metadata:
| - name: C
| type: number
- | - name: false AND c
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [4.56, false]
@@ -4045,7 +4045,7 @@ SELECT c, c AND false FROM t8;
| - metadata:
| - name: C
| type: number
- | - name: c AND false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [4.56, false]
@@ -5001,7 +5001,7 @@ SELECT a2, c, c != a2 FROM t6, t8;
SELECT true IN (0.1, 1.2, 2.3, 3.4);
| ---
| - metadata:
- | - name: true IN (0.1, 1.2, 2.3, 3.4)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5009,7 +5009,7 @@ SELECT true IN (0.1, 1.2, 2.3, 3.4);
SELECT false IN (0.1, 1.2, 2.3, 3.4);
| ---
| - metadata:
- | - name: false IN (0.1, 1.2, 2.3, 3.4)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5017,7 +5017,7 @@ SELECT false IN (0.1, 1.2, 2.3, 3.4);
SELECT a1 IN (0.1, 1.2, 2.3, 3.4) FROM t6 LIMIT 1;
| ---
| - metadata:
- | - name: a1 IN (0.1, 1.2, 2.3, 3.4)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5025,7 +5025,7 @@ SELECT a1 IN (0.1, 1.2, 2.3, 3.4) FROM t6 LIMIT 1;
SELECT a2 IN (0.1, 1.2, 2.3, 3.4) FROM t6 LIMIT 1;
| ---
| - metadata:
- | - name: a2 IN (0.1, 1.2, 2.3, 3.4)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5090,7 +5090,7 @@ SELECT true AND 'abc';
SELECT false AND 'abc';
| ---
| - metadata:
- | - name: false AND 'abc'
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5113,7 +5113,7 @@ SELECT 'abc' AND true;
SELECT 'abc' AND false;
| ---
| - metadata:
- | - name: '''abc'' AND false'
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5180,7 +5180,7 @@ SELECT d, false AND d FROM t9;
| - metadata:
| - name: D
| type: string
- | - name: false AND d
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - ['AsdF', false]
@@ -5205,7 +5205,7 @@ SELECT d, d AND false FROM t9;
| - metadata:
| - name: D
| type: string
- | - name: d AND false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - ['AsdF', false]
@@ -5465,7 +5465,7 @@ SELECT true AND 'TRUE';
SELECT false AND 'TRUE';
| ---
| - metadata:
- | - name: false AND 'TRUE'
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5488,7 +5488,7 @@ SELECT 'TRUE' AND true;
SELECT 'TRUE' AND false;
| ---
| - metadata:
- | - name: '''TRUE'' AND false'
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5555,7 +5555,7 @@ SELECT d, false AND d FROM t9 WHERE d = 'TRUE';
| - metadata:
| - name: D
| type: string
- | - name: false AND d
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - ['TRUE', false]
@@ -5580,7 +5580,7 @@ SELECT d, d AND false FROM t9 WHERE d = 'TRUE';
| - metadata:
| - name: D
| type: string
- | - name: d AND false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - ['TRUE', false]
@@ -5645,7 +5645,7 @@ SELECT true AND 'true';
SELECT false AND 'true';
| ---
| - metadata:
- | - name: false AND 'true'
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5668,7 +5668,7 @@ SELECT 'true' AND true;
SELECT 'true' AND false;
| ---
| - metadata:
- | - name: '''true'' AND false'
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5735,7 +5735,7 @@ SELECT d, false AND d FROM t9 WHERE d = 'true';
| - metadata:
| - name: D
| type: string
- | - name: false AND d
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - ['true', false]
@@ -5760,7 +5760,7 @@ SELECT d, d AND false FROM t9 WHERE d = 'true';
| - metadata:
| - name: D
| type: string
- | - name: d AND false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - ['true', false]
@@ -5825,7 +5825,7 @@ SELECT true AND 'FALSE';
SELECT false AND 'FALSE';
| ---
| - metadata:
- | - name: false AND 'FALSE'
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5848,7 +5848,7 @@ SELECT 'FALSE' AND true;
SELECT 'FALSE' AND false;
| ---
| - metadata:
- | - name: '''FALSE'' AND false'
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5915,7 +5915,7 @@ SELECT d, false AND d FROM t9 WHERE d = 'FALSE';
| - metadata:
| - name: D
| type: string
- | - name: false AND d
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - ['FALSE', false]
@@ -5940,7 +5940,7 @@ SELECT d, d AND false FROM t9 WHERE d = 'FALSE';
| - metadata:
| - name: D
| type: string
- | - name: d AND false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - ['FALSE', false]
@@ -6005,7 +6005,7 @@ SELECT true AND 'false';
SELECT false AND 'false';
| ---
| - metadata:
- | - name: false AND 'false'
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -6028,7 +6028,7 @@ SELECT 'false' AND true;
SELECT 'false' AND false;
| ---
| - metadata:
- | - name: '''false'' AND false'
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -6095,7 +6095,7 @@ SELECT d, false AND d FROM t9 WHERE d = 'false';
| - metadata:
| - name: D
| type: string
- | - name: false AND d
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - ['false', false]
@@ -6120,7 +6120,7 @@ SELECT d, d AND false FROM t9 WHERE d = 'false';
| - metadata:
| - name: D
| type: string
- | - name: d AND false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - ['false', false]
diff --git a/test/sql/collation.result b/test/sql/collation.result
index 4e4c27ef0..b1035d569 100644
--- a/test/sql/collation.result
+++ b/test/sql/collation.result
@@ -111,7 +111,7 @@ box.execute([[SELECT descriptor, upper(letter), letter FROM tu where UPPER(lette
- metadata:
- name: DESCRIPTOR
type: string
- - name: upper(letter)
+ - name: _COLUMN_2
type: string
- name: LETTER
type: string
@@ -124,7 +124,7 @@ box.execute([[SELECT descriptor, upper(letter COLLATE "GERMAN"), letter FROM tu
- metadata:
- name: DESCRIPTOR
type: string
- - name: upper(letter COLLATE "GERMAN")
+ - name: _COLUMN_2
type: string
- name: LETTER
type: string
@@ -335,14 +335,14 @@ box.execute("SELECT a FROM t UNION SELECT c FROM t;")
box.execute("SELECT c COLLATE \"binary\" FROM t UNION SELECT a FROM t;")
---
- metadata:
- - name: c COLLATE "binary"
+ - name: _COLUMN_1
type: string
rows: []
...
box.execute("SELECT b COLLATE \"unicode\" FROM t UNION SELECT a FROM t;")
---
- metadata:
- - name: b COLLATE "unicode"
+ - name: _COLUMN_1
type: string
rows: []
...
@@ -1128,7 +1128,7 @@ box.execute("INSERT INTO jj VALUES (1,'A'), (2,'a')")
box.execute("SELECT DISTINCT trim(s2) FROM jj;")
---
- metadata:
- - name: trim(s2)
+ - name: _COLUMN_1
type: string
rows:
- ['A']
@@ -1140,7 +1140,7 @@ box.execute("INSERT INTO jj VALUES (3, 'aS'), (4, 'AS');")
box.execute("SELECT DISTINCT replace(s2, 'S', 's') FROM jj;")
---
- metadata:
- - name: replace(s2, 'S', 's')
+ - name: _COLUMN_1
type: string
rows:
- ['A']
@@ -1149,7 +1149,7 @@ box.execute("SELECT DISTINCT replace(s2, 'S', 's') FROM jj;")
box.execute("SELECT DISTINCT substr(s2, 1, 1) FROM jj;")
---
- metadata:
- - name: substr(s2, 1, 1)
+ - name: _COLUMN_1
type: string
rows:
- ['A']
diff --git a/test/sql/errinj.result b/test/sql/errinj.result
index 68c001f28..c41739bb7 100644
--- a/test/sql/errinj.result
+++ b/test/sql/errinj.result
@@ -120,7 +120,7 @@ insert_res
select_res
---
- metadata:
- - name: '1'
+ - name: _COLUMN_1
type: integer
rows:
- [1]
diff --git a/test/sql/foreign-keys.result b/test/sql/foreign-keys.result
index f1d973443..3093b5852 100644
--- a/test/sql/foreign-keys.result
+++ b/test/sql/foreign-keys.result
@@ -357,7 +357,7 @@ box.execute('ALTER TABLE tc ADD CONSTRAINT fk1 FOREIGN KEY (id) REFERENCES tp(id
box.execute('SELECT row_count();')
---
- metadata:
- - name: row_count()
+ - name: _COLUMN_1
type: integer
rows:
- [1]
@@ -374,7 +374,7 @@ box.execute('ALTER TABLE tc DROP CONSTRAINT fk1;')
box.execute('SELECT row_count();')
---
- metadata:
- - name: row_count()
+ - name: _COLUMN_1
type: integer
rows:
- [1]
diff --git a/test/sql/full_metadata.result b/test/sql/full_metadata.result
index 5a93c41ec..697177ae1 100644
--- a/test/sql/full_metadata.result
+++ b/test/sql/full_metadata.result
@@ -57,7 +57,7 @@ execute("SELECT 'aSd' COLLATE \"unicode_ci\";")
| - metadata:
| - type: string
| span: '''aSd'' COLLATE "unicode_ci"'
- | name: '''aSd'' COLLATE "unicode_ci"'
+ | name: _COLUMN_1
| collation: unicode_ci
| rows:
| - ['aSd']
@@ -78,7 +78,7 @@ execute("SELECT c COLLATE \"unicode\" FROM t;")
| - metadata:
| - type: string
| span: c COLLATE "unicode"
- | name: c COLLATE "unicode"
+ | name: _COLUMN_1
| collation: unicode
| rows:
| - ['aSd']
@@ -165,7 +165,7 @@ execute("SELECT *, id + 1 AS x, a AS y, c || 'abc' FROM t;")
| is_nullable: false
| - type: string
| span: c || 'abc'
- | name: c || 'abc'
+ | name: _COLUMN_6
| rows:
| - [1, 1, 'aSd', 2, 1, 'aSdabc']
| ...
diff --git a/test/sql/func-recreate.result b/test/sql/func-recreate.result
index 3709df787..36e6b1fc4 100644
--- a/test/sql/func-recreate.result
+++ b/test/sql/func-recreate.result
@@ -48,7 +48,7 @@ test_run:cmd("setopt delimiter ''");
ch:get()
---
- metadata:
- - name: WAITFOR(0.2)
+ - name: _COLUMN_1
type: number
rows:
- [0.2]
diff --git a/test/sql/gh-3199-no-mem-leaks.result b/test/sql/gh-3199-no-mem-leaks.result
index 35d8572b4..a049cfa65 100644
--- a/test/sql/gh-3199-no-mem-leaks.result
+++ b/test/sql/gh-3199-no-mem-leaks.result
@@ -29,7 +29,7 @@ box.execute('SELECT x, y, x + y FROM test ORDER BY y')
type: integer
- name: Y
type: integer
- - name: x + y
+ - name: _COLUMN_3
type: integer
rows:
- [1, 1, 2]
@@ -46,7 +46,7 @@ box.execute('SELECT x, y, x + y FROM test ORDER BY y')
type: integer
- name: Y
type: integer
- - name: x + y
+ - name: _COLUMN_3
type: integer
rows:
- [1, 1, 2]
@@ -59,7 +59,7 @@ box.execute('SELECT x, y, x + y FROM test ORDER BY y')
type: integer
- name: Y
type: integer
- - name: x + y
+ - name: _COLUMN_3
type: integer
rows:
- [1, 1, 2]
@@ -72,7 +72,7 @@ box.execute('SELECT x, y, x + y FROM test ORDER BY y')
type: integer
- name: Y
type: integer
- - name: x + y
+ - name: _COLUMN_3
type: integer
rows:
- [1, 1, 2]
@@ -85,7 +85,7 @@ box.execute('SELECT x, y, x + y FROM test ORDER BY y')
type: integer
- name: Y
type: integer
- - name: x + y
+ - name: _COLUMN_3
type: integer
rows:
- [1, 1, 2]
@@ -112,7 +112,7 @@ box.execute('SELECT a, id + 2, b FROM test2 WHERE b < id * 2 ORDER BY a ')
- metadata:
- name: A
type: string
- - name: id + 2
+ - name: _COLUMN_2
type: integer
- name: B
type: integer
@@ -131,7 +131,7 @@ box.execute('SELECT a, id + 2 * b, a FROM test2 WHERE b < id * 2 ORDER BY a ')
- metadata:
- name: A
type: string
- - name: id + 2 * b
+ - name: _COLUMN_2
type: integer
- name: A
type: string
@@ -146,7 +146,7 @@ box.execute('SELECT a, id + 2 * b, a FROM test2 WHERE b < id * 2 ORDER BY a ')
- metadata:
- name: A
type: string
- - name: id + 2 * b
+ - name: _COLUMN_2
type: integer
- name: A
type: string
@@ -161,7 +161,7 @@ box.execute('SELECT a, id + 2 * b, a FROM test2 WHERE b < id * 2 ORDER BY a ')
- metadata:
- name: A
type: string
- - name: id + 2 * b
+ - name: _COLUMN_2
type: integer
- name: A
type: string
@@ -180,7 +180,7 @@ box.execute('SELECT x, y + 3 * b, b FROM test2, test WHERE b = x')
- metadata:
- name: X
type: integer
- - name: y + 3 * b
+ - name: _COLUMN_2
type: integer
- name: B
type: integer
@@ -193,7 +193,7 @@ box.execute('SELECT x, y + 3 * b, b FROM test2, test WHERE b = x')
- metadata:
- name: X
type: integer
- - name: y + 3 * b
+ - name: _COLUMN_2
type: integer
- name: B
type: integer
@@ -206,7 +206,7 @@ box.execute('SELECT x, y + 3 * b, b FROM test2, test WHERE b = x')
- metadata:
- name: X
type: integer
- - name: y + 3 * b
+ - name: _COLUMN_2
type: integer
- name: B
type: integer
diff --git a/test/sql/gh-3888-values-blob-assert.result b/test/sql/gh-3888-values-blob-assert.result
index 0a1af28f2..d2e27efd9 100644
--- a/test/sql/gh-3888-values-blob-assert.result
+++ b/test/sql/gh-3888-values-blob-assert.result
@@ -1,3 +1,4 @@
+-- test-run result file version 2
-- sql: assertion fault on VALUES #3888
--
-- Make sure that tokens representing values of integer, float,
@@ -5,79 +6,87 @@
-- keywords of the same names.
--
test_run = require('test_run').new()
----
-...
+ | ---
+ | ...
engine = test_run:get_cfg('engine')
----
-...
+ | ---
+ | ...
_ = box.space._session_settings:update('sql_default_engine', {{'=', 2, engine}})
----
-...
+ | ---
+ | ...
+
-- check 'VALUES' against typedef keywords (should fail)
box.execute('VALUES(scalar)')
----
-- null
-- Syntax error at line 1 near 'scalar'
-...
+ | ---
+ | - null
+ | - Syntax error at line 1 near 'scalar'
+ | ...
box.execute('VALUES(float)')
----
-- null
-- Syntax error at line 1 near 'float'
-...
+ | ---
+ | - null
+ | - Syntax error at line 1 near 'float'
+ | ...
+
-- check 'SELECT' against typedef keywords (should fail)
box.execute('SELECT scalar')
----
-- null
-- Syntax error at line 1 near 'scalar'
-...
+ | ---
+ | - null
+ | - Syntax error at line 1 near 'scalar'
+ | ...
box.execute('SELECT float')
----
-- null
-- Syntax error at line 1 near 'float'
-...
+ | ---
+ | - null
+ | - Syntax error at line 1 near 'float'
+ | ...
+
-- check 'VALUES' against ID (should fail)
box.execute('VALUES(TheColumnName)')
----
-- null
-- Can’t resolve field 'THECOLUMNNAME'
-...
+ | ---
+ | - null
+ | - Can’t resolve field 'THECOLUMNNAME'
+ | ...
+
-- check 'SELECT' against ID (should fail)
box.execute('SELECT TheColumnName')
----
-- null
-- Can’t resolve field 'THECOLUMNNAME'
-...
+ | ---
+ | - null
+ | - Can’t resolve field 'THECOLUMNNAME'
+ | ...
+
-- check 'VALUES' well-formed expression (returns value)
box.execute('VALUES(-0.5e-2)')
----
-- metadata:
- - name: column1
- type: double
- rows:
- - [-0.005]
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: double
+ | rows:
+ | - [-0.005]
+ | ...
box.execute('SELECT X\'507265766564\'')
----
-- metadata:
- - name: X'507265766564'
- type: varbinary
- rows:
- - ['Preved']
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: varbinary
+ | rows:
+ | - ['Preved']
+ | ...
+
-- check 'SELECT' well-formed expression (return value)
box.execute('SELECT 3.14')
----
-- metadata:
- - name: '3.14'
- type: double
- rows:
- - [3.14]
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: double
+ | rows:
+ | - [3.14]
+ | ...
box.execute('SELECT X\'4D6564766564\'')
----
-- metadata:
- - name: X'4D6564766564'
- type: varbinary
- rows:
- - ['Medved']
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: varbinary
+ | rows:
+ | - ['Medved']
+ | ...
+
+
diff --git a/test/sql/icu-upper-lower.result b/test/sql/icu-upper-lower.result
index f7b9dfa38..8acaed2d4 100644
--- a/test/sql/icu-upper-lower.result
+++ b/test/sql/icu-upper-lower.result
@@ -23,11 +23,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Zəfər, jaketini də, papağını da götür, bu axşam hava çox soyuq
- olacaq. ')
+ - name: _COLUMN_1
type: string
- - name: upper(' Zəfər, jaketini də, papağını da götür, bu axşam hava çox soyuq
- olacaq. ')
+ - name: _COLUMN_2
type: string
rows:
- [' zəfər, jaketini də, papağını da götür, bu axşam hava çox soyuq olacaq. ',
@@ -38,9 +36,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' The quick brown fox jumps over the lazy dog. ')
+ - name: _COLUMN_1
type: string
- - name: upper(' The quick brown fox jumps over the lazy dog. ')
+ - name: _COLUMN_2
type: string
rows:
- [' the quick brown fox jumps over the lazy dog. ', ' THE QUICK BROWN FOX
@@ -52,9 +50,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' The quick brown fox jumps over the lazy dog. ')
+ - name: _COLUMN_1
type: string
- - name: upper(' The quick brown fox jumps over the lazy dog. ')
+ - name: _COLUMN_2
type: string
rows:
- [' the quick brown fox jumps over the lazy dog. ', ' THE QUICK BROWN FOX
@@ -66,11 +64,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Բել դղյակի ձախ ժամն օֆ ազգությանը ցպահանջ չճշտած վնաս էր եւ
- փառք ')
+ - name: _COLUMN_1
type: string
- - name: upper(' Բել դղյակի ձախ ժամն օֆ ազգությանը ցպահանջ չճշտած վնաս էր եւ
- փառք ')
+ - name: _COLUMN_2
type: string
rows:
- [' բել դղյակի ձախ ժամն օֆ ազգությանը ցպահանջ չճշտած վնաս էր եւ փառք ', ' ԲԵԼ
@@ -82,11 +78,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' У Іўі худы жвавы чорт у зялёнай камізэльцы пабег пад’есці фаршу
- з юшкай ')
+ - name: _COLUMN_1
type: string
- - name: upper(' У Іўі худы жвавы чорт у зялёнай камізэльцы пабег пад’есці фаршу
- з юшкай ')
+ - name: _COLUMN_2
type: string
rows:
- [' у іўі худы жвавы чорт у зялёнай камізэльцы пабег пад’есці фаршу з юшкай ',
@@ -98,11 +92,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Τάχιστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός
- ')
+ - name: _COLUMN_1
type: string
- - name: upper(' Τάχιστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός
- ')
+ - name: _COLUMN_2
type: string
rows:
- [' τάχιστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός ', ' ΤΆΧΙΣΤΗ
@@ -114,11 +106,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Chuaigh bé mhórshách le dlúthspád fíorfhinn trí hata mo dhea-phorcáin
- bhig ')
+ - name: _COLUMN_1
type: string
- - name: upper(' Chuaigh bé mhórshách le dlúthspád fíorfhinn trí hata mo dhea-phorcáin
- bhig ')
+ - name: _COLUMN_2
type: string
rows:
- [' chuaigh bé mhórshách le dlúthspád fíorfhinn trí hata mo dhea-phorcáin bhig ',
@@ -130,9 +120,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Quiere la boca exhausta vid, kiwi, piña y fugaz jamón ')
+ - name: _COLUMN_1
type: string
- - name: upper(' Quiere la boca exhausta vid, kiwi, piña y fugaz jamón ')
+ - name: _COLUMN_2
type: string
rows:
- [' quiere la boca exhausta vid, kiwi, piña y fugaz jamón ', ' QUIERE LA
@@ -144,9 +134,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' 키스의 고유조건은 입술끼리 만나야 하고 특별한 기술은 필요치 않다 ')
+ - name: _COLUMN_1
type: string
- - name: upper(' 키스의 고유조건은 입술끼리 만나야 하고 특별한 기술은 필요치 않다 ')
+ - name: _COLUMN_2
type: string
rows:
- [' 키스의 고유조건은 입술끼리 만나야 하고 특별한 기술은 필요치 않다 ', ' 키스의 고유조건은 입술끼리 만나야 하고 특별한
@@ -158,9 +148,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Glāžšķūņa rūķīši dzērumā čiepj Baha koncertflīģeļu vākus ')
+ - name: _COLUMN_1
type: string
- - name: upper(' Glāžšķūņa rūķīši dzērumā čiepj Baha koncertflīģeļu vākus ')
+ - name: _COLUMN_2
type: string
rows:
- [' glāžšķūņa rūķīši dzērumā čiepj baha koncertflīģeļu vākus ', ' GLĀŽŠĶŪŅA
@@ -172,11 +162,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Zwölf große Boxkämpfer jagen Viktor quer über den Sylter Deich
- ')
+ - name: _COLUMN_1
type: string
- - name: upper(' Zwölf große Boxkämpfer jagen Viktor quer über den Sylter Deich
- ')
+ - name: _COLUMN_2
type: string
rows:
- [' zwölf große boxkämpfer jagen viktor quer über den sylter deich ', ' ZWÖLF
@@ -188,9 +176,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Pchnąć w tę łódź jeża lub ośm skrzyń fig. ')
+ - name: _COLUMN_1
type: string
- - name: upper(' Pchnąć w tę łódź jeża lub ośm skrzyń fig. ')
+ - name: _COLUMN_2
type: string
rows:
- [' pchnąć w tę łódź jeża lub ośm skrzyń fig. ', ' PCHNĄĆ W TĘ ŁÓDŹ JEŻA
@@ -202,9 +190,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Чуєш їх, доцю, га? Кумедна ж ти, прощайся без ґольфів! ')
+ - name: _COLUMN_1
type: string
- - name: upper(' Чуєш їх, доцю, га? Кумедна ж ти, прощайся без ґольфів! ')
+ - name: _COLUMN_2
type: string
rows:
- [' чуєш їх, доцю, га? кумедна ж ти, прощайся без ґольфів! ', ' ЧУЄШ ЇХ,
@@ -216,9 +204,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Příliš žluťoučký kůň úpěl ďábelské ódy ')
+ - name: _COLUMN_1
type: string
- - name: upper(' Příliš žluťoučký kůň úpěl ďábelské ódy ')
+ - name: _COLUMN_2
type: string
rows:
- [' příliš žluťoučký kůň úpěl ďábelské ódy ', ' PŘÍLIŠ ŽLUŤOUČKÝ KŮŇ ÚPĚL
@@ -230,11 +218,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Laŭ Ludoviko Zamenhof bongustas freŝa ĉeĥa manĝaĵo kun spicoj
- ')
+ - name: _COLUMN_1
type: string
- - name: upper(' Laŭ Ludoviko Zamenhof bongustas freŝa ĉeĥa manĝaĵo kun spicoj
- ')
+ - name: _COLUMN_2
type: string
rows:
- [' laŭ ludoviko zamenhof bongustas freŝa ĉeĥa manĝaĵo kun spicoj ', ' LAŬ
@@ -246,9 +232,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' いろはにほへと ちりぬるを わかよたれそ つねならむ うゐのおくやま けふこえて あさきゆめみし ゑひもせす ')
+ - name: _COLUMN_1
type: string
- - name: upper(' いろはにほへと ちりぬるを わかよたれそ つねならむ うゐのおくやま けふこえて あさきゆめみし ゑひもせす ')
+ - name: _COLUMN_2
type: string
rows:
- [' いろはにほへと ちりぬるを わかよたれそ つねならむ うゐのおくやま けふこえて あさきゆめみし ゑひもせす ', ' いろはにほへと
@@ -260,9 +246,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: 'lower('' Pijamalı hasta yağız şoföre çabucak güvendi. EXTRA: İ '')'
+ - name: _COLUMN_1
type: string
- - name: 'upper('' Pijamalı hasta yağız şoföre çabucak güvendi. EXTRA: İ '')'
+ - name: _COLUMN_2
type: string
rows:
- [' pijamalı hasta yağız şoföre çabucak güvendi. extra: i̇ ', ' PIJAMALI
diff --git a/test/sql/integer-overflow.result b/test/sql/integer-overflow.result
index db5c2f725..b383e44d4 100644
--- a/test/sql/integer-overflow.result
+++ b/test/sql/integer-overflow.result
@@ -19,7 +19,7 @@ box.execute('SELECT (2147483647 * 2147483647 * 2147483647);')
box.execute('SELECT (-9223372036854775808 / -1);')
---
- metadata:
- - name: (-9223372036854775808 / -1)
+ - name: _COLUMN_1
type: integer
rows:
- [9223372036854775808]
@@ -32,7 +32,7 @@ box.execute('SELECT (-9223372036854775808 - 1);')
box.execute('SELECT (9223372036854775807 + 1);')
---
- metadata:
- - name: (9223372036854775807 + 1)
+ - name: _COLUMN_1
type: integer
rows:
- [9223372036854775808]
@@ -50,7 +50,7 @@ box.execute('SELECT 18446744073709551615 * 2;')
box.execute('SELECT (-9223372036854775807 * (-2));')
---
- metadata:
- - name: (-9223372036854775807 * (-2))
+ - name: _COLUMN_1
type: integer
rows:
- [18446744073709551614]
@@ -60,7 +60,7 @@ box.execute('SELECT (-9223372036854775807 * (-2));')
box.execute('SELECT 9223372036854775808;')
---
- metadata:
- - name: '9223372036854775808'
+ - name: _COLUMN_1
type: integer
rows:
- [9223372036854775808]
@@ -74,7 +74,7 @@ box.execute('SELECT -9223372036854775809;')
box.execute('SELECT 9223372036854775808 - 1;')
---
- metadata:
- - name: 9223372036854775808 - 1
+ - name: _COLUMN_1
type: integer
rows:
- [9223372036854775807]
@@ -82,7 +82,7 @@ box.execute('SELECT 9223372036854775808 - 1;')
box.execute('SELECT 18446744073709551615;')
---
- metadata:
- - name: '18446744073709551615'
+ - name: _COLUMN_1
type: integer
rows:
- [18446744073709551615]
@@ -98,7 +98,7 @@ box.execute('SELECT 18446744073709551616;')
box.execute('SELECT CAST(\'9223372036854775808\' AS INTEGER);')
---
- metadata:
- - name: CAST('9223372036854775808' AS INTEGER)
+ - name: _COLUMN_1
type: integer
rows:
- [9223372036854775808]
diff --git a/test/sql/iproto.result b/test/sql/iproto.result
index 7df11b0bf..6d8dd8e13 100644
--- a/test/sql/iproto.result
+++ b/test/sql/iproto.result
@@ -372,11 +372,11 @@ parameters[3] = 33
cn:execute('select $2, $1, $3', parameters)
---
- metadata:
- - name: $2
+ - name: _COLUMN_1
type: integer
- - name: $1
+ - name: _COLUMN_2
type: integer
- - name: $3
+ - name: _COLUMN_3
type: integer
rows:
- [22, 11, 33]
@@ -736,7 +736,7 @@ res.metadata
cn:execute("SELECT zeroblob(1);")
---
- metadata:
- - name: zeroblob(1)
+ - name: _COLUMN_1
type: varbinary
rows:
- ["\0"]
@@ -749,7 +749,7 @@ res = cn:execute("SELECT randomblob(1);")
...
res.metadata
---
-- - name: randomblob(1)
+- - name: _COLUMN_1
type: varbinary
...
-- Type set during compilation stage, and since min/max are accept
@@ -759,7 +759,7 @@ res.metadata
cn:execute("SELECT LEAST(1, 2, 3);")
---
- metadata:
- - name: LEAST(1, 2, 3)
+ - name: _COLUMN_1
type: scalar
rows:
- [1]
@@ -767,7 +767,7 @@ cn:execute("SELECT LEAST(1, 2, 3);")
cn:execute("SELECT GREATEST(1, 2, 3);")
---
- metadata:
- - name: GREATEST(1, 2, 3)
+ - name: _COLUMN_1
type: scalar
rows:
- [3]
diff --git a/test/sql/max-on-index.result b/test/sql/max-on-index.result
index 1cd488f85..35665ce58 100644
--- a/test/sql/max-on-index.result
+++ b/test/sql/max-on-index.result
@@ -48,7 +48,7 @@ box.execute("INSERT INTO test2 VALUES(1, 2)");
box.execute("SELECT MAX(f1) FROM test1")
---
- metadata:
- - name: MAX(f1)
+ - name: _COLUMN_1
type: scalar
rows:
- [4]
@@ -56,7 +56,7 @@ box.execute("SELECT MAX(f1) FROM test1")
box.execute("SELECT MAX(f2) FROM test1")
---
- metadata:
- - name: MAX(f2)
+ - name: _COLUMN_1
type: scalar
rows:
- [3]
@@ -64,7 +64,7 @@ box.execute("SELECT MAX(f2) FROM test1")
box.execute("SELECT MAX(f1) FROM test2")
---
- metadata:
- - name: MAX(f1)
+ - name: _COLUMN_1
type: scalar
rows:
- [1]
diff --git a/test/sql/misc.result b/test/sql/misc.result
index 0190a5897..552c5196d 100644
--- a/test/sql/misc.result
+++ b/test/sql/misc.result
@@ -1,142 +1,148 @@
+-- test-run result file version 2
test_run = require('test_run').new()
----
-...
+ | ---
+ | ...
engine = test_run:get_cfg('engine')
----
-...
+ | ---
+ | ...
_ = box.space._session_settings:update('sql_default_engine', {{'=', 2, engine}})
----
-...
+ | ---
+ | ...
+
-- Forbid multistatement queries.
box.execute('select 1;')
----
-- metadata:
- - name: '1'
- type: integer
- rows:
- - [1]
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: integer
+ | rows:
+ | - [1]
+ | ...
box.execute('select 1; select 2;')
----
-- null
-- 'At line 1 at or near position 11: keyword ''select'' is reserved. Please use double
- quotes if ''select'' is an identifier.'
-...
+ | ---
+ | - null
+ | - 'At line 1 at or near position 11: keyword ''select'' is reserved. Please use double
+ | quotes if ''select'' is an identifier.'
+ | ...
box.execute('create table t1 (id INT primary key); select 100;')
----
-- null
-- 'At line 1 at or near position 39: keyword ''select'' is reserved. Please use double
- quotes if ''select'' is an identifier.'
-...
+ | ---
+ | - null
+ | - 'At line 1 at or near position 39: keyword ''select'' is reserved. Please use double
+ | quotes if ''select'' is an identifier.'
+ | ...
box.space.t1 == nil
----
-- true
-...
+ | ---
+ | - true
+ | ...
box.execute(';')
----
-- null
-- Failed to execute an empty SQL statement
-...
+ | ---
+ | - null
+ | - Failed to execute an empty SQL statement
+ | ...
box.execute('')
----
-- null
-- Failed to execute an empty SQL statement
-...
+ | ---
+ | - null
+ | - Failed to execute an empty SQL statement
+ | ...
box.execute(' ;')
----
-- null
-- Failed to execute an empty SQL statement
-...
+ | ---
+ | - null
+ | - Failed to execute an empty SQL statement
+ | ...
box.execute('\n\n\n\t\t\t ')
----
-- null
-- Failed to execute an empty SQL statement
-...
+ | ---
+ | - null
+ | - Failed to execute an empty SQL statement
+ | ...
+
-- gh-3820: only table constraints can have a name.
--
box.execute('CREATE TABLE test (id INTEGER PRIMARY KEY, b INTEGER CONSTRAINT c1 NULL)')
----
-- null
-- 'At line 1 at or near position 68: keyword ''NULL'' is reserved. Please use double
- quotes if ''NULL'' is an identifier.'
-...
+ | ---
+ | - null
+ | - 'At line 1 at or near position 68: keyword ''NULL'' is reserved. Please use double
+ | quotes if ''NULL'' is an identifier.'
+ | ...
box.execute('CREATE TABLE test (id INTEGER PRIMARY KEY, b INTEGER CONSTRAINT c1 DEFAULT 300)')
----
-- null
-- 'At line 1 at or near position 68: keyword ''DEFAULT'' is reserved. Please use double
- quotes if ''DEFAULT'' is an identifier.'
-...
+ | ---
+ | - null
+ | - 'At line 1 at or near position 68: keyword ''DEFAULT'' is reserved. Please use double
+ | quotes if ''DEFAULT'' is an identifier.'
+ | ...
box.execute('CREATE TABLE test (id INTEGER PRIMARY KEY, b TEXT CONSTRAINT c1 COLLATE "binary")')
----
-- null
-- 'At line 1 at or near position 65: keyword ''COLLATE'' is reserved. Please use double
- quotes if ''COLLATE'' is an identifier.'
-...
+ | ---
+ | - null
+ | - 'At line 1 at or near position 65: keyword ''COLLATE'' is reserved. Please use double
+ | quotes if ''COLLATE'' is an identifier.'
+ | ...
+
-- Make sure that type of literals in meta complies with its real
-- type. For instance, typeof(0.5) is number, not integer.
--
box.execute('SELECT 1;')
----
-- metadata:
- - name: '1'
- type: integer
- rows:
- - [1]
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: integer
+ | rows:
+ | - [1]
+ | ...
box.execute('SELECT 1.5;')
----
-- metadata:
- - name: '1.5'
- type: double
- rows:
- - [1.5]
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: double
+ | rows:
+ | - [1.5]
+ | ...
box.execute('SELECT 1.0;')
----
-- metadata:
- - name: '1.0'
- type: double
- rows:
- - [1]
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: double
+ | rows:
+ | - [1]
+ | ...
box.execute('SELECT \'abc\';')
----
-- metadata:
- - name: '''abc'''
- type: string
- rows:
- - ['abc']
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: string
+ | rows:
+ | - ['abc']
+ | ...
box.execute('SELECT X\'4D6564766564\'')
----
-- metadata:
- - name: X'4D6564766564'
- type: varbinary
- rows:
- - ['Medved']
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: varbinary
+ | rows:
+ | - ['Medved']
+ | ...
+
--
-- gh-4139: assertion when reading a temporary space.
--
format = {{name = 'id', type = 'integer'}}
----
-...
+ | ---
+ | ...
s = box.schema.space.create('s',{format=format, temporary=true})
----
-...
+ | ---
+ | ...
i = s:create_index('i')
----
-...
+ | ---
+ | ...
box.execute('select * from "s"')
----
-- metadata:
- - name: id
- type: integer
- rows: []
-...
+ | ---
+ | - metadata:
+ | - name: id
+ | type: integer
+ | rows: []
+ | ...
s:drop()
----
-...
+ | ---
+ | ...
+
--
-- gh-4267: Full power of vdbe_field_ref
-- Tarantool's SQL internally stores data offset for all acceded
@@ -151,56 +157,57 @@ s:drop()
-- beginning.
---
format = {}
----
-...
+ | ---
+ | ...
t = {}
----
-...
+ | ---
+ | ...
for i = 1, 70 do \
format[i] = {name = 'FIELD'..i, type = 'unsigned'} \
t[i] = i \
end
----
-...
+ | ---
+ | ...
s = box.schema.create_space('TEST', {format = format})
----
-...
+ | ---
+ | ...
pk = s:create_index('pk', {parts = {70}})
----
-...
+ | ---
+ | ...
s:insert(t)
----
-- [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
- 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
- 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
- 63, 64, 65, 66, 67, 68, 69, 70]
-...
+ | ---
+ | - [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+ | 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
+ | 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
+ | 63, 64, 65, 66, 67, 68, 69, 70]
+ | ...
box.execute('SELECT field70, field64 FROM test')
----
-- metadata:
- - name: FIELD70
- type: unsigned
- - name: FIELD64
- type: unsigned
- rows:
- - [70, 64]
-...
+ | ---
+ | - metadata:
+ | - name: FIELD70
+ | type: unsigned
+ | - name: FIELD64
+ | type: unsigned
+ | rows:
+ | - [70, 64]
+ | ...
+
-- In the case below described optimization works fine.
pk:alter({parts = {66}})
----
-...
+ | ---
+ | ...
box.execute('SELECT field66, field68, field70 FROM test')
----
-- metadata:
- - name: FIELD66
- type: unsigned
- - name: FIELD68
- type: unsigned
- - name: FIELD70
- type: unsigned
- rows:
- - [66, 68, 70]
-...
+ | ---
+ | - metadata:
+ | - name: FIELD66
+ | type: unsigned
+ | - name: FIELD68
+ | type: unsigned
+ | - name: FIELD70
+ | type: unsigned
+ | rows:
+ | - [66, 68, 70]
+ | ...
box.space.TEST:drop()
----
-...
+ | ---
+ | ...
diff --git a/test/sql/persistency.result b/test/sql/persistency.result
index 6d14d4c4e..307b5333b 100644
--- a/test/sql/persistency.result
+++ b/test/sql/persistency.result
@@ -1,475 +1,495 @@
+-- test-run result file version 2
env = require('test_run')
----
-...
+ | ---
+ | ...
test_run = env.new()
----
-...
+ | ---
+ | ...
engine = test_run:get_cfg('engine')
----
-...
+ | ---
+ | ...
_ = box.space._session_settings:update('sql_default_engine', {{'=', 2, engine}})
----
-...
+ | ---
+ | ...
+
-- create space
box.execute("CREATE TABLE foobar (foo INT PRIMARY KEY, bar TEXT)")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
+
-- prepare data
box.execute("INSERT INTO foobar VALUES (1, 'foo')")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
box.execute("INSERT INTO foobar VALUES (2, 'bar')")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
box.execute("INSERT INTO foobar VALUES (1000, 'foobar')")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
+
box.execute("INSERT INTO foobar VALUES (1, 'duplicate')")
----
-- null
-- Duplicate key exists in unique index 'pk_unnamed_FOOBAR_1' in space 'FOOBAR'
-...
+ | ---
+ | - null
+ | - Duplicate key exists in unique index 'pk_unnamed_FOOBAR_1' in space 'FOOBAR'
+ | ...
+
-- simple select
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['foo', 1, 42, 'awesome']
- - ['bar', 2, 42, 'awesome']
- - ['foobar', 1000, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows:
+ | - ['foo', 1, 42, 'awesome']
+ | - ['bar', 2, 42, 'awesome']
+ | - ['foobar', 1000, 42, 'awesome']
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar LIMIT 2")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['foo', 1, 42, 'awesome']
- - ['bar', 2, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows:
+ | - ['foo', 1, 42, 'awesome']
+ | - ['bar', 2, 42, 'awesome']
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo=2")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['bar', 2, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows:
+ | - ['bar', 2, 42, 'awesome']
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo>2")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['foobar', 1000, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows:
+ | - ['foobar', 1000, 42, 'awesome']
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo>=2")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['bar', 2, 42, 'awesome']
- - ['foobar', 1000, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows:
+ | - ['bar', 2, 42, 'awesome']
+ | - ['foobar', 1000, 42, 'awesome']
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo=10000")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows: []
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows: []
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo>10000")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows: []
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows: []
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<2")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['foo', 1, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows:
+ | - ['foo', 1, 42, 'awesome']
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<2.001")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['foo', 1, 42, 'awesome']
- - ['bar', 2, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows:
+ | - ['foo', 1, 42, 'awesome']
+ | - ['bar', 2, 42, 'awesome']
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<=2")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['foo', 1, 42, 'awesome']
- - ['bar', 2, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows:
+ | - ['foo', 1, 42, 'awesome']
+ | - ['bar', 2, 42, 'awesome']
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<100")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['foo', 1, 42, 'awesome']
- - ['bar', 2, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows:
+ | - ['foo', 1, 42, 'awesome']
+ | - ['bar', 2, 42, 'awesome']
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE bar='foo'")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['foo', 1, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows:
+ | - ['foo', 1, 42, 'awesome']
+ | ...
box.execute("SELECT count(*) FROM foobar")
----
-- metadata:
- - name: count(*)
- type: integer
- rows:
- - [3]
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: integer
+ | rows:
+ | - [3]
+ | ...
box.execute("SELECT count(*) FROM foobar WHERE bar='foo'")
----
-- metadata:
- - name: count(*)
- type: integer
- rows:
- - [1]
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: integer
+ | rows:
+ | - [1]
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar ORDER BY bar")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['bar', 2, 42, 'awesome']
- - ['foo', 1, 42, 'awesome']
- - ['foobar', 1000, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows:
+ | - ['bar', 2, 42, 'awesome']
+ | - ['foo', 1, 42, 'awesome']
+ | - ['foobar', 1000, 42, 'awesome']
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar ORDER BY bar DESC")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['foobar', 1000, 42, 'awesome']
- - ['foo', 1, 42, 'awesome']
- - ['bar', 2, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows:
+ | - ['foobar', 1000, 42, 'awesome']
+ | - ['foo', 1, 42, 'awesome']
+ | - ['bar', 2, 42, 'awesome']
+ | ...
+
-- updates
box.execute("REPLACE INTO foobar VALUES (1, 'cacodaemon')")
----
-- row_count: 2
-...
+ | ---
+ | - row_count: 2
+ | ...
box.execute("SELECT COUNT(*) FROM foobar WHERE foo=1")
----
-- metadata:
- - name: COUNT(*)
- type: integer
- rows:
- - [1]
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: integer
+ | rows:
+ | - [1]
+ | ...
box.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'")
----
-- metadata:
- - name: COUNT(*)
- type: integer
- rows:
- - [1]
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: integer
+ | rows:
+ | - [1]
+ | ...
box.execute("DELETE FROM foobar WHERE bar='cacodaemon'")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
box.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'")
----
-- metadata:
- - name: COUNT(*)
- type: integer
- rows:
- - [0]
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: integer
+ | rows:
+ | - [0]
+ | ...
+
-- multi-index
+
-- create space
box.execute("CREATE TABLE barfoo (bar TEXT, foo NUMBER PRIMARY KEY)")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
box.execute("CREATE UNIQUE INDEX barfoo2 ON barfoo(bar)")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
+
-- prepare data
box.execute("INSERT INTO barfoo VALUES ('foo', 1)")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
box.execute("INSERT INTO barfoo VALUES ('bar', 2)")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
box.execute("INSERT INTO barfoo VALUES ('foobar', 1000)")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
+
-- create a trigger
box.execute("CREATE TRIGGER tfoobar AFTER INSERT ON foobar FOR EACH ROW BEGIN INSERT INTO barfoo VALUES ('trigger test', 9999); END")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
box.execute("SELECT \"name\", \"opts\" FROM \"_trigger\"");
----
-- metadata:
- - name: name
- type: string
- - name: opts
- type: map
- rows:
- - ['TFOOBAR', {'sql': 'CREATE TRIGGER tfoobar AFTER INSERT ON foobar FOR EACH ROW
- BEGIN INSERT INTO barfoo VALUES (''trigger test'', 9999); END'}]
-...
+ | ---
+ | - metadata:
+ | - name: name
+ | type: string
+ | - name: opts
+ | type: map
+ | rows:
+ | - ['TFOOBAR', {'sql': 'CREATE TRIGGER tfoobar AFTER INSERT ON foobar FOR EACH ROW
+ | BEGIN INSERT INTO barfoo VALUES (''trigger test'', 9999); END'}]
+ | ...
+
-- Many entries
box.execute("CREATE TABLE t1(a INT,b INT,c INT,PRIMARY KEY(b,c));")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
box.execute("WITH RECURSIVE cnt(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM cnt WHERE x<1000) INSERT INTO t1 SELECT x, x%40, x/40 FROM cnt;")
----
-- row_count: 1000
-...
+ | ---
+ | - row_count: 1000
+ | ...
box.execute("SELECT a FROM t1 ORDER BY b, a LIMIT 10 OFFSET 20;");
----
-- metadata:
- - name: A
- type: integer
- rows:
- - [840]
- - [880]
- - [920]
- - [960]
- - [1000]
- - [1]
- - [41]
- - [81]
- - [121]
- - [161]
-...
+ | ---
+ | - metadata:
+ | - name: A
+ | type: integer
+ | rows:
+ | - [840]
+ | - [880]
+ | - [920]
+ | - [960]
+ | - [1000]
+ | - [1]
+ | - [41]
+ | - [81]
+ | - [121]
+ | - [161]
+ | ...
+
test_run:cmd('restart server default');
+ |
+
-- prove that trigger survived
box.execute("SELECT \"name\", \"opts\" FROM \"_trigger\"");
----
-- metadata:
- - name: name
- type: string
- - name: opts
- type: map
- rows:
- - ['TFOOBAR', {'sql': 'CREATE TRIGGER tfoobar AFTER INSERT ON foobar FOR EACH ROW
- BEGIN INSERT INTO barfoo VALUES (''trigger test'', 9999); END'}]
-...
+ | ---
+ | - metadata:
+ | - name: name
+ | type: string
+ | - name: opts
+ | type: map
+ | rows:
+ | - ['TFOOBAR', {'sql': 'CREATE TRIGGER tfoobar AFTER INSERT ON foobar FOR EACH ROW
+ | BEGIN INSERT INTO barfoo VALUES (''trigger test'', 9999); END'}]
+ | ...
+
-- ... functional
box.execute("INSERT INTO foobar VALUES ('foobar trigger test', 8888)")
----
-- null
-- 'Type mismatch: can not convert foobar trigger test to integer'
-...
+ | ---
+ | - null
+ | - 'Type mismatch: can not convert foobar trigger test to integer'
+ | ...
box.execute("SELECT * FROM barfoo WHERE foo = 9999");
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: number
- rows: []
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: number
+ | rows: []
+ | ...
+
-- and still persistent
box.execute("SELECT \"name\", \"opts\" FROM \"_trigger\"")
----
-- metadata:
- - name: name
- type: string
- - name: opts
- type: map
- rows:
- - ['TFOOBAR', {'sql': 'CREATE TRIGGER tfoobar AFTER INSERT ON foobar FOR EACH ROW
- BEGIN INSERT INTO barfoo VALUES (''trigger test'', 9999); END'}]
-...
+ | ---
+ | - metadata:
+ | - name: name
+ | type: string
+ | - name: opts
+ | type: map
+ | rows:
+ | - ['TFOOBAR', {'sql': 'CREATE TRIGGER tfoobar AFTER INSERT ON foobar FOR EACH ROW
+ | BEGIN INSERT INTO barfoo VALUES (''trigger test'', 9999); END'}]
+ | ...
+
-- and can be dropped just once
box.execute("DROP TRIGGER tfoobar")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
-- Should error
box.execute("DROP TRIGGER tfoobar")
----
-- null
-- Trigger 'TFOOBAR' doesn't exist
-...
+ | ---
+ | - null
+ | - Trigger 'TFOOBAR' doesn't exist
+ | ...
-- Should be empty
box.execute("SELECT \"name\", \"opts\" FROM \"_trigger\"")
----
-- metadata:
- - name: name
- type: string
- - name: opts
- type: map
- rows: []
-...
+ | ---
+ | - metadata:
+ | - name: name
+ | type: string
+ | - name: opts
+ | type: map
+ | rows: []
+ | ...
+
-- prove barfoo2 still exists
box.execute("INSERT INTO barfoo VALUES ('xfoo', 1)")
----
-- null
-- Duplicate key exists in unique index 'pk_unnamed_BARFOO_1' in space 'BARFOO'
-...
+ | ---
+ | - null
+ | - Duplicate key exists in unique index 'pk_unnamed_BARFOO_1' in space 'BARFOO'
+ | ...
+
box.execute("SELECT * FROM barfoo")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: number
- rows:
- - ['foo', 1]
- - ['bar', 2]
- - ['foobar', 1000]
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: number
+ | rows:
+ | - ['foo', 1]
+ | - ['bar', 2]
+ | - ['foobar', 1000]
+ | ...
box.execute("SELECT * FROM foobar");
----
-- metadata:
- - name: FOO
- type: integer
- - name: BAR
- type: string
- rows:
- - [2, 'bar']
- - [1000, 'foobar']
-...
+ | ---
+ | - metadata:
+ | - name: FOO
+ | type: integer
+ | - name: BAR
+ | type: string
+ | rows:
+ | - [2, 'bar']
+ | - [1000, 'foobar']
+ | ...
box.execute("SELECT a FROM t1 ORDER BY b, a LIMIT 10 OFFSET 20;");
----
-- metadata:
- - name: A
- type: integer
- rows:
- - [840]
- - [880]
- - [920]
- - [960]
- - [1000]
- - [1]
- - [41]
- - [81]
- - [121]
- - [161]
-...
+ | ---
+ | - metadata:
+ | - name: A
+ | type: integer
+ | rows:
+ | - [840]
+ | - [880]
+ | - [920]
+ | - [960]
+ | - [1000]
+ | - [1]
+ | - [41]
+ | - [81]
+ | - [121]
+ | - [161]
+ | ...
+
-- cleanup
box.execute("DROP TABLE foobar")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
box.execute("DROP TABLE barfoo")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
box.execute("DROP TABLE t1")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
diff --git a/test/sql/prepared.result b/test/sql/prepared.result
index 5a16ea3b1..f3f79954e 100644
--- a/test/sql/prepared.result
+++ b/test/sql/prepared.result
@@ -425,13 +425,13 @@ s = prepare("SELECT count(*), count(a - 3), max(b), abs(id) FROM test WHERE b =
execute(s.stmt_id)
| ---
| - metadata:
- | - name: count(*)
+ | - name: _COLUMN_1
| type: integer
- | - name: count(a - 3)
+ | - name: _COLUMN_2
| type: integer
- | - name: max(b)
+ | - name: _COLUMN_3
| type: scalar
- | - name: abs(id)
+ | - name: _COLUMN_4
| type: number
| rows:
| - [1, 1, '3', 1]
@@ -439,13 +439,13 @@ execute(s.stmt_id)
execute(s.stmt_id)
| ---
| - metadata:
- | - name: count(*)
+ | - name: _COLUMN_1
| type: integer
- | - name: count(a - 3)
+ | - name: _COLUMN_2
| type: integer
- | - name: max(b)
+ | - name: _COLUMN_3
| type: scalar
- | - name: abs(id)
+ | - name: _COLUMN_4
| type: number
| rows:
| - [1, 1, '3', 1]
@@ -480,7 +480,7 @@ res = execute(s.stmt_id)
| ...
res.metadata
| ---
- | - - name: group_concat(TRIM(TRAILING FROM t),x'0a')
+ | - - name: _COLUMN_1
| type: string
| ...
unprepare(s.stmt_id)
diff --git a/test/sql/row-count.result b/test/sql/row-count.result
index 02acd79b5..71b932285 100644
--- a/test/sql/row-count.result
+++ b/test/sql/row-count.result
@@ -16,7 +16,7 @@ box.execute("CREATE TABLE t1 (s1 VARCHAR(10) PRIMARY KEY);")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: _COLUMN_1
type: integer
rows:
- [1]
@@ -24,7 +24,7 @@ box.execute("SELECT ROW_COUNT();")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: _COLUMN_1
type: integer
rows:
- [0]
@@ -36,7 +36,7 @@ box.execute("CREATE TABLE t2 (s1 VARCHAR(10) PRIMARY KEY, s2 VARCHAR(10) REFEREN
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: _COLUMN_1
type: integer
rows:
- [1]
@@ -52,7 +52,7 @@ box.execute("INSERT INTO t3 VALUES (0, 0, 0);")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: _COLUMN_1
type: integer
rows:
- [1]
@@ -64,7 +64,7 @@ box.execute("CREATE TRIGGER x AFTER DELETE ON t1 FOR EACH ROW BEGIN UPDATE t3 SE
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: _COLUMN_1
type: integer
rows:
- [1]
@@ -76,7 +76,7 @@ box.execute("INSERT INTO t1 VALUES ('a');")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: _COLUMN_1
type: integer
rows:
- [1]
@@ -88,7 +88,7 @@ box.execute("INSERT INTO t2 VALUES ('a','a');")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: _COLUMN_1
type: integer
rows:
- [1]
@@ -100,7 +100,7 @@ box.execute("INSERT INTO t1 VALUES ('b'), ('c'), ('d');")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: _COLUMN_1
type: integer
rows:
- [3]
@@ -113,7 +113,7 @@ box.execute("REPLACE INTO t2 VALUES('a', 'c');")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: _COLUMN_1
type: integer
rows:
- [2]
@@ -125,7 +125,7 @@ box.execute("DELETE FROM t1;")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: _COLUMN_1
type: integer
rows:
- [4]
@@ -141,7 +141,7 @@ box.execute("TRUNCATE TABLE t3;")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: _COLUMN_1
type: integer
rows:
- [0]
@@ -157,7 +157,7 @@ box.execute("UPDATE t3 SET i2 = 666;")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: _COLUMN_1
type: integer
rows:
- [3]
@@ -172,7 +172,7 @@ box.execute("DELETE FROM t3 WHERE 0 = 0;")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: _COLUMN_1
type: integer
rows:
- [3]
@@ -188,7 +188,7 @@ box.execute("DELETE FROM t3")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: _COLUMN_1
type: integer
rows:
- [3]
@@ -222,7 +222,7 @@ box.execute("DELETE FROM tt1 WHERE id = 2;")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: _COLUMN_1
type: integer
rows:
- [1]
@@ -252,7 +252,7 @@ box.execute("START TRANSACTION;")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: _COLUMN_1
type: integer
rows:
- [0]
@@ -264,7 +264,7 @@ box.execute("COMMIT;")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: _COLUMN_1
type: integer
rows:
- [0]
@@ -277,7 +277,7 @@ box.execute("COMMIT;")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: _COLUMN_1
type: integer
rows:
- [0]
@@ -286,7 +286,7 @@ box.execute("SELECT ROW_COUNT();")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: _COLUMN_1
type: integer
rows:
- [0]
@@ -308,7 +308,7 @@ box.execute("EXPLAIN QUERY PLAN INSERT INTO t1 VALUES ('b'), ('c'), ('d');")
box.execute("SELECT ROW_COUNT();")
---
- metadata:
- - name: ROW_COUNT()
+ - name: _COLUMN_1
type: integer
rows:
- [0]
diff --git a/test/sql/transition.result b/test/sql/transition.result
index c14055b4e..0decc528c 100644
--- a/test/sql/transition.result
+++ b/test/sql/transition.result
@@ -38,9 +38,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: _COLUMN_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
type: string
rows:
- ['foo', 1, 42, 'awesome']
@@ -54,9 +54,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar LIMIT 2")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: _COLUMN_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
type: string
rows:
- ['foo', 1, 42, 'awesome']
@@ -69,9 +69,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo=2")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: _COLUMN_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
type: string
rows:
- ['bar', 2, 42, 'awesome']
@@ -83,9 +83,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo>2")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: _COLUMN_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
type: string
rows:
- ['foobar', 1000, 42, 'awesome']
@@ -97,9 +97,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo>=2")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: _COLUMN_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
type: string
rows:
- ['bar', 2, 42, 'awesome']
@@ -112,9 +112,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo=10000")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: _COLUMN_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
type: string
rows: []
...
@@ -125,9 +125,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo>10000")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: _COLUMN_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
type: string
rows: []
...
@@ -138,9 +138,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<2")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: _COLUMN_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
type: string
rows:
- ['foo', 1, 42, 'awesome']
@@ -152,9 +152,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<2.001")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: _COLUMN_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
type: string
rows:
- ['foo', 1, 42, 'awesome']
@@ -167,9 +167,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<=2")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: _COLUMN_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
type: string
rows:
- ['foo', 1, 42, 'awesome']
@@ -182,9 +182,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<100")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: _COLUMN_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
type: string
rows:
- ['foo', 1, 42, 'awesome']
@@ -197,9 +197,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE bar='foo'")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: _COLUMN_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
type: string
rows:
- ['foo', 1, 42, 'awesome']
@@ -207,7 +207,7 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE bar='foo'")
box.execute("SELECT count(*) FROM foobar")
---
- metadata:
- - name: count(*)
+ - name: _COLUMN_1
type: integer
rows:
- [3]
@@ -215,7 +215,7 @@ box.execute("SELECT count(*) FROM foobar")
box.execute("SELECT count(*) FROM foobar WHERE bar='foo'")
---
- metadata:
- - name: count(*)
+ - name: _COLUMN_1
type: integer
rows:
- [1]
@@ -227,9 +227,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar ORDER BY bar")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: _COLUMN_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
type: string
rows:
- ['bar', 2, 42, 'awesome']
@@ -243,9 +243,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar ORDER BY bar DESC")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: _COLUMN_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
type: string
rows:
- ['foobar', 1000, 42, 'awesome']
@@ -260,7 +260,7 @@ box.execute("REPLACE INTO foobar VALUES (1, 'cacodaemon')")
box.execute("SELECT COUNT(*) FROM foobar WHERE foo=1")
---
- metadata:
- - name: COUNT(*)
+ - name: _COLUMN_1
type: integer
rows:
- [1]
@@ -268,7 +268,7 @@ box.execute("SELECT COUNT(*) FROM foobar WHERE foo=1")
box.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'")
---
- metadata:
- - name: COUNT(*)
+ - name: _COLUMN_1
type: integer
rows:
- [1]
@@ -280,7 +280,7 @@ box.execute("DELETE FROM foobar WHERE bar='cacodaemon'")
box.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'")
---
- metadata:
- - name: COUNT(*)
+ - name: _COLUMN_1
type: integer
rows:
- [0]
diff --git a/test/sql/types.result b/test/sql/types.result
index f0c34b6fa..c8c7dfb1f 100644
--- a/test/sql/types.result
+++ b/test/sql/types.result
@@ -197,7 +197,7 @@ box.execute("SELECT randomblob(5) || 'x';")
box.execute("VALUES (TYPEOF(randomblob(5) || zeroblob(5)));")
---
- metadata:
- - name: column1
+ - name: _COLUMN_1
type: string
rows:
- ['varbinary']
@@ -230,7 +230,7 @@ box.execute("SELECT * FROM t1 WHERE 'blob' LIKE x'0000';")
box.execute("SELECT s LIKE NULL FROM t1;")
---
- metadata:
- - name: s LIKE NULL
+ - name: _COLUMN_1
type: integer
rows:
- [null]
@@ -256,7 +256,7 @@ box.execute("SELECT * FROM t1 WHERE 'int' LIKE 4;")
box.execute("SELECT NULL LIKE s FROM t1;")
---
- metadata:
- - name: NULL LIKE s
+ - name: _COLUMN_1
type: integer
rows:
- [null]
@@ -270,7 +270,7 @@ box.space.T1:drop()
box.execute("SELECT CAST('1.123' AS INTEGER);")
---
- metadata:
- - name: CAST('1.123' AS INTEGER)
+ - name: _COLUMN_1
type: integer
rows:
- [1]
@@ -286,7 +286,7 @@ box.execute("INSERT INTO t1 VALUES('0.0'), ('1.5'), ('3.9312453');")
box.execute("SELECT CAST(f AS INTEGER) FROM t1;")
---
- metadata:
- - name: CAST(f AS INTEGER)
+ - name: _COLUMN_1
type: integer
rows:
- [0]
@@ -303,7 +303,7 @@ box.space.T1:drop()
box.execute('SELECT 1 + 1;')
---
- metadata:
- - name: 1 + 1
+ - name: _COLUMN_1
type: integer
rows:
- [2]
@@ -311,7 +311,7 @@ box.execute('SELECT 1 + 1;')
box.execute('SELECT 1 + 1.1;')
---
- metadata:
- - name: 1 + 1.1
+ - name: _COLUMN_1
type: double
rows:
- [2.1]
@@ -319,7 +319,7 @@ box.execute('SELECT 1 + 1.1;')
box.execute('SELECT \'9223372036854\' + 1;')
---
- metadata:
- - name: '''9223372036854'' + 1'
+ - name: _COLUMN_1
type: integer
rows:
- [9223372036855]
@@ -328,7 +328,7 @@ box.execute('SELECT \'9223372036854\' + 1;')
box.execute('SELECT ?', {true})
---
- metadata:
- - name: '?'
+ - name: _COLUMN_1
type: boolean
rows:
- [true]
@@ -489,7 +489,7 @@ s:drop()
box.execute("SELECT 18446744073709551615 > 18446744073709551614;")
---
- metadata:
- - name: 18446744073709551615 > 18446744073709551614
+ - name: _COLUMN_1
type: boolean
rows:
- [true]
@@ -497,7 +497,7 @@ box.execute("SELECT 18446744073709551615 > 18446744073709551614;")
box.execute("SELECT 18446744073709551615 > -9223372036854775808;")
---
- metadata:
- - name: 18446744073709551615 > -9223372036854775808
+ - name: _COLUMN_1
type: boolean
rows:
- [true]
@@ -505,7 +505,7 @@ box.execute("SELECT 18446744073709551615 > -9223372036854775808;")
box.execute("SELECT -1 < 18446744073709551615;")
---
- metadata:
- - name: -1 < 18446744073709551615
+ - name: _COLUMN_1
type: boolean
rows:
- [true]
@@ -513,7 +513,7 @@ box.execute("SELECT -1 < 18446744073709551615;")
box.execute("SELECT 1.5 < 18446744073709551615")
---
- metadata:
- - name: 1.5 < 18446744073709551615
+ - name: _COLUMN_1
type: boolean
rows:
- [true]
@@ -521,7 +521,7 @@ box.execute("SELECT 1.5 < 18446744073709551615")
box.execute("SELECT 1.5 > 18446744073709551615")
---
- metadata:
- - name: 1.5 > 18446744073709551615
+ - name: _COLUMN_1
type: boolean
rows:
- [false]
@@ -529,7 +529,7 @@ box.execute("SELECT 1.5 > 18446744073709551615")
box.execute("SELECT 18446744073709551615 > 1.5")
---
- metadata:
- - name: 18446744073709551615 > 1.5
+ - name: _COLUMN_1
type: boolean
rows:
- [true]
@@ -537,7 +537,7 @@ box.execute("SELECT 18446744073709551615 > 1.5")
box.execute("SELECT 18446744073709551615 < 1.5")
---
- metadata:
- - name: 18446744073709551615 < 1.5
+ - name: _COLUMN_1
type: boolean
rows:
- [false]
@@ -545,7 +545,7 @@ box.execute("SELECT 18446744073709551615 < 1.5")
box.execute("SELECT 18446744073709551615 = 18446744073709551615;")
---
- metadata:
- - name: 18446744073709551615 = 18446744073709551615
+ - name: _COLUMN_1
type: boolean
rows:
- [true]
@@ -553,7 +553,7 @@ box.execute("SELECT 18446744073709551615 = 18446744073709551615;")
box.execute("SELECT 18446744073709551615 > -9223372036854775808;")
---
- metadata:
- - name: 18446744073709551615 > -9223372036854775808
+ - name: _COLUMN_1
type: boolean
rows:
- [true]
@@ -561,7 +561,7 @@ box.execute("SELECT 18446744073709551615 > -9223372036854775808;")
box.execute("SELECT 18446744073709551615 < -9223372036854775808;")
---
- metadata:
- - name: 18446744073709551615 < -9223372036854775808
+ - name: _COLUMN_1
type: boolean
rows:
- [false]
@@ -569,7 +569,7 @@ box.execute("SELECT 18446744073709551615 < -9223372036854775808;")
box.execute("SELECT -1 < 18446744073709551615;")
---
- metadata:
- - name: -1 < 18446744073709551615
+ - name: _COLUMN_1
type: boolean
rows:
- [true]
@@ -577,7 +577,7 @@ box.execute("SELECT -1 < 18446744073709551615;")
box.execute("SELECT -1 > 18446744073709551615;")
---
- metadata:
- - name: -1 > 18446744073709551615
+ - name: _COLUMN_1
type: boolean
rows:
- [false]
@@ -585,7 +585,7 @@ box.execute("SELECT -1 > 18446744073709551615;")
box.execute("SELECT 18446744073709551610 - 18446744073709551615;")
---
- metadata:
- - name: 18446744073709551610 - 18446744073709551615
+ - name: _COLUMN_1
type: integer
rows:
- [-5]
@@ -593,7 +593,7 @@ box.execute("SELECT 18446744073709551610 - 18446744073709551615;")
box.execute("SELECT 18446744073709551615 = null;")
---
- metadata:
- - name: 18446744073709551615 = null
+ - name: _COLUMN_1
type: boolean
rows:
- [null]
@@ -601,7 +601,7 @@ box.execute("SELECT 18446744073709551615 = null;")
box.execute("SELECT 18446744073709551615 = 18446744073709551615.0;")
---
- metadata:
- - name: 18446744073709551615 = 18446744073709551615.0
+ - name: _COLUMN_1
type: boolean
rows:
- [false]
@@ -609,7 +609,7 @@ box.execute("SELECT 18446744073709551615 = 18446744073709551615.0;")
box.execute("SELECT 18446744073709551615.0 > 18446744073709551615")
---
- metadata:
- - name: 18446744073709551615.0 > 18446744073709551615
+ - name: _COLUMN_1
type: boolean
rows:
- [true]
@@ -617,7 +617,7 @@ box.execute("SELECT 18446744073709551615.0 > 18446744073709551615")
box.execute("SELECT 18446744073709551615 IN ('18446744073709551615', 18446744073709551615.0)")
---
- metadata:
- - name: 18446744073709551615 IN ('18446744073709551615', 18446744073709551615.0)
+ - name: _COLUMN_1
type: boolean
rows:
- [true]
@@ -625,7 +625,7 @@ box.execute("SELECT 18446744073709551615 IN ('18446744073709551615', 18446744073
box.execute("SELECT 1 LIMIT 18446744073709551615;")
---
- metadata:
- - name: '1'
+ - name: _COLUMN_1
type: integer
rows:
- [1]
@@ -633,7 +633,7 @@ box.execute("SELECT 1 LIMIT 18446744073709551615;")
box.execute("SELECT 1 LIMIT 1 OFFSET 18446744073709551614;")
---
- metadata:
- - name: '1'
+ - name: _COLUMN_1
type: integer
rows: []
...
@@ -645,7 +645,7 @@ box.execute("SELECT CAST('18446744073' || '709551616' AS INTEGER);")
box.execute("SELECT CAST('18446744073' || '709551615' AS INTEGER);")
---
- metadata:
- - name: CAST('18446744073' || '709551615' AS INTEGER)
+ - name: _COLUMN_1
type: integer
rows:
- [18446744073709551615]
@@ -653,7 +653,7 @@ box.execute("SELECT CAST('18446744073' || '709551615' AS INTEGER);")
box.execute("SELECT 18446744073709551610 + 5;")
---
- metadata:
- - name: 18446744073709551610 + 5
+ - name: _COLUMN_1
type: integer
rows:
- [18446744073709551615]
@@ -661,7 +661,7 @@ box.execute("SELECT 18446744073709551610 + 5;")
box.execute("SELECT 18446744073709551615 * 1;")
---
- metadata:
- - name: 18446744073709551615 * 1
+ - name: _COLUMN_1
type: integer
rows:
- [18446744073709551615]
@@ -669,7 +669,7 @@ box.execute("SELECT 18446744073709551615 * 1;")
box.execute("SELECT 1 / 18446744073709551615;")
---
- metadata:
- - name: 1 / 18446744073709551615
+ - name: _COLUMN_1
type: integer
rows:
- [0]
@@ -677,7 +677,7 @@ box.execute("SELECT 1 / 18446744073709551615;")
box.execute("SELECT 18446744073709551615 / 18446744073709551615;")
---
- metadata:
- - name: 18446744073709551615 / 18446744073709551615
+ - name: _COLUMN_1
type: integer
rows:
- [1]
@@ -685,7 +685,7 @@ box.execute("SELECT 18446744073709551615 / 18446744073709551615;")
box.execute("SELECT 18446744073709551615 / -9223372036854775808;")
---
- metadata:
- - name: 18446744073709551615 / -9223372036854775808
+ - name: _COLUMN_1
type: integer
rows:
- [-1]
@@ -779,7 +779,7 @@ box.execute("INSERT INTO t VALUES (2, -1);")
box.execute("SELECT sum(i) FROM t;")
---
- metadata:
- - name: sum(i)
+ - name: _COLUMN_1
type: number
rows:
- [18446744073709551613]
@@ -787,7 +787,7 @@ box.execute("SELECT sum(i) FROM t;")
box.execute("SELECT avg(i) FROM t;")
---
- metadata:
- - name: avg(i)
+ - name: _COLUMN_1
type: number
rows:
- [6148914691236516864]
@@ -795,7 +795,7 @@ box.execute("SELECT avg(i) FROM t;")
box.execute("SELECT total(i) FROM t;")
---
- metadata:
- - name: total(i)
+ - name: _COLUMN_1
type: number
rows:
- [1.844674407371e+19]
@@ -803,7 +803,7 @@ box.execute("SELECT total(i) FROM t;")
box.execute("SELECT min(i) FROM t;")
---
- metadata:
- - name: min(i)
+ - name: _COLUMN_1
type: scalar
rows:
- [-1]
@@ -811,7 +811,7 @@ box.execute("SELECT min(i) FROM t;")
box.execute("SELECT max(i) FROM t;")
---
- metadata:
- - name: max(i)
+ - name: _COLUMN_1
type: scalar
rows:
- [18446744073709551613]
@@ -819,7 +819,7 @@ box.execute("SELECT max(i) FROM t;")
box.execute("SELECT count(i) FROM t;")
---
- metadata:
- - name: count(i)
+ - name: _COLUMN_1
type: integer
rows:
- [3]
@@ -827,7 +827,7 @@ box.execute("SELECT count(i) FROM t;")
box.execute("SELECT group_concat(i) FROM t;")
---
- metadata:
- - name: group_concat(i)
+ - name: _COLUMN_1
type: string
rows:
- ['1,-1,18446744073709551613']
@@ -839,7 +839,7 @@ box.execute("DELETE FROM t WHERE i < 18446744073709551613;")
box.execute("SELECT lower(i) FROM t;")
---
- metadata:
- - name: lower(i)
+ - name: _COLUMN_1
type: string
rows:
- ['18446744073709551613']
@@ -847,7 +847,7 @@ box.execute("SELECT lower(i) FROM t;")
box.execute("SELECT upper(i) FROM t;")
---
- metadata:
- - name: upper(i)
+ - name: _COLUMN_1
type: string
rows:
- ['18446744073709551613']
@@ -855,7 +855,7 @@ box.execute("SELECT upper(i) FROM t;")
box.execute("SELECT abs(i) FROM t;")
---
- metadata:
- - name: abs(i)
+ - name: _COLUMN_1
type: number
rows:
- [18446744073709551613]
@@ -863,7 +863,7 @@ box.execute("SELECT abs(i) FROM t;")
box.execute("SELECT typeof(i) FROM t;")
---
- metadata:
- - name: typeof(i)
+ - name: _COLUMN_1
type: string
rows:
- ['integer']
@@ -871,7 +871,7 @@ box.execute("SELECT typeof(i) FROM t;")
box.execute("SELECT quote(i) FROM t;")
---
- metadata:
- - name: quote(i)
+ - name: _COLUMN_1
type: string
rows:
- [18446744073709551613]
@@ -879,7 +879,7 @@ box.execute("SELECT quote(i) FROM t;")
box.execute("SELECT LEAST(-1, i) FROM t;")
---
- metadata:
- - name: LEAST(-1, i)
+ - name: _COLUMN_1
type: scalar
rows:
- [-1]
@@ -887,7 +887,7 @@ box.execute("SELECT LEAST(-1, i) FROM t;")
box.execute("SELECT quote(i) FROM t;")
---
- metadata:
- - name: quote(i)
+ - name: _COLUMN_1
type: string
rows:
- [18446744073709551613]
@@ -1020,7 +1020,7 @@ box.space.T1:drop()
box.execute("SELECT CAST(18446744073709551615 AS NUMBER);")
---
- metadata:
- - name: CAST(18446744073709551615 AS NUMBER)
+ - name: _COLUMN_1
type: number
rows:
- [1.844674407371e+19]
@@ -1028,7 +1028,7 @@ box.execute("SELECT CAST(18446744073709551615 AS NUMBER);")
box.execute("SELECT CAST(18446744073709551615 AS TEXT);")
---
- metadata:
- - name: CAST(18446744073709551615 AS TEXT)
+ - name: _COLUMN_1
type: string
rows:
- ['18446744073709551615']
@@ -1036,7 +1036,7 @@ box.execute("SELECT CAST(18446744073709551615 AS TEXT);")
box.execute("SELECT CAST(18446744073709551615 AS SCALAR);")
---
- metadata:
- - name: CAST(18446744073709551615 AS SCALAR)
+ - name: _COLUMN_1
type: scalar
rows:
- [18446744073709551615]
@@ -1044,7 +1044,7 @@ box.execute("SELECT CAST(18446744073709551615 AS SCALAR);")
box.execute("SELECT CAST(18446744073709551615 AS BOOLEAN);")
---
- metadata:
- - name: CAST(18446744073709551615 AS BOOLEAN)
+ - name: _COLUMN_1
type: boolean
rows:
- [true]
@@ -1052,7 +1052,7 @@ box.execute("SELECT CAST(18446744073709551615 AS BOOLEAN);")
box.execute("SELECT CAST('18446744073709551615' AS INTEGER);")
---
- metadata:
- - name: CAST('18446744073709551615' AS INTEGER)
+ - name: _COLUMN_1
type: integer
rows:
- [18446744073709551615]
@@ -1085,7 +1085,7 @@ box.execute("SELECT id FROM t1;")
box.execute("SELECT CAST(123 AS UNSIGNED);")
---
- metadata:
- - name: CAST(123 AS UNSIGNED)
+ - name: _COLUMN_1
type: unsigned
rows:
- [123]
@@ -1098,7 +1098,7 @@ box.execute("SELECT CAST(-123 AS UNSIGNED);")
box.execute("SELECT CAST(1.5 AS UNSIGNED);")
---
- metadata:
- - name: CAST(1.5 AS UNSIGNED)
+ - name: _COLUMN_1
type: unsigned
rows:
- [1]
@@ -1111,7 +1111,7 @@ box.execute("SELECT CAST(-1.5 AS UNSIGNED);")
box.execute("SELECT CAST(true AS UNSIGNED);")
---
- metadata:
- - name: CAST(true AS UNSIGNED)
+ - name: _COLUMN_1
type: unsigned
rows:
- [1]
@@ -1119,7 +1119,7 @@ box.execute("SELECT CAST(true AS UNSIGNED);")
box.execute("SELECT CAST('123' AS UNSIGNED);")
---
- metadata:
- - name: CAST('123' AS UNSIGNED)
+ - name: _COLUMN_1
type: unsigned
rows:
- [123]
@@ -1151,7 +1151,7 @@ box.space.T:drop()
box.execute("SELECT CASE 1 WHEN 1 THEN x'0000000000' WHEN 2 THEN 'str' END")
---
- metadata:
- - name: CASE 1 WHEN 1 THEN x'0000000000' WHEN 2 THEN 'str' END
+ - name: _COLUMN_1
type: scalar
rows:
- ["\0\0\0\0\0"]
@@ -1159,7 +1159,7 @@ box.execute("SELECT CASE 1 WHEN 1 THEN x'0000000000' WHEN 2 THEN 'str' END")
box.execute("SELECT CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 END")
---
- metadata:
- - name: CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 END
+ - name: _COLUMN_1
type: integer
rows:
- [666]
@@ -1167,7 +1167,7 @@ box.execute("SELECT CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 END")
box.execute("SELECT CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 ELSE 321 END")
---
- metadata:
- - name: CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 ELSE 321 END
+ - name: _COLUMN_1
type: integer
rows:
- [666]
@@ -1175,7 +1175,7 @@ box.execute("SELECT CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 ELSE 321 END")
box.execute("SELECT CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 ELSE 'asd' END")
---
- metadata:
- - name: CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 ELSE 'asd' END
+ - name: _COLUMN_1
type: scalar
rows:
- [666]
@@ -1183,8 +1183,7 @@ box.execute("SELECT CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 ELSE 'asd' END")
box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN 'd' THEN 4 WHEN 'e' THEN 5 WHEN 'f' THEN 6 END;")
---
- metadata:
- - name: CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN 'd' THEN 4
- WHEN 'e' THEN 5 WHEN 'f' THEN 6 END
+ - name: _COLUMN_1
type: integer
rows:
- [1]
@@ -1192,8 +1191,7 @@ box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHE
box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN 'd' THEN 4 WHEN 'e' THEN 5 WHEN 'f' THEN 'asd' END;")
---
- metadata:
- - name: CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN 'd' THEN 4
- WHEN 'e' THEN 5 WHEN 'f' THEN 'asd' END
+ - name: _COLUMN_1
type: scalar
rows:
- [1]
@@ -1201,8 +1199,7 @@ box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHE
box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN 'd' THEN 4 WHEN 'e' THEN 5 WHEN 'f' THEN 6 ELSE 'asd' END;")
---
- metadata:
- - name: CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN 'd' THEN 4
- WHEN 'e' THEN 5 WHEN 'f' THEN 6 ELSE 'asd' END
+ - name: _COLUMN_1
type: scalar
rows:
- [1]
@@ -1210,8 +1207,7 @@ box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHE
box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN 'd' THEN 4 WHEN 'e' THEN 5 WHEN 'f' THEN 6 ELSE 7 END;")
---
- metadata:
- - name: CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN 'd' THEN 4
- WHEN 'e' THEN 5 WHEN 'f' THEN 6 ELSE 7 END
+ - name: _COLUMN_1
type: integer
rows:
- [1]
@@ -1289,7 +1285,7 @@ box.execute("SELECT total(v) FROM t;")
box.execute("SELECT min(v) FROM t;")
---
- metadata:
- - name: min(v)
+ - name: _COLUMN_1
type: scalar
rows:
- ['abc']
@@ -1297,7 +1293,7 @@ box.execute("SELECT min(v) FROM t;")
box.execute("SELECT max(v) FROM t;")
---
- metadata:
- - name: max(v)
+ - name: _COLUMN_1
type: scalar
rows:
- ['abc']
@@ -1305,7 +1301,7 @@ box.execute("SELECT max(v) FROM t;")
box.execute("SELECT count(v) FROM t;")
---
- metadata:
- - name: count(v)
+ - name: _COLUMN_1
type: integer
rows:
- [1]
@@ -1313,7 +1309,7 @@ box.execute("SELECT count(v) FROM t;")
box.execute("SELECT group_concat(v) FROM t;")
---
- metadata:
- - name: group_concat(v)
+ - name: _COLUMN_1
type: string
rows:
- ['abc']
@@ -1336,7 +1332,7 @@ box.execute("SELECT abs(v) FROM t;")
box.execute("SELECT typeof(v) FROM t;")
---
- metadata:
- - name: typeof(v)
+ - name: _COLUMN_1
type: string
rows:
- ['varbinary']
@@ -1344,7 +1340,7 @@ box.execute("SELECT typeof(v) FROM t;")
box.execute("SELECT quote(v) FROM t;")
---
- metadata:
- - name: quote(v)
+ - name: _COLUMN_1
type: string
rows:
- ['X''616263''']
@@ -1352,7 +1348,7 @@ box.execute("SELECT quote(v) FROM t;")
box.execute("SELECT LEAST(v, x'') FROM t;")
---
- metadata:
- - name: LEAST(v, x'')
+ - name: _COLUMN_1
type: scalar
rows:
- ['']
@@ -1472,7 +1468,7 @@ box.execute("SELECT CAST(true AS VARBINARY);")
box.execute("SELECT CAST('asd' AS VARBINARY);")
---
- metadata:
- - name: CAST('asd' AS VARBINARY)
+ - name: _COLUMN_1
type: varbinary
rows:
- ['asd']
@@ -1480,7 +1476,7 @@ box.execute("SELECT CAST('asd' AS VARBINARY);")
box.execute("SELECT CAST(x'' AS VARBINARY);")
---
- metadata:
- - name: CAST(x'' AS VARBINARY)
+ - name: _COLUMN_1
type: varbinary
rows:
- ['']
@@ -1499,9 +1495,9 @@ box.execute("INSERT INTO t VALUES (1, 1, 1), (2, NULL, NULL);")
box.execute("SELECT typeof(a), typeof(s) FROM t;")
---
- metadata:
- - name: typeof(a)
+ - name: _COLUMN_1
type: string
- - name: typeof(s)
+ - name: _COLUMN_2
type: string
rows:
- ['integer', 'integer']
@@ -1518,7 +1514,7 @@ box.execute('INSERT INTO t1 VALUES (1, NULL, NULL);')
box.execute('SELECT typeof(a & b) FROM t1;')
---
- metadata:
- - name: typeof(a & b)
+ - name: _COLUMN_1
type: string
rows:
- ['integer']
@@ -1526,11 +1522,11 @@ box.execute('SELECT typeof(a & b) FROM t1;')
box.execute('SELECT typeof(a), typeof(b), typeof(a & b) FROM t1')
---
- metadata:
- - name: typeof(a)
+ - name: _COLUMN_1
type: string
- - name: typeof(b)
+ - name: _COLUMN_2
type: string
- - name: typeof(a & b)
+ - name: _COLUMN_3
type: string
rows:
- ['integer', 'integer', 'integer']
@@ -1538,7 +1534,7 @@ box.execute('SELECT typeof(a), typeof(b), typeof(a & b) FROM t1')
box.execute("SELECT typeof(CAST(0 AS UNSIGNED));")
---
- metadata:
- - name: typeof(CAST(0 AS UNSIGNED))
+ - name: _COLUMN_1
type: string
rows:
- ['unsigned']
@@ -1698,7 +1694,7 @@ box.execute('DROP TABLE t1;')
box.execute("SELECT 1.0;")
---
- metadata:
- - name: '1.0'
+ - name: _COLUMN_1
type: double
rows:
- [1]
@@ -1706,7 +1702,7 @@ box.execute("SELECT 1.0;")
box.execute("SELECT .01;")
---
- metadata:
- - name: '.01'
+ - name: _COLUMN_1
type: double
rows:
- [0.01]
@@ -1714,7 +1710,7 @@ box.execute("SELECT .01;")
box.execute("SELECT CAST(1 AS DOUBLE);")
---
- metadata:
- - name: CAST(1 AS DOUBLE)
+ - name: _COLUMN_1
type: double
rows:
- [1]
@@ -1722,7 +1718,7 @@ box.execute("SELECT CAST(1 AS DOUBLE);")
box.execute("SELECT CAST(1.123 AS DOUBLE);")
---
- metadata:
- - name: CAST(1.123 AS DOUBLE)
+ - name: _COLUMN_1
type: double
rows:
- [1.123]
@@ -1740,7 +1736,7 @@ box.execute("SELECT CAST('asd' AS DOUBLE);")
box.execute("SELECT CAST('1' AS DOUBLE);")
---
- metadata:
- - name: CAST('1' AS DOUBLE)
+ - name: _COLUMN_1
type: double
rows:
- [1]
@@ -1748,7 +1744,7 @@ box.execute("SELECT CAST('1' AS DOUBLE);")
box.execute("SELECT CAST('1.123' AS DOUBLE);")
---
- metadata:
- - name: CAST('1.123' AS DOUBLE)
+ - name: _COLUMN_1
type: double
rows:
- [1.123]
@@ -1766,7 +1762,7 @@ box.execute("SELECT CAST(x'35' AS DOUBLE);")
box.execute("SELECT CAST(CAST(x'35' AS STRING) AS DOUBLE);")
---
- metadata:
- - name: CAST(CAST(x'35' AS STRING) AS DOUBLE)
+ - name: _COLUMN_1
type: double
rows:
- [5]
@@ -1800,7 +1796,7 @@ box.execute('SELECT * FROM t;')
box.execute('SELECT d / 100 FROM t;')
---
- metadata:
- - name: d / 100
+ - name: _COLUMN_1
type: double
rows:
- [0.1]
@@ -1833,7 +1829,7 @@ box.execute('SELECT * from t WHERE d = 3.3;')
box.execute("SELECT sum(d) FROM t;")
---
- metadata:
- - name: sum(d)
+ - name: _COLUMN_1
type: number
rows:
- [18000000000000000000]
@@ -1841,7 +1837,7 @@ box.execute("SELECT sum(d) FROM t;")
box.execute("SELECT avg(d) FROM t;")
---
- metadata:
- - name: avg(d)
+ - name: _COLUMN_1
type: number
rows:
- [4500000000000000000]
@@ -1849,7 +1845,7 @@ box.execute("SELECT avg(d) FROM t;")
box.execute("SELECT total(d) FROM t;")
---
- metadata:
- - name: total(d)
+ - name: _COLUMN_1
type: number
rows:
- [18000000000000000000]
@@ -1857,7 +1853,7 @@ box.execute("SELECT total(d) FROM t;")
box.execute("SELECT min(d) FROM t;")
---
- metadata:
- - name: min(d)
+ - name: _COLUMN_1
type: scalar
rows:
- [-2]
@@ -1865,7 +1861,7 @@ box.execute("SELECT min(d) FROM t;")
box.execute("SELECT max(d) FROM t;")
---
- metadata:
- - name: max(d)
+ - name: _COLUMN_1
type: scalar
rows:
- [18000000000000000000]
@@ -1873,7 +1869,7 @@ box.execute("SELECT max(d) FROM t;")
box.execute("SELECT count(d) FROM t;")
---
- metadata:
- - name: count(d)
+ - name: _COLUMN_1
type: integer
rows:
- [4]
@@ -1881,7 +1877,7 @@ box.execute("SELECT count(d) FROM t;")
box.execute("SELECT group_concat(d) FROM t;")
---
- metadata:
- - name: group_concat(d)
+ - name: _COLUMN_1
type: string
rows:
- ['10.0,-2.0,3.3,1.8e+19']
@@ -1889,7 +1885,7 @@ box.execute("SELECT group_concat(d) FROM t;")
box.execute("SELECT lower(d) FROM t;")
---
- metadata:
- - name: lower(d)
+ - name: _COLUMN_1
type: string
rows:
- ['10.0']
@@ -1900,7 +1896,7 @@ box.execute("SELECT lower(d) FROM t;")
box.execute("SELECT upper(d) FROM t;")
---
- metadata:
- - name: upper(d)
+ - name: _COLUMN_1
type: string
rows:
- ['10.0']
@@ -1911,7 +1907,7 @@ box.execute("SELECT upper(d) FROM t;")
box.execute("SELECT abs(d) FROM t;")
---
- metadata:
- - name: abs(d)
+ - name: _COLUMN_1
type: number
rows:
- [10]
@@ -1922,7 +1918,7 @@ box.execute("SELECT abs(d) FROM t;")
box.execute("SELECT typeof(d) FROM t;")
---
- metadata:
- - name: typeof(d)
+ - name: _COLUMN_1
type: string
rows:
- ['double']
@@ -1933,7 +1929,7 @@ box.execute("SELECT typeof(d) FROM t;")
box.execute("SELECT quote(d) FROM t;")
---
- metadata:
- - name: quote(d)
+ - name: _COLUMN_1
type: string
rows:
- ['10.0']
@@ -1944,7 +1940,7 @@ box.execute("SELECT quote(d) FROM t;")
box.execute("SELECT LEAST(d, 0) FROM t;")
---
- metadata:
- - name: LEAST(d, 0)
+ - name: _COLUMN_1
type: scalar
rows:
- [0]
@@ -2086,9 +2082,9 @@ box.execute("DROP TABLE t4;")
box.execute("SELECT 1.0, typeof(1.0);")
---
- metadata:
- - name: '1.0'
+ - name: _COLUMN_1
type: double
- - name: typeof(1.0)
+ - name: _COLUMN_2
type: string
rows:
- [1, 'double']
@@ -2096,9 +2092,9 @@ box.execute("SELECT 1.0, typeof(1.0);")
box.execute("SELECT CAST(2 AS DOUBLE), typeof(CAST(2 AS DOUBLE));")
---
- metadata:
- - name: CAST(2 AS DOUBLE)
+ - name: _COLUMN_1
type: double
- - name: typeof(CAST(2 AS DOUBLE))
+ - name: _COLUMN_2
type: string
rows:
- [2, 'double']
@@ -2106,9 +2102,9 @@ box.execute("SELECT CAST(2 AS DOUBLE), typeof(CAST(2 AS DOUBLE));")
box.execute("SELECT 3e3, typeof(3e3);")
---
- metadata:
- - name: '3e3'
+ - name: _COLUMN_1
type: double
- - name: typeof(3e3)
+ - name: _COLUMN_2
type: string
rows:
- [3000, 'double']
@@ -2126,7 +2122,7 @@ box.execute("SELECT d, TYPEOF(d) FROM t5;")
- metadata:
- name: D
type: double
- - name: TYPEOF(d)
+ - name: _COLUMN_2
type: string
rows:
- [4, 'double']
--
2.21.0 (Apple Git-122)
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2020-05-01 19:35 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-09 15:02 [Tarantool-patches] [PATCH] sql: use unify pattern for column names Roman Khabibov
2020-03-09 15:04 ` Roman Khabibov
2020-03-12 0:14 ` Vladislav Shpilevoy
2020-03-12 15:04 ` Nikita Pettik
2020-03-31 21:05 ` Roman Khabibov
2020-04-21 23:37 ` Vladislav Shpilevoy
2020-04-26 23:08 ` Roman Khabibov
2020-05-01 19:35 ` Vladislav Shpilevoy
-- strict thread matches above, loose matches on Subject: below --
2020-02-16 10:14 Roman Khabibov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox