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

Commit c3bdecd

Browse files
author
Nikita Glukhov
committed
Fix XXX comment about single-pass collection
1 parent 92dd746 commit c3bdecd

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/backend/utils/adt/jsonb_typanalyze.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,11 +1189,16 @@ compute_json_stats(VacAttrStats *stats, AnalyzeAttrFetchFunc fetchfunc,
11891189
int samplerows, double totalrows)
11901190
{
11911191
JsonAnalyzeContext ctx;
1192+
bool sigle_pass = false; /* FIXME make GUC or simply remove */
11921193

11931194
jsonAnalyzeInit(&ctx, stats, fetchfunc, samplerows, totalrows);
11941195

1195-
/* XXX Not sure what the first branch is doing (or supposed to)? */
1196-
if (false)
1196+
/*
1197+
* Collect and analyze JSON path values in single or multiple passes.
1198+
* Sigle-pass collection is faster but consumes much more memory than
1199+
* collecting and analyzing by the one path at pass.
1200+
*/
1201+
if (sigle_pass)
11971202
{
11981203
/* Collect all values of all paths */
11991204
jsonAnalyzePass(&ctx, jsonAnalyzeCollectPaths, (void *)(intptr_t) true);

0 commit comments

Comments
 (0)