Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Example:

Code Block
languagepqljs
PARSER PQL
#ADDQUERY
out = TOPK({
          k = 10,
          scoringfunction = 'price'                        
        },
        ELEMENTWINDOW({
            size = 5                              
          },
          bid
        )                  
      )
      
      
out2 = MAP({
            expressions = [
#LOOP i 0 upto 9
              ['elementAt(topk[${i}],1)','top_${i+1}_auction'],
              ['elementAt(topk[0],2)','top_${i+1}_bidder'],
              ['elementAt(topk[0],4)','top_${i+1}_price'],
#ENDLOOP,
              'topk'
            ], 
                ALLOWNULL = true, 
                SUPPRESSERRORS = true         
          },
          out
        )