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: support jsonb_to_tsvector #109955

Open
giangpham712 opened this issue Sep 2, 2023 · 2 comments
Open

sql: support jsonb_to_tsvector #109955

giangpham712 opened this issue Sep 2, 2023 · 2 comments
Labels
A-tools-efcore C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) O-community Originated from the community T-sql-queries SQL Queries Team

Comments

@giangpham712
Copy link

giangpham712 commented Sep 2, 2023

Function jsonb_to_tsvector is currently not supported

json_to_tsvector ( [ config regconfig, ] document json, filter jsonb ) → tsvector

jsonb_to_tsvector ( [ config regconfig, ] document jsonb, filter jsonb ) → tsvector

Selects each item in the JSON document that is requested by the filter and converts each one to a tsvector, normalizing words according to the specified or default configuration. The results are then concatenated in document order to produce the output. Position information is generated as though one stopword exists between each pair of selected items. (Beware that “document order” of the fields of a JSON object is implementation-dependent when the input is jsonb.) The filter must be a jsonb array containing zero or more of these keywords: "string" (to include all string values), "numeric" (to include all numeric values), "boolean" (to include all boolean values), "key" (to include all keys), or "all" (to include all the above). As a special case, the filter can also be a simple JSON value that is one of these keywords.

json_to_tsvector('english', '{"a": "The Fat Rats", "b": 123}'::json, '["string", "numeric"]') → '123':5 'fat':2 'rat':3

json_to_tsvector('english', '{"cat": "The Fat Rats", "dog": 123}'::json, '"all"') → '123':9 'cat':1 'dog':7 'fat':4 'rat':5

Additional context
This affects efcore.pg tests

Jira issue: CRDB-31181

@giangpham712 giangpham712 added the C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) label Sep 2, 2023
@blathers-crl
Copy link

blathers-crl bot commented Sep 2, 2023

Hello, I am Blathers. I am here to help you get the issue triaged.

It looks like you have not filled out the issue in the format of any of our templates. To best assist you, we advise you to use one of these templates.

I was unable to automatically find someone to ping.

If we have not gotten back to your issue within a few business days, you can try the following:

  • Join our community slack channel and ask on #cockroachdb.
  • Try find someone from here if you know they worked closely on the area and CC them.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@blathers-crl blathers-crl bot added O-community Originated from the community X-blathers-untriaged blathers was unable to find an owner labels Sep 2, 2023
@ZhouXing19 ZhouXing19 added the T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) label Sep 5, 2023
@rafiss rafiss added A-tools-efcore and removed X-blathers-untriaged blathers was unable to find an owner labels Sep 5, 2023
@rafiss
Copy link
Collaborator

rafiss commented Sep 5, 2023

We won't add this in the near-term, so please skip the EFCore tests that use this function.

Added as a child issue to #41288

@rafiss rafiss added T-sql-queries SQL Queries Team and removed T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) labels Sep 5, 2023
@github-project-automation github-project-automation bot moved this to Triage in SQL Queries Sep 5, 2023
@mgartner mgartner moved this from Triage to New Backlog in SQL Queries Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tools-efcore C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) O-community Originated from the community T-sql-queries SQL Queries Team
Projects
Status: Backlog
Development

No branches or pull requests

3 participants