Re: Patch bug: Fix jsonpath .* on Arrays

From: "David E(dot) Wheeler" <david(at)justatheory(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Stepan Neretin <sncfmgg(at)gmail(dot)com>, Степан Неретин <fenixrnd(at)mail(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Subject: Re: Patch bug: Fix jsonpath .* on Arrays
Date: 2024-07-19 13:49:50
Message-ID: 89D1222A-B225-4A9C-A0EC-98A46F2F4A07@justatheory.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Jul 19, 2024, at 01:42, Michael Paquier <michael(at)paquier(dot)xyz> wrote:

> Sorry for the delay. Finally came back to it, and applied the tests.
> Thanks!

Awesome, thank you!

> It was fun to see that HEAD was silenced with the first patch of this
> thread that tweaked the behavior with arrays.

Uh, what? Sorry I don’t follow.

> Regarding the comments, I have left them out for now. That may be a
> good start, but it also feels like we should do a much better job
> overall with the area of jsonpath_exec.c.

I put them in because it took me a bit to track down that they were among the implementors of JsonPathGetVarCallback as I was porting the code.

> One thing that may help as
> a start is to reorganize the routines of the file and divide them into
> sub-categories, or even go through a deeper refactoring to help
> readers go through the existing 4.5k lines of code that are in this
> single file..

After I got all the tests passing in the port to Go, I split it up into 14 implementation and 15 test files (with all of jsonb_jsonpath.(sql.out) in one file). Was much easier to reason about that way.

https://github.com/theory/sqljson/tree/main/path/exec

Best,

David

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David E. Wheeler 2024-07-19 14:05:25 Re: jsonpath: Inconsistency of timestamp_tz() Output
Previous Message Thomas Simpson 2024-07-19 13:46:14 Re: Enhance pg_dump multi-threaded streaming (WAS: Re: filesystem full during vacuum - space recovery issues)