{{ message }}
Add typeof function.#867
Merged
Merged
Conversation
Signed-off-by: Yury-Fridlyand <yuryf@bitquilltech.com>
MaxKsyunz
previously approved these changes
Sep 29, 2022
dai-chen
reviewed
Sep 29, 2022
* Move function definition in ANTLR grammar into a separate group; * Move SQL integration tests outside of legacy block; * Extend integration tests. Signed-off-by: Yury-Fridlyand <yuryf@bitquilltech.com>
Signed-off-by: Yury-Fridlyand <yuryf@bitquilltech.com>
…ssion`. It is able to recognize `OpenSearchDataType` as well. Co-authored-by: MaxKsyunz <maxk@bitquilltech.com> Signed-off-by: Yury-Fridlyand <yuryf@bitquilltech.com>
acarbonetto
previously approved these changes
Oct 12, 2022
dai-chen
reviewed
Oct 13, 2022
dai-chen
previously approved these changes
Oct 13, 2022
dai-chen
left a comment
Collaborator
There was a problem hiding this comment.
Just a minor comment. Thanks for the changes!
Btw, do we want to add this to user manual like PGSQL? Doc: https://www.postgresql.org/docs/current/functions-info.html
Signed-off-by: Yury-Fridlyand <yuryf@bitquilltech.com>
b4dc828
Collaborator
Author
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## 2.x #867 +/- ##
============================================
- Coverage 97.85% 95.10% -2.75%
- Complexity 2989 3075 +86
============================================
Files 281 304 +23
Lines 7357 8258 +901
Branches 467 609 +142
============================================
+ Hits 7199 7854 +655
- Misses 157 350 +193
- Partials 1 54 +53 Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
dai-chen
approved these changes
Oct 19, 2022
dai-chen
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for the changes!
MaxKsyunz
approved these changes
Oct 20, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Signed-off-by: Yury-Fridlyand yuryf@bitquilltech.com
Description
TYPEOFfunction is useful for debugging to check types of other functions. Extremely useful for testing and debugging upcoming PRs with datetime functions.Not added to documentation, because it is not supposed for an end user.
See team review discussion in Bit-Quill#123.
Usage
UPD
TYPEOFfunction perfectly works with SQL types. It works with some OpenSearch (OpenSearchDataType) types, which could be implicitly casted to SQL ones. Unfortunately, function can't accept OpenSearch types, so some information lost.IP,GEO_POINT,BINARYandNESTEDtypes cause crash.https://github.com/Bit-Quill/opensearch-project-sql/blob/d02e16f147a9f3e6afa065f701efa7ece70d310b/opensearch/src/main/java/org/opensearch/sql/opensearch/data/type/OpenSearchDataType.java#L49-L53
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.