[Tarantool-patches] [PATCH v3 1/2] sql: use unify pattern for column names

Roman Khabibov roman.habibov at tarantool.org
Tue Jun 30 02:46:07 MSK 2020


Hi! Thanks for the review.

> On Jun 29, 2020, at 23:08, Vladislav Shpilevoy <v.shpilevoy at tarantool.org> wrote:
> 
> Hi! Thanks for the patch!
> 
>> In my patch, I used the zName field of the struct ExprList_item,
>> which is also used for aliases. But I did not find words in the
>> code that this field is only for aliases (<AS> clause), therefore
>> I considered it legitimate to put auto names in it.
>> 
>> PostgreSQL would throw an error in the case above: "ambiguous names”.
>> But it works for us. Is it a bug or not? Perhaps yes. In any case,
>> this does not apply to the patch and requires a separate discussion,
>> so I just delete this test.
> 
> I wouldn't consider it a bug. And it is totally not related to this
> patchset. So I would leave it as is now.
> 
> Please, don't delete any tests unless they are duplicate, or useless.
> 
> See 2 comments below.
> 
>> commit ed196a4446177eb14aa1b86a382c32416edb5794
>> Author: Roman Khabibov <roman.habibov at tarantool.org>
>> Date:   Thu Mar 5 12:48:58 2020 +0300
>> 
>>    sql: 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 generated 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]
>>    ...
>>    ```
>> 
>>    Here, the expression "mycol + 1" generates a new column, so that
>>    it is the first auto generated resulting column will be named as
>>    "COLUMN_1".
>>    ```
>>    tarantool> CREATE TABLE test (mycol INT PRIMARY KEY);
>>    ---
>>    - row_count: 1
>>    ...
>> 
>>    tarantool> SELECT mycol, mycol + 1 FROM test;
>>    ---
>>    - metadata:
>>      - name: MYCOL
>>        type: integer
>>      - name: COLUMN_1
>>        type: integer
>>      rows: []
>>    ...
>>    ```
>>    Note that you can use generated names already within the query,
>>    e.g. in <ORDER BY> clause.
>>    ```
>>    tarantool> SELECT mycol, mycol + 1 FROM test ORDER BY column_1;
>>    ---
>>    - metadata:
>>      - name: MYCOL
>>        type: integer
>>      - name: COLUMN_1
>>        type: integer
>>      rows: []
>>    ...
>>    ```
>> 
>>    It should also be noted that if you use column names similar to
>>    the "COLUMN_N" pattern, you can get the same names as a result:
>> 
>>    ```
>>    tarantool> CREATE TABLE test (column_1 SCALAR PRIMARY KEY);
>>    ---
>>    - row_count: 1
>>    ...
>> 
>>    tarantool> INSERT INTO test VALUES(1);
>>    ---
>>    - row_count: 1
>>    ...
>> 
>>    tarantool> SELECT column_1, column_1 COLLATE "unicode_ci" FROM test;
> 
> 1. In my only comment to the previous patch I asked not to use
> COLLATE for numbers, and make the example more representative.
> Here if I remove 'COLLATE "unicode_ci"', the result won't change.
> That makes the example close to useless.
> 
> Please, reconsider my comment from the previous email.
Yes. ‘colname + 1’ seems more logical.

>>    ---
>>    - metadata:
>>      - name: COLUMN_1
>>        type: scalar
>>      - name: COLUMN_1
>>        type: scalar
>>      rows:
>>      - [1, 1]
>>    ...
>>    ```
>> 
>> diff --git a/test/sql-tap/colname.test.lua b/test/sql-tap/colname.test.lua
>> index caa61a07a..f27ffe413 100755
>> --- a/test/sql-tap/colname.test.lua
>> +++ b/test/sql-tap/colname.test.lua
>> @@ -635,4 +635,133 @@ test:do_catchsql_test(> +
>> +test:do_execsql2_test(
>> +    "colname-12.14",
>> +    [[
>> +        CREATE TABLE j_1 (column_1 SCALAR PRIMARY KEY, column_2 SCALAR);
>> +        INSERT INTO j_1 VALUES(1, 1);
>> +    ]], {})
>> +
>> +test:do_execsql2_test(
>> +    "colname-12.15",
>> +    [[
>> +        SELECT column_1, column_1 COLLATE "unicode_ci", column_2, 1 FROM j_1;
>> +    ]], {
>> +        "COLUMN_1",1,"COLUMN_1",1,"COLUMN_2",1,"COLUMN_2",1
> 
> 2. Ditto.
+test:do_execsql2_test(
+    "colname-12.5",
+    [[
+        CREATE TABLE j (s1 SCALAR PRIMARY KEY);
+        INSERT INTO j VALUES(1);
+    ]], {})
+
+--
+-- Column named as 'COLUMN_1', because 's1 + 1' is a expression.
+--
+test:do_execsql2_test(
+    "colname-12.6",
+    [[
+        SELECT s1 + 1 FROM j;
+    ]], {
+        "COLUMN_1",2
+    })
+
+test:do_execsql2_test(
+    "colname-12.7",
+    [[
+        SELECT s1 + 1 FROM j ORDER BY column_1;
+    ]], {
+        "COLUMN_1",2
+    })
+
+test:do_execsql2_test(
+    "colname-12.8",
+    [[
+        SELECT * FROM (SELECT s1 + 1 FROM j
+                       ORDER BY column_1) ORDER BY column_1;
+    ]], {
+        "COLUMN_1",2
+    })
+
+test:do_execsql2_test(
+    "colname-12.9",
+    [[
+        SELECT s1 + 1 FROM j GROUP BY column_1;
+    ]], {
+        "COLUMN_1",2
+    })
+
+test:do_execsql2_test(
+    "colname-12.10",
+    [[
+        SELECT * FROM (SELECT s1 + 1 FROM j
+                       ORDER BY column_1) GROUP BY column_1;
+    ]], {
+        "COLUMN_1",2
+    })
+
+test:do_execsql2_test(
+    "colname-12.11",
+    [[
+        SELECT * FROM (SELECT s1 + 1 FROM j
+                       ORDER BY column_1) WHERE column_1 = 2;
+    ]], {
+        "COLUMN_1",2
+    })
+
+test:do_execsql2_test(
+    "colname-12.12",
+    [[
+        SELECT *, s1 + 1 FROM j ORDER BY column_1;
+    ]], {
+        "S1",1,"COLUMN_1",2
+    })
+
+test:do_execsql2_test(
+    "colname-12.13",
+    [[
+        SELECT s1 + 1, * FROM j ORDER BY column_1;
+    ]], {
+        "COLUMN_1",2,"S1",1
+    })
+
+test:do_execsql2_test(
+    "colname-12.14",
+    [[
+        CREATE TABLE j_1 (column_1 SCALAR PRIMARY KEY, column_2 SCALAR);
+        INSERT INTO j_1 VALUES(1, 1);
+    ]], {})
+
+test:do_execsql2_test(
+    "colname-12.15",
+    [[
+        SELECT column_1, column_1 + 1, column_2, 2 FROM j_1;
+    ]], {
+        "COLUMN_1",1,"COLUMN_1",2,"COLUMN_2",1,"COLUMN_2",2
+    })
+

>> +    })
>> +

commit 6ec3cfd814229f81d12ab77ac92bdb986d91e958
Author: Roman Khabibov <roman.habibov at tarantool.org>
Date:   Thu Mar 5 12:48:58 2020 +0300

    sql: 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 generated 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]
    ...
    ```
    
    Here, the expression "mycol + 1" generates a new column, so that
    it is the first auto generated resulting column will be named as
    "COLUMN_1".
    ```
    tarantool> CREATE TABLE test (mycol INT PRIMARY KEY);
    ---
    - row_count: 1
    ...
    
    tarantool> SELECT mycol, mycol + 1 FROM test;
    ---
    - metadata:
      - name: MYCOL
        type: integer
      - name: COLUMN_1
        type: integer
      rows: []
    ...
    ```
    Note that you can use generated names already within the query,
    e.g. in <ORDER BY> clause.
    ```
    tarantool> SELECT mycol, mycol + 1 FROM test ORDER BY column_1;
    ---
    - metadata:
      - name: MYCOL
        type: integer
      - name: COLUMN_1
        type: integer
      rows: []
    ...
    ```
    
    It should also be noted that if you use column names similar to
    the "COLUMN_N" pattern, you can get the same names as a result:
    
    ```
    tarantool> CREATE TABLE test (column_1 SCALAR PRIMARY KEY);
    ---
    - row_count: 1
    ...
    
    tarantool> INSERT INTO test VALUES(1);
    ---
    - row_count: 1
    ...
    
    tarantool> SELECT column_1, column_1 + 1 FROM test;
    ---
    - metadata:
      - name: COLUMN_1
        type: scalar
      - name: COLUMN_1
        type: scalar
      rows:
      - [1, 2]
    ...
    ```

diff --git a/src/box/sql/select.c b/src/box/sql/select.c
index 4b069addb..26c735ed7 100644
--- a/src/box/sql/select.c
+++ b/src/box/sql/select.c
@@ -1854,14 +1854,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);
 		}
 	}
@@ -1897,7 +1897,6 @@ sqlColumnsFromExprList(Parse * parse, ExprList * expr_list,
 	/* Database connection */
 	sql *db = parse->db;
 	u32 cnt;		/* Index added to make the name unique */
-	Expr *p;		/* Expression for a single result column */
 	char *zName;		/* Column name */
 	int nName;		/* Size of name in zName[] */
 	Hash ht;		/* Hash table of column names */
@@ -1929,13 +1928,12 @@ sqlColumnsFromExprList(Parse * parse, ExprList * expr_list,
 	space_def->field_count = column_count;
 
 	for (uint32_t i = 0; i < column_count; i++) {
-		/* Get an appropriate name for the column
+		/*
+		 * Check if the column contains an "AS <name>"
+		 * phrase.
 		 */
-		p = sqlExprSkipCollate(expr_list->a[i].pExpr);
-		if ((zName = expr_list->a[i].zName) != 0) {
-			/* If the column contains an "AS <name>" phrase, use <name> as the name */
-		} else {
-			Expr *pColExpr = p;	/* The expression that is the result column name */
+		if ((zName = expr_list->a[i].zName) == 0) {
+			struct Expr *pColExpr = expr_list->a[i].pExpr;
 			struct space_def *space_def = NULL;
 			while (pColExpr->op == TK_DOT) {
 				pColExpr = pColExpr->pRight;
@@ -1951,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.
@@ -4792,6 +4790,24 @@ selectPopWith(Walker * pWalker, Select * p)
 	}
 }
 
+/**
+ * Determine whether to generate a name for @a expr or not.
+ *
+ * Auto generated names is needed for every item in  a <SELECT>
+ * expression list except asterisks, dots and column names (also
+ * if this item hasn't alias).
+ *
+ * @param expr Expression from expression list to analyze.
+ *
+ * @retval true/false If item is/isn't needed needed to name.
+ */
+static bool
+is_needed_to_name(struct Expr *expr)
+{
+	return (expr->op != TK_ASTERISK && expr->op != TK_DOT && expr->op !=
+		TK_ID);
+}
+
 /*
  * This routine is a Walker callback for "expanding" a SELECT statement.
  * "Expanding" means to do the following:
@@ -4941,19 +4957,26 @@ selectExpander(Walker * pWalker, Select * p)
 	 * all tables.
 	 *
 	 * The first loop just checks to see if there are any "*" operators
-	 * that need expanding.
+	 * that need expanding and names items of the expression
+	 * list if needed.
 	 */
+	bool has_asterisk = false;
 	for (k = 0; k < pEList->nExpr; k++) {
 		pE = pEList->a[k].pExpr;
 		if (pE->op == TK_ASTERISK)
-			break;
+			has_asterisk = true;
 		assert(pE->op != TK_DOT || pE->pRight != 0);
 		assert(pE->op != TK_DOT
 		       || (pE->pLeft != 0 && pE->pLeft->op == TK_ID));
 		if (pE->op == TK_DOT && pE->pRight->op == TK_ASTERISK)
-			break;
+			has_asterisk = true;
+		if (pEList->a[k].zName == NULL && is_needed_to_name(pE)) {
+			uint32_t idx = ++pParse->autoname_i;
+			pEList->a[k].zName =
+				sqlDbStrDup(db, sql_generate_column_name(idx));
+		}
 	}
-	if (k < pEList->nExpr) {
+	if (has_asterisk) {
 		/*
 		 * If we get here it means the result set contains one or more "*"
 		 * operators that need to be expanded.  Loop through each expression
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 905a4cdab..928cd5758 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..7be5b881c 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(77)
 
 --!./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,133 @@ 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 'COLUMN_1', because 's1 + 1' is a expression.
+--
+test:do_execsql2_test(
+    "colname-12.6",
+    [[
+        SELECT s1 + 1 FROM j;
+    ]], {
+        "COLUMN_1",2
+    })
+
+test:do_execsql2_test(
+    "colname-12.7",
+    [[
+        SELECT s1 + 1 FROM j ORDER BY column_1;
+    ]], {
+        "COLUMN_1",2
+    })
+
+test:do_execsql2_test(
+    "colname-12.8",
+    [[
+        SELECT * FROM (SELECT s1 + 1 FROM j
+                       ORDER BY column_1) ORDER BY column_1;
+    ]], {
+        "COLUMN_1",2
+    })
+
+test:do_execsql2_test(
+    "colname-12.9",
+    [[
+        SELECT s1 + 1 FROM j GROUP BY column_1;
+    ]], {
+        "COLUMN_1",2
+    })
+
+test:do_execsql2_test(
+    "colname-12.10",
+    [[
+        SELECT * FROM (SELECT s1 + 1 FROM j
+                       ORDER BY column_1) GROUP BY column_1;
+    ]], {
+        "COLUMN_1",2
+    })
+
+test:do_execsql2_test(
+    "colname-12.11",
+    [[
+        SELECT * FROM (SELECT s1 + 1 FROM j
+                       ORDER BY column_1) WHERE column_1 = 2;
+    ]], {
+        "COLUMN_1",2
+    })
+
+test:do_execsql2_test(
+    "colname-12.12",
+    [[
+        SELECT *, s1 + 1 FROM j ORDER BY column_1;
+    ]], {
+        "S1",1,"COLUMN_1",2
+    })
+
+test:do_execsql2_test(
+    "colname-12.13",
+    [[
+        SELECT s1 + 1, * FROM j ORDER BY column_1;
+    ]], {
+        "COLUMN_1",2,"S1",1
+    })
+
+test:do_execsql2_test(
+    "colname-12.14",
+    [[
+        CREATE TABLE j_1 (column_1 SCALAR PRIMARY KEY, column_2 SCALAR);
+        INSERT INTO j_1 VALUES(1, 1);
+    ]], {})
+
+test:do_execsql2_test(
+    "colname-12.15",
+    [[
+        SELECT column_1, column_1 + 1, column_2, 2 FROM j_1;
+    ]], {
+        "COLUMN_1",1,"COLUMN_1",2,"COLUMN_2",1,"COLUMN_2",2
+    })
+
 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..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..25bac6d86 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']
  | ...
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/gh-4697-scalar-bool-sort-cmp.result b/test/sql/gh-4697-scalar-bool-sort-cmp.result
index 2423cd894..6f7fbd62b 100644
--- a/test/sql/gh-4697-scalar-bool-sort-cmp.result
+++ b/test/sql/gh-4697-scalar-bool-sort-cmp.result
@@ -30,7 +30,7 @@ SELECT s2, typeof(s2) FROM test ORDER BY s2;
  | - metadata:
  |   - name: S2
  |     type: scalar
- |   - name: typeof(s2)
+ |   - name: COLUMN_1
  |     type: string
  |   rows:
  |   - [null, 'boolean']
@@ -43,7 +43,7 @@ SELECT s3, typeof(s3) FROM test ORDER BY s3;
  | - metadata:
  |   - name: S3
  |     type: scalar
- |   - name: typeof(s3)
+ |   - name: COLUMN_1
  |     type: string
  |   rows:
  |   - [null, 'boolean']
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..0db2cc03f 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_13
  |     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']




More information about the Tarantool-patches mailing list