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

andy-kimball
Copy link
Contributor

@andy-kimball andy-kimball commented Apr 23, 2019

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

  1. Issue sql: panic: windowNode can't be run in local mode #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 maddyblue, jordanlewis and a team April 23, 2019 23:44
@cockroach-teamcity
Copy link
Member

This change is Reviewable

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

1. Issue cockroachdb#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 cockroachdb#2 and cockroachdb#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 cockroachdb#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 cockroachdb#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.
Copy link
Contributor

@maddyblue maddyblue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@andy-kimball
Copy link
Contributor Author

bors r+

craig bot pushed a commit that referenced this pull request Apr 24, 2019
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 <[email protected]>
@craig
Copy link
Contributor

craig bot commented Apr 24, 2019

Build succeeded

@craig craig bot merged commit 408634f into cockroachdb:master Apr 24, 2019
@andy-kimball andy-kimball deleted the sqlsmith branch April 24, 2019 15:25
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.

3 participants