Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 7167290

Browse files
author
Nikita Glukhov
committed
Fix XXX comment about different JSON types in JsonScalarStats
1 parent 527da88 commit 7167290

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/backend/utils/adt/jsonb_typanalyze.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,14 @@ typedef struct JsonPathEntry
9292

9393
#define JsonPathEntryIsArray(entry) ((entry)->len == -1)
9494

95-
/* An array containing a dynamic number of JSON values. */
95+
/*
96+
* An array containing a dynamic number of values extracted from JSON documents.
97+
* All values should have the same data type:
98+
* jsonb - ordinary path stats, values of different JSON types
99+
* int32 - array/object length stats
100+
* text - separate stats fro strings
101+
* numeric - separate stats fro numbers
102+
*/
96103
typedef struct JsonValues
97104
{
98105
Datum *buf;
@@ -103,8 +110,6 @@ typedef struct JsonValues
103110
/*
104111
* Scalar statistics built for an array of values, extracted from a JSON
105112
* document (for one particular path).
106-
*
107-
* XXX The array can contain values of different JSON type, probably?
108113
*/
109114
typedef struct JsonScalarStats
110115
{

0 commit comments

Comments
 (0)