On Sat, Feb 11, 2023 at 3:21 AM vignesh C <vignes...@gmail.com> wrote: > > On Thu, 9 Feb 2023 at 03:47, Peter Smith <smithpb2...@gmail.com> wrote: > > > > Hi Vignesh, thanks for addressing my v63-0002 review comments. > > > > I confirmed most of the changes. Below is a quick follow-up for the > > remaining ones. > > > > On Mon, Feb 6, 2023 at 10:32 PM vignesh C <vignes...@gmail.com> wrote: > > > > > > On Mon, 6 Feb 2023 at 06:47, Peter Smith <smithpb2...@gmail.com> wrote: > > > > > > ... > > > > > > > > 8. > > > > + value = findJsonbValueFromContainer(container, JB_FOBJECT, &key); > > > > > > > > Should the code be checking or asserting value is not NULL? > > > > > > > > (IIRC I asked this a long time ago - sorry if it was already answered) > > > > > > > > > > Yes, this was already answered by Zheng, quoting as "The null checking > > > for value is done in the upcoming call of expand_one_jsonb_element()." > > > in [1] > > > > Thanks for the info. I saw that Zheng-san only wrote it is handled in > > the “upcoming call of expand_one_jsonb_element”, but I don’t know if > > that is sufficient. For example, if the execution heads down the other > > path (expand_jsonb_array) with a NULL jsonarr then it going to crash, > > isn't it? So I still think some change may be needed here. > > Added an Assert for this. >
Was this a correct change to make here? IIUC this Assert is now going to intercept both cases including the expand_one_jsonb_element() which previously would have thrown a proper ERROR. ------ Kind Regards, Peter Smith. Fujitsu Australia