From b978f6392910fa12c01668f7f455ebe2e67833bd Mon Sep 17 00:00:00 2001 From: Tim Vaillancourt Date: Wed, 19 Jun 2024 21:18:19 +0200 Subject: [PATCH] Fix some planner expectations Signed-off-by: Tim Vaillancourt --- go/vt/vtgate/planbuilder/testdata/onecase.json | 10 +++++----- .../planbuilder/testdata/systemtables_cases57.json | 8 ++++---- .../planbuilder/testdata/systemtables_cases80.json | 8 ++++---- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/go/vt/vtgate/planbuilder/testdata/onecase.json b/go/vt/vtgate/planbuilder/testdata/onecase.json index 04475d9497a..4ec3963e977 100644 --- a/go/vt/vtgate/planbuilder/testdata/onecase.json +++ b/go/vt/vtgate/planbuilder/testdata/onecase.json @@ -36,8 +36,8 @@ "Name": "user", "Sharded": true }, - "FieldQuery": "select count(*), `user`.intcol from `user` where 1 != 1 group by `user`.intcol", - "Query": "select count(*), `user`.intcol from `user` group by `user`.intcol", + "FieldQuery": "select `user`.intcol, Count(*) from `user` where 1 != 1 group by `user`.intcol", + "Query": "select `user`.intcol, Count(*) from `user` group by `user`.intcol", "Table": "`user`" }, { @@ -47,8 +47,8 @@ "Name": "user", "Sharded": true }, - "FieldQuery": "select count(*) from user_extra where 1 != 1 group by .0", - "Query": "select count(*) from user_extra where :user_intcol + user_extra.incol < 5 group by .0", + "FieldQuery": "select 1, Count(*) from user_extra where 1 != 1 group by .0", + "Query": "select 1, Count(*) from user_extra where :user_intcol + user_extra.incol < 5 group by .0", "Table": "user_extra" } ] @@ -65,4 +65,4 @@ ] } } -] \ No newline at end of file +] diff --git a/go/vt/vtgate/planbuilder/testdata/systemtables_cases57.json b/go/vt/vtgate/planbuilder/testdata/systemtables_cases57.json index a056ca24fec..2df7d77661e 100644 --- a/go/vt/vtgate/planbuilder/testdata/systemtables_cases57.json +++ b/go/vt/vtgate/planbuilder/testdata/systemtables_cases57.json @@ -914,8 +914,8 @@ "Name": "main", "Sharded": false }, - "FieldQuery": "select count(*) from INFORMATION_SCHEMA.`TABLES` where 1 != 1", - "Query": "select count(*) from INFORMATION_SCHEMA.`TABLES` where table_schema = :__vtschemaname and table_name = :table_name", + "FieldQuery": "select COUNT(*) from INFORMATION_SCHEMA.`TABLES` where 1 != 1", + "Query": "select COUNT(*) from INFORMATION_SCHEMA.`TABLES` where table_schema = :__vtschemaname and table_name = :table_name", "SysTableTableName": "[table_name:VARCHAR(\"foo\")]", "SysTableTableSchema": "[VARCHAR(\"performance_schema\")]", "Table": "INFORMATION_SCHEMA.`TABLES`" @@ -931,8 +931,8 @@ "Name": "main", "Sharded": false }, - "FieldQuery": "select count(*) from INFORMATION_SCHEMA.`TABLES` where 1 != 1", - "Query": "select count(*) from INFORMATION_SCHEMA.`TABLES` where table_schema = :__vtschemaname and table_name = :table_name", + "FieldQuery": "select COUNT(*) from INFORMATION_SCHEMA.`TABLES` where 1 != 1", + "Query": "select COUNT(*) from INFORMATION_SCHEMA.`TABLES` where table_schema = :__vtschemaname and table_name = :table_name", "SysTableTableName": "[table_name:VARCHAR(\"foo\")]", "SysTableTableSchema": "[VARCHAR(\"performance_schema\")]", "Table": "INFORMATION_SCHEMA.`TABLES`" diff --git a/go/vt/vtgate/planbuilder/testdata/systemtables_cases80.json b/go/vt/vtgate/planbuilder/testdata/systemtables_cases80.json index 41b30d32151..bff63461f0b 100644 --- a/go/vt/vtgate/planbuilder/testdata/systemtables_cases80.json +++ b/go/vt/vtgate/planbuilder/testdata/systemtables_cases80.json @@ -938,8 +938,8 @@ "Name": "main", "Sharded": false }, - "FieldQuery": "select count(*) from INFORMATION_SCHEMA.`TABLES` where 1 != 1", - "Query": "select count(*) from INFORMATION_SCHEMA.`TABLES` where table_schema = :__vtschemaname and table_name = :table_name", + "FieldQuery": "select COUNT(*) from INFORMATION_SCHEMA.`TABLES` where 1 != 1", + "Query": "select COUNT(*) from INFORMATION_SCHEMA.`TABLES` where table_schema = :__vtschemaname and table_name = :table_name", "SysTableTableName": "[table_name:VARCHAR(\"foo\")]", "SysTableTableSchema": "[VARCHAR(\"performance_schema\")]", "Table": "INFORMATION_SCHEMA.`TABLES`" @@ -955,8 +955,8 @@ "Name": "main", "Sharded": false }, - "FieldQuery": "select count(*) from INFORMATION_SCHEMA.`TABLES` where 1 != 1", - "Query": "select count(*) from INFORMATION_SCHEMA.`TABLES` where table_schema = :__vtschemaname and table_name = :table_name", + "FieldQuery": "select COUNT(*) from INFORMATION_SCHEMA.`TABLES` where 1 != 1", + "Query": "select COUNT(*) from INFORMATION_SCHEMA.`TABLES` where table_schema = :__vtschemaname and table_name = :table_name", "SysTableTableName": "[table_name:VARCHAR(\"foo\")]", "SysTableTableSchema": "[VARCHAR(\"performance_schema\")]", "Table": "INFORMATION_SCHEMA.`TABLES`"