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

Commit 46a2589

Browse files
author
Nikita Glukhov
committed
Add comments for JsonPathAnlStats structure
1 parent 5729738 commit 46a2589

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/backend/utils/adt/jsonb_typanalyze.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -147,15 +147,15 @@ typedef struct JsonValueStats
147147
int nnumerics; /* number of JSON numerics */
148148
} JsonValueStats;
149149

150-
/* ??? */
150+
/* Main structure for analyzed JSON path */
151151
typedef struct JsonPathAnlStats
152152
{
153-
JsonPathEntry path;
154-
JsonValueStats vstats;
155-
Jsonb *stats;
156-
char *pathstr;
157-
double freq;
158-
int depth;
153+
JsonPathEntry path; /* path entry chain, used for hashing */
154+
JsonValueStats vstats; /* collected values and raw computed stats */
155+
Jsonb *stats; /* stats converted into jsonb form */
156+
char *pathstr; /* full path string */
157+
double freq; /* frequence of the path */
158+
int depth; /* nesting level, i.e. path length */
159159
} JsonPathAnlStats;
160160

161161
/* various bits needed while analyzing JSON */

0 commit comments

Comments
 (0)