/ Check-in [f7c239e9]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add VdbeModuleComment()s on the three main code generators for window functions.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: f7c239e959004cb90dc8537ab2e1fca5f26ef21f4f6f3dfd743a05a55e705090
User & Date: drh 2018-07-10 22:24:14
Context
2018-07-10
23:31
Remove incorrect ALWAYS() macros from the window function logic. check-in: 94ac51cc user: drh tags: trunk
22:24
Add VdbeModuleComment()s on the three main code generators for window functions. check-in: f7c239e9 user: drh tags: trunk
20:50
Minor comment changes. Add ALWAYS() macros on some unreachable branches in the xStep() methods of built-in window functions. check-in: f2057542 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/window.c.

  2215   2215     ** windowCodeDefaultStep() is the only one of the three functions that
  2216   2216     ** does not cache each partition in a temp table before beginning to
  2217   2217     ** return rows.
  2218   2218     */
  2219   2219     if( pMWin->eType==TK_ROWS 
  2220   2220      && (pMWin->eStart!=TK_UNBOUNDED||pMWin->eEnd!=TK_CURRENT||!pMWin->pOrderBy)
  2221   2221     ){
         2222  +    VdbeModuleComment((pParse->pVdbe, "Begin RowExprStep()"));
  2222   2223       windowCodeRowExprStep(pParse, p, pWInfo, regGosub, addrGosub);
  2223   2224     }else{
  2224   2225       Window *pWin;
  2225   2226       int bCache = 0;               /* True to use CacheStep() */
  2226   2227   
  2227   2228       if( pMWin->eStart==TK_CURRENT && pMWin->eEnd==TK_UNBOUNDED ){
  2228   2229         bCache = 1;
................................................................................
  2239   2240             break;
  2240   2241           }
  2241   2242         }
  2242   2243       }
  2243   2244   
  2244   2245       /* Otherwise, call windowCodeDefaultStep().  */
  2245   2246       if( bCache ){
         2247  +      VdbeModuleComment((pParse->pVdbe, "Begin CacheStep()"));
  2246   2248         windowCodeCacheStep(pParse, p, pWInfo, regGosub, addrGosub);
  2247   2249       }else{
         2250  +      VdbeModuleComment((pParse->pVdbe, "Begin DefaultStep()"));
  2248   2251         windowCodeDefaultStep(pParse, p, pWInfo, regGosub, addrGosub);
  2249   2252       }
  2250   2253     }
  2251   2254   }
  2252   2255   
  2253   2256   #endif /* SQLITE_OMIT_WINDOWFUNC */