-
Notifications
You must be signed in to change notification settings - Fork 41
JSON + JSONB support, ->
and ->>
pushing down for JSON data
#109
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
Conversation
Hello, pgspider team! There is some JSON support problem in CI. Could anyone diagnose?
|
SQLite version on CI is 3.46.0. |
@lamdn1409 , thanks for proposition, but bc7515d unfortunately gives no result. Maybe we don't know something about compilation in CI environtment. |
@lamdn1409 , I am still cannot explain the bad result. In the log there is |
@lamdn1409, in CI was problem of SQLite install: usual library directory is |
@lamdn1409 , please look at the state after ef6cae1 : here is no SQLite downloading, bull all tests except json are successfully! Hence SQLite downloading in CI is absolutely not effective for the environment. |
@lamdn1409 , now there are successfully tests, please review a code. |
@mkgrgis sorry for late reply, I had a long vacation. |
I had too :-) My congratulations!
CI SQLite compilation script is not effective in complex with FDW compilation. There was wrong |
Ping, @lamdn1409 ? |
@mkgrgis Thanks for your information. I understood the root cause. However, I concern about the downloaded SQLite version maybe not used yet. I'm thinking about 02 solutions:
|
I prefer the second variant, @lamdn1409:
But I don't think this is a subject of this PR. |
me, too. However, let me discuss with our members first.
I think so, we need to separate this issue. Unfortunately, we cannot spend time to solve the issue at the moment. Could you please support to solve it? |
@lamdn1409 , let's continue review of the code in this PR.
No problems. This planned after pure_float fix and schemas support PR, but before returning to I think here is something about |
Thank you. Your plan is OK. |
I finished reviewing the PR. Please confirm my comments. |
Where are this comments @lamdn1409 ? Could you please give URL because I don't see anything here? |
@lamdn1409 , SQLite compilation autonomy was successfully used in current CI state. Do you think #112 can be closed now? |
->
and ->>
pushing down implementation in WHERE
+ new SQLite err codes
@mkgrgis Please create a PR for reviewing, it's other issue. |
@lamdn1409 , this problem was detected and resolved in this PR. Currently all tests use not system, but compiled and downloaded SQLite library. You can ensure this. CI Ubuntu is old, but SQLite is more newer. |
@mkgrgis It's OK for me. I will review the changes about CI. |
I got it. Thanks for explanation. |
Thanks, @lamdn1409 for the great work! I was happy to work with you around of this PR. SQLite JSONB was really unexpected for me, but we was able to ensure full support of this data structure in the PR. |
@t-kataym , could you please give some approximate dates of this PR review? I am having rebased drafts for other PRs, but some little changes after you review are still possible. |
@mkgrgis I'm sorry for late response. If my understanding is correct, I would like to apply one of the following solutions: |
@t-kataym , what aspect of this PR do you meant as unrelated code? Latest version of PR description was created 2 weeks ago: #109 (comment)
Why? All CI modifications and a new SQL functions are for SQLite autonomous testing only, all
What is the scope of base PR you are meant? Formally this PR was based on some GIS support draft, but GIS data types support was merged and we have direct line now https://github.com/mkgrgis/sqlite_fdw/network .
Please give me a description of unnecessary code. Is this about CI modification for testing against non-system SQLite version? Upd:
If you are about |
@mkgrgis |
Yes. This is result of wrong previous CI process, which didn't use special downloaded SQLite version for testing, but system version. Here was a long discussion after #109 (comment) resolved with effective solution at #109 (comment) . Hence we was unable to test against new SQLite version where there is better JSON support. |
Sorry, I still don't understand the relationship between the modification of CI and the feature of JSON operators support. If they are independent issues/features, it is better to separate them into different PRs. |
@t-kataym , PR with some JSON support cannot have successfully |
@t-kataym , there is such logic of PR scope expanding as: JSON implementation ➛ @lamdn1409 's note about SQLite JSONB ➛ SQLite JSONB implementation ➛ SQLite 3.49.0 only stable JSON support with negative indexes of arrays like in PostgreSQL ➛ ensure CI SQLite downloaded version is not effective for testing, but OS SQLite version ➛ refactoring of CI for using downloaded SQLite version including |
The use of unintentional SQLite version is a general issue of CI environment on this repository. |
@mkgrgis Thank you for your understanding and separating the PR. We will check it. |
@t-kataym , scope of this PR was successfully fragmented to simple partial step-by-step accumulated PRs:
before this complex PR. All PRs are ready for review. |
@t-hiroshige , @lamdn1409 this PR is ready for 2nd review round, all base PRs was merged, all tests are successfully. |
->
and ->>
pushing down implementation in WHERE
+ new SQLite err codes->
and ->>
pushing down
@mkgrgis I have no more comments. |
->
and ->>
pushing down->
and ->>
pushing down for JSON data
@mkgrgis Thank you for creating the PR. |
In this PR about JSON operators support
->
and->>
operators for left both JSON and JSONB operand inWHERE
clauses for both string and integer arguments. Based on https://sqlite.org/json1.htmltypes/json
test case set showing->
and->>
behaviour for both JSON and JSONB for bothSELECT
andWHERE
usage contextsjsonb
support.||
andsubstr
pushing down in tests.Motivation: osmium OSM→PostGIS tool generates OSM tags as JSON or JSONB data. Typical usage look like
... WHERE t->>'building' IS NOT NULL
or ...WHERE t->>'access' = 'private'
.