Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql: Fix issues causing failures in SQLSmith #37057

Merged
merged 1 commit into from Apr 24, 2019

Conversation

Projects
None yet
3 participants
@andy-kimball
Copy link
Contributor

commented Apr 23, 2019

There are (at least) 3 issues that are currently causing the SQLSmith nightly
test to fail:

  1. Issue #36830 - panic: windowNode can't be run in local mode
  2. Panic when calling builtin functions with ANY parameters
  3. Panic when json_build_object is called with DBitArray datum

This commit fixes #2 and #3:

  1. SQLSmith now generates a random datum type when it encounters an ANY param.
  2. Add DBitArray to the list of datums handled by the json_build_object function.

In addition, the fix for #2 exposed a SQLSmith bug, where it ws unable to
parse the type names of existing tables. The fix is to change typeFromName to
use parser.ParseType.

After these fixes, and once issue #36830 is fixed, the SQLSmith tests should
start passing again in nightlies.

Release note (sql change): Fix panic when json_build_object is called with
BIT/VARBIT values.

@andy-kimball andy-kimball requested review from mjibson and jordanlewis Apr 23, 2019

@andy-kimball andy-kimball requested review from cockroachdb/core-prs as code owners Apr 23, 2019

@cockroach-teamcity

This comment has been minimized.

Copy link
Member

commented Apr 23, 2019

This change is Reviewable

sql: Fix issues causing failures in SQLSmith
There are (at least) 3 issues that are currently causing the SQLSmith nightly
test to fail:

1. Issue #36830 - panic: windowNode can't be run in local mode
2. Panic when calling builtin functions with ANY parameters
3. Panic when json_build_object is called with DBitArray datum

This commit fixes #2 and #3:

2. SQLSmith now generates a random datum type when it encounters an ANY param.
3. Add DBitArray to the list of datums handled by the json_build_object function.

In addition, the fix for #2 exposed a SQLSmith bug, where it ws unable to
parse the type names of existing tables. The fix is to change typeFromName to
use parser.ParseType.

After these fixes, and once issue #36830 is fixed, the SQLSmith tests should
start passing again in nightlies.

Release note (sql change): Fix panic when json_build_object is called with
BIT/VARBIT values.

@andy-kimball andy-kimball force-pushed the andy-kimball:sqlsmith branch from 64bc582 to 408634f Apr 23, 2019

@mjibson
Copy link
Member

left a comment

Thanks!

@andy-kimball

This comment has been minimized.

Copy link
Contributor Author

commented Apr 24, 2019

bors r+

craig bot pushed a commit that referenced this pull request Apr 24, 2019

Merge #37057
37057: sql: Fix issues causing failures in SQLSmith r=andy-kimball a=andy-kimball

There are (at least) 3 issues that are currently causing the SQLSmith nightly
test to fail:

1. Issue #36830 - panic: windowNode can't be run in local mode
2. Panic when calling builtin functions with ANY parameters
3. Panic when json_build_object is called with DBitArray datum

This commit fixes #2 and #3:

2. SQLSmith now generates a random datum type when it encounters an ANY param.
3. Add DBitArray to the list of datums handled by the json_build_object function.

In addition, the fix for #2 exposed a SQLSmith bug, where it ws unable to
parse the type names of existing tables. The fix is to change typeFromName to
use parser.ParseType.

After these fixes, and once issue #36830 is fixed, the SQLSmith tests should
start passing again in nightlies.

Release note (sql change): Fix panic when json_build_object is called with
BIT/VARBIT values.

Co-authored-by: Andrew Kimball <andyk@cockroachlabs.com>
@craig

This comment has been minimized.

Copy link

commented Apr 24, 2019

Build succeeded

@craig craig bot merged commit 408634f into cockroachdb:master Apr 24, 2019

3 checks passed

GitHub CI (Cockroach) TeamCity build finished
Details
bors Build succeeded
Details
license/cla Contributor License Agreement is signed.
Details

@andy-kimball andy-kimball deleted the andy-kimball:sqlsmith branch Apr 24, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.