@@ -1800,11 +1800,11 @@ JsonbzArrayIteratorInit(JsonbzArrayIterator *it, CompressedJsonb *cjb)
1800
1800
JsonbDatum * jb = (JsonbDatum * ) cjb -> iter -> buf -> buf ;
1801
1801
const JsonbContainerHeader * jbc = (const JsonbContainerHeader * )((char * ) jb + cjb -> offset );
1802
1802
1803
- jsonxzDecompressTo (cjb , cjb -> offset + ((char * ) & jbc -> children - (char * ) jbc ));
1803
+ // jsonxzDecompressTo(cjb, cjb->offset + ((char *) &jbc->children - (char *) jbc));
1804
1804
1805
1805
it -> count = (cjb -> header & JBC_CMASK );
1806
1806
1807
- jsonxzDecompressTo (cjb , cjb -> offset + ((char * ) & jbc -> children [it -> count ] - (char * ) jbc ));
1807
+ // jsonxzDecompressTo(cjb, cjb->offset + ((char *) &jbc->children[it->count] - (char *) jbc));
1808
1808
1809
1809
it -> cjb = cjb ;
1810
1810
it -> container = jbc ;
@@ -1816,9 +1816,14 @@ JsonbzArrayIteratorInit(JsonbzArrayIterator *it, CompressedJsonb *cjb)
1816
1816
static bool
1817
1817
JsonbzArrayIteratorNext (JsonbzArrayIterator * it , JsonValue * result )
1818
1818
{
1819
+ const void * jb = it -> cjb -> iter -> buf -> buf ;
1820
+ const JsonbContainer * jbc = (const JsonbContainer * )((char * ) jb + it -> cjb -> offset );
1821
+
1819
1822
if (it -> index >= it -> count )
1820
1823
return false;
1821
1824
1825
+ jsonxzDecompressTo (it -> cjb , (char * ) & jbc -> children [it -> count ] - (char * ) jb );
1826
+
1822
1827
fillCompressedJsonbValue (it -> cjb , it -> container , it -> index , it -> base_addr ,
1823
1828
it -> offset , result );
1824
1829
@@ -1831,9 +1836,14 @@ JsonbzArrayIteratorNext(JsonbzArrayIterator *it, JsonValue *result)
1831
1836
static JsonValue *
1832
1837
JsonbzArrayIteratorGetIth (JsonbzArrayIterator * it , uint32 index )
1833
1838
{
1839
+ const void * jb = it -> cjb -> iter -> buf -> buf ;
1840
+ const JsonbContainer * jbc = (const JsonbContainer * )((char * ) jb + it -> cjb -> offset );
1841
+
1834
1842
if (index >= it -> count )
1835
1843
return NULL ;
1836
1844
1845
+ jsonxzDecompressTo (it -> cjb , (char * ) & jbc -> children [index + 1 ] - (char * ) jb );
1846
+
1837
1847
return fillCompressedJsonbValue (it -> cjb , it -> container , index ,
1838
1848
it -> base_addr ,
1839
1849
getJsonbOffset (it -> container , index ),
0 commit comments