Skip to content

opt: Enable additional logic tests for opt configs#26143

Merged
craig[bot] merged 5 commits intocockroachdb:masterfrom
andy-kimball:logic
May 29, 2018
Merged

opt: Enable additional logic tests for opt configs#26143
craig[bot] merged 5 commits intocockroachdb:masterfrom
andy-kimball:logic

Conversation

@andy-kimball
Copy link
Copy Markdown
Contributor

Enable more logic tests (orms -> snapshot_unrelated_update).
Fix various bugs and issues that were failing tests.

@andy-kimball andy-kimball requested review from a team, RaduBerinde, justinj and rytaft May 28, 2018 17:25
@andy-kimball andy-kimball requested a review from a team as a code owner May 28, 2018 17:25
@andy-kimball andy-kimball requested review from a team May 28, 2018 17:25
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@rytaft
Copy link
Copy Markdown
Collaborator

rytaft commented May 28, 2018

:lgtm:


Review status: all files reviewed at latest revision, all discussions resolved, all commit checks successful.


pkg/sql/logictest/testdata/logic_test/pgoidtype, line 52 at r4 (raw file):


query TTTTT
EXPLAIN (TYPES) SELECT 'pg_constraint'::REGCLASS

why did you remove this test?


pkg/sql/logictest/testdata/logic_test/select_index, line 473 at r4 (raw file):


query IT rowsort
SELECT i, s FROM ab WHERE (i, s) < (1, 'c')

why did you delete this test?


pkg/sql/logictest/testdata/logic_test/select_non_covering_index_filtering, line 151 at r4 (raw file):


query I rowsort
SELECT a FROM t WHERE b = 2 OR ((b BETWEEN 2 AND 1) AND ((s != 'a') OR (s = 'a')))

Did you add this test in a different file?


Comments from Reviewable

@andy-kimball
Copy link
Copy Markdown
Contributor Author

Review status: all files reviewed at latest revision, 3 unresolved discussions, all commit checks successful.


pkg/sql/logictest/testdata/logic_test/pgoidtype, line 52 at r4 (raw file):

Previously, rytaft wrote…

why did you remove this test?

It's redundant with the next several non-explain tests. We should only use EXPLAIN if it's contributing additional information, and this didn't seem to be contributing anything worthwhile.


pkg/sql/logictest/testdata/logic_test/select_index, line 473 at r4 (raw file):

Previously, rytaft wrote…

why did you delete this test?

I don't see a good reason to delete it, so maybe I mistakenly thought it was redundant with the test below. I restored it.


pkg/sql/logictest/testdata/logic_test/select_non_covering_index_filtering, line 151 at r4 (raw file):

Previously, rytaft wrote…

Did you add this test in a different file?

Executing this with the new optimizer requires the lookup join operator, which we don't yet implement. When I split it, I think I skipped it because it was giving an execution error, and forgot to add it back in. Good catch.

I've added the variation into the select_index test, but commented it out with at TODO for Justin to re-enable once he merges his PR.


Comments from Reviewable

@andy-kimball andy-kimball force-pushed the logic branch 2 times, most recently from ae9b2ff to c660031 Compare May 29, 2018 04:06
Statistics builder panics when end key is NULL when it's trying
to compute start/end int boundaries, because it assumes that type
of end key is always int.

The fix is to add an explicit check to ensure that the end key is
also an int, just like the start key.

Release note: None
After discussion, it turns out the right way to determine if two
types are structurally equivalent is to compare their string
representations. This commit reverts some earlier equivalence work
in favor of simply comparing type strings.

Release note: None
@rytaft
Copy link
Copy Markdown
Collaborator

rytaft commented May 29, 2018

Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed.


pkg/sql/sem/tree/type_check.go, line 756 at r8 (raw file):

		return expr, nil
	}
	return nil, pgerror.NewErrorf(pgerror.CodeInternalError, "name \"%s\" is not defined", name)

Did you mean to set this back to the way it was before?


Comments from Reviewable

@andy-kimball andy-kimball requested a review from a team as a code owner May 29, 2018 14:47
@andy-kimball andy-kimball requested a review from a team May 29, 2018 14:47
@andy-kimball
Copy link
Copy Markdown
Contributor Author

Review status: 8 of 93 files reviewed at latest revision, 1 unresolved discussion, all commit checks successful.


pkg/sql/sem/tree/type_check.go, line 756 at r8 (raw file):

Previously, rytaft wrote…

Did you mean to set this back to the way it was before?

I consolidated the error message changes into one commit that I was going to include in the next PR. But I see now that I've got to pull it into this PR, as the tests aren't succeeding. I've merged that commit into this PR. Can you take a look?


Comments from Reviewable

@rytaft
Copy link
Copy Markdown
Collaborator

rytaft commented May 29, 2018

:lgtm:


Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed.


Comments from Reviewable

@RaduBerinde
Copy link
Copy Markdown
Member

:lgtm:


Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed.


Comments from Reviewable

Change error message `column name "foo" not found` to `column "foo" does
not exist`. Both error messages are inconsistently used across the
codebase today. This commit makes the error message the same for all of
these cases, for consistency, and in order to match the Postgres message.

Release note: None
Mark several features as unsupported so that we can fall back
to the heuristic planner when the optbuilder encounters them.
Also update several error messages that make it easier for the
new semantic analyzer to raise the same error messages as the
2.0 semantic analyzer.

Release note: None
Enable most logic tests from orms -> snapshot_unrelated_update.

   - Merged several select-related tests together.
   - Merged execbuilder project test into select test.

Release note: None
@andy-kimball
Copy link
Copy Markdown
Contributor Author

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented May 29, 2018

Build failed (retrying...)

@andy-kimball
Copy link
Copy Markdown
Contributor Author

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented May 29, 2018

Not awaiting review

@andy-kimball
Copy link
Copy Markdown
Contributor Author

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented May 29, 2018

Not awaiting review

craig bot pushed a commit that referenced this pull request May 29, 2018
26143: opt: Enable additional logic tests for opt configs r=andy-kimball a=andy-kimball

Enable more logic tests (orms -> snapshot_unrelated_update).
Fix various bugs and issues that were failing tests.


26158: cli: fix `cockroach quit` r=knz a=knz

Informs/fixes #25870.
Fixes  #26144.

This patch fixes the following:

- the logic in `doShutdown()` aims to ignore errors caused by attempts
  connect to a server which is closing its gRPC channels, but was
  missing one case of such errors: during the initial check whether
  the node was running. This patch causes gRPC "closed connection"
  errors to become also ignored in that case.

- previously if there was a transient gRPC error during a hard
  shutdown whereby the shutdown could still succeed, then `cockroach
  quit` would fail no matter what. This patch makes `cockroach quit`
  retry a hard shutdown.

- the warning messages are now emitted on stderr (via `log.Warningf`)
  instead of stdout.

Release note (bug fix): fix a bug where `cockroach quit` would
erroneously fail even though the node already successfully shut down.

Release note (cli change): `cockroach quit` now emits warning message
on its standard error stream, not standard output.

26165: roachtest: enable periodic heap prof output for kv/splits/nodes=3 r=tschottdorf a=petermattis

See #26081

Release note: None

26167: encryption: add cli command `cockroach gen encryption-key` r=windchan7 a=windchan7

Added cli command `cockroach gen encryption-key` to generate store keys for
encryption at rest.

Encryption CLI: #19783.
Release note: None

Co-authored-by: Andrew Kimball <andyk@cockroachlabs.com>
Co-authored-by: Raphael 'kena' Poss <knz@cockroachlabs.com>
Co-authored-by: Peter Mattis <petermattis@gmail.com>
Co-authored-by: Victor Chen <victor@cockroachlabs.com>
@craig
Copy link
Copy Markdown
Contributor

craig bot commented May 29, 2018

Build succeeded

@craig craig bot merged commit 2036865 into cockroachdb:master May 29, 2018
@andy-kimball andy-kimball deleted the logic branch May 29, 2018 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants