Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Fix CAST bool field to integer issue #600

Conversation

dai-chen
Copy link
Member

Issue #, if available: #579

Description of changes: To support CAST bool to integer, the painless script generated is changed with new logic. It checks if the field value (source) is a bool and return 0 or 1 accordingly if it is. Otherwise old script code executes.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@dai-chen dai-chen added bug Something isn't working SQL labels Jul 20, 2020
@dai-chen dai-chen self-assigned this Jul 20, 2020
@dai-chen dai-chen marked this pull request as ready for review July 21, 2020 19:20
@dai-chen dai-chen requested review from penghuo and chloe-zh July 21, 2020 19:20
Copy link
Member

@chloe-zh chloe-zh left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the fix!

@dai-chen dai-chen changed the title Fix cast bool to int issue Fix CAST bool field to integer issue Jul 21, 2020
@dai-chen dai-chen merged commit 7372a44 into opendistro-for-elasticsearch:develop Jul 22, 2020
@dai-chen dai-chen deleted the fix-cast-bool-to-int-issue branch July 22, 2020 16:02
dai-chen added a commit that referenced this pull request Aug 4, 2020
* Issue 584 Fix object/nested field select issue

* Issue 600 Fix CAST bool to integer issue

* Issue 609 Support queries end with semi colon
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working SQL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants