Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/check_formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:

build:
name: Check Formatting
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
steps:

- name: Set up Go
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check_make_parser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:

build:
name: Check Make Parser
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
steps:

- name: Set up Go
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check_make_visitor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:

build:
name: Check Make Visitor
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
steps:

- name: Set up Go
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cluster_endtoend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on: [push, pull_request]
jobs:

build:
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
strategy:
matrix:
name: [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cluster_endtoend_upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:

build:
name: Run endtoend tests on Cluster (upgrade)
runs-on: ubuntu-latest
runs-on: ubuntu-18.04

steps:
- name: Set up Go
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cluster_initial_sharding_multi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:

build:
name: cluster initial sharding multi
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
steps:

- name: Set up Go
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
build:
name: Create Release
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
steps:

- name: Set up Go
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker_test_1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:

build:
name: Docker Test 1
runs-on: ubuntu-latest
runs-on: ubuntu-18.04

steps:

Expand All @@ -18,4 +18,4 @@ jobs:

- name: Run tests which require docker - 1
run: |
go run test.go -docker=true --follow -shard 10
go run test.go -docker=true --follow -shard 10
4 changes: 2 additions & 2 deletions .github/workflows/docker_test_2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:

build:
name: Docker Test 2
runs-on: ubuntu-latest
runs-on: ubuntu-18.04

steps:

Expand All @@ -18,4 +18,4 @@ jobs:

- name: Run tests which require docker - 2
run: |
go run test.go -docker=true --follow -shard 25
go run test.go -docker=true --follow -shard 25
2 changes: 1 addition & 1 deletion .github/workflows/docker_test_3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:

build:
name: Docker Test 3
runs-on: ubuntu-latest
runs-on: ubuntu-18.04

steps:

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e_race.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:

build:
name: End-to-End Test (Race)
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
steps:

- name: Set up Go
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/endtoend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:

build:
name: End-to-End Test
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
steps:

- name: Set up Go
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ensure_bootstrap_updated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:

build:
name: Check Bootstrap Updated
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
steps:

- name: Set up Go
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/golangci-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on: [push, pull_request]
jobs:
build:
name: Build
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
steps:
- name: Set up Go 1.15
uses: actions/setup-go@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sonar_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
jobs:

build:
runs-on: ubuntu-latest
runs-on: ubuntu-18.04

steps:
- name: Set up Go
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on: [push, pull_request]
jobs:

build:
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
strategy:
matrix:
name: [percona56, mysql57, mysql80, mariadb101, mariadb102, mariadb103]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit_race.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:

build:
name: Unit Test (Race)
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
steps:

- name: Set up Go
Expand Down
2 changes: 2 additions & 0 deletions go/vt/vtgate/planbuilder/filtering.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ func planFilter(pb *primitiveBuilder, input logicalPlan, filter sqlparser.Expr,
}
node.UpdatePlan(pb, filter)
return node, nil
case *pulloutSubquery:
return planFilter(pb, node.underlying, filter, whereType, origin)
case *vindexFunc:
return filterVindexFunc(node, filter)
case *subquery:
Expand Down
43 changes: 43 additions & 0 deletions go/vt/vtgate/planbuilder/testdata/filter_cases.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1773,3 +1773,46 @@
"SysTableTableSchema": "VARBINARY(\"ks\")"
}
}

# pullout sq after pullout sq
"select id from user where not id in (select user_extra.col from user_extra where user_extra.user_id = 42) and id in (select user_extra.col from user_extra where user_extra.user_id = 411)"
{
"QueryType": "SELECT",
"Original": "select id from user where not id in (select user_extra.col from user_extra where user_extra.user_id = 42) and id in (select user_extra.col from user_extra where user_extra.user_id = 411)",
"Instructions": {
"OperatorType": "Subquery",
"Variant": "PulloutIn",
"Inputs": [
{
"OperatorType": "Route",
"Variant": "SelectEqualUnique",
"Keyspace": {
"Name": "user",
"Sharded": true
},
"FieldQuery": "select user_extra.col from user_extra where 1 != 1",
"Query": "select user_extra.col from user_extra where user_extra.user_id = 42",
"Table": "user_extra",
"Values": [
42
],
"Vindex": "user_index"
},
{
"OperatorType": "Route",
"Variant": "SelectIN",
"Keyspace": {
"Name": "user",
"Sharded": true
},
"FieldQuery": "select id from user where 1 != 1",
"Query": "select id from user where :__sq_has_values1 = 1 and id in ::__vals and not (:__sq_has_values2 = 1 and id in ::__sq2)",
"Table": "user",
"Values": [
"::__sq1"
],
"Vindex": "user_index"
}
]
}
}