github.com/matrixorigin/matrixone@v1.2.0/pkg/sql/colexec/receiver_operator_expand.go (about)

     1  // Copyright 2023 Matrix Origin
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //      http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  package colexec
    16  
    17  import (
    18  	"github.com/matrixorigin/matrixone/pkg/container/batch"
    19  )
    20  
    21  func (r *ReceiverOperator) selectFrom1Reg() (int, *batch.Batch, bool) {
    22  	idx := 0
    23  	ok := true
    24  	var bat *batch.Batch
    25  	select {
    26  	case <-r.proc.Ctx.Done():
    27  		return 0, nil, true
    28  	case bat, ok = <-r.chs[0]:
    29  		idx = 1
    30  	}
    31  	return idx, bat, ok
    32  }
    33  
    34  func (r *ReceiverOperator) selectFrom2Reg() (int, *batch.Batch, bool) {
    35  	idx := 0
    36  	ok := true
    37  	var bat *batch.Batch
    38  	select {
    39  	case <-r.proc.Ctx.Done():
    40  		return 0, nil, true
    41  	case bat, ok = <-r.chs[0]:
    42  		idx = 1
    43  	case bat, ok = <-r.chs[1]:
    44  		idx = 2
    45  	}
    46  	return idx, bat, ok
    47  }
    48  
    49  func (r *ReceiverOperator) selectFrom3Reg() (int, *batch.Batch, bool) {
    50  	idx := 0
    51  	ok := true
    52  	var bat *batch.Batch
    53  	select {
    54  	case <-r.proc.Ctx.Done():
    55  		return 0, nil, true
    56  	case bat, ok = <-r.chs[0]:
    57  		idx = 1
    58  	case bat, ok = <-r.chs[1]:
    59  		idx = 2
    60  	case bat, ok = <-r.chs[2]:
    61  		idx = 3
    62  	}
    63  	return idx, bat, ok
    64  }
    65  
    66  func (r *ReceiverOperator) selectFrom4Reg() (int, *batch.Batch, bool) {
    67  	idx := 0
    68  	ok := true
    69  	var bat *batch.Batch
    70  	select {
    71  	case <-r.proc.Ctx.Done():
    72  		return 0, nil, true
    73  	case bat, ok = <-r.chs[0]:
    74  		idx = 1
    75  	case bat, ok = <-r.chs[1]:
    76  		idx = 2
    77  	case bat, ok = <-r.chs[2]:
    78  		idx = 3
    79  	case bat, ok = <-r.chs[3]:
    80  		idx = 4
    81  	}
    82  	return idx, bat, ok
    83  }
    84  
    85  func (r *ReceiverOperator) selectFrom5Reg() (int, *batch.Batch, bool) {
    86  	idx := 0
    87  	ok := true
    88  	var bat *batch.Batch
    89  	select {
    90  	case <-r.proc.Ctx.Done():
    91  		return 0, nil, true
    92  	case bat, ok = <-r.chs[0]:
    93  		idx = 1
    94  	case bat, ok = <-r.chs[1]:
    95  		idx = 2
    96  	case bat, ok = <-r.chs[2]:
    97  		idx = 3
    98  	case bat, ok = <-r.chs[3]:
    99  		idx = 4
   100  	case bat, ok = <-r.chs[4]:
   101  		idx = 5
   102  	}
   103  	return idx, bat, ok
   104  }
   105  
   106  func (r *ReceiverOperator) selectFrom6Reg() (int, *batch.Batch, bool) {
   107  	idx := 0
   108  	ok := true
   109  	var bat *batch.Batch
   110  	select {
   111  	case <-r.proc.Ctx.Done():
   112  		return 0, nil, true
   113  	case bat, ok = <-r.chs[0]:
   114  		idx = 1
   115  	case bat, ok = <-r.chs[1]:
   116  		idx = 2
   117  	case bat, ok = <-r.chs[2]:
   118  		idx = 3
   119  	case bat, ok = <-r.chs[3]:
   120  		idx = 4
   121  	case bat, ok = <-r.chs[4]:
   122  		idx = 5
   123  	case bat, ok = <-r.chs[5]:
   124  		idx = 6
   125  	}
   126  	return idx, bat, ok
   127  }
   128  
   129  func (r *ReceiverOperator) selectFrom7Reg() (int, *batch.Batch, bool) {
   130  	idx := 0
   131  	ok := true
   132  	var bat *batch.Batch
   133  	select {
   134  	case <-r.proc.Ctx.Done():
   135  		return 0, nil, true
   136  	case bat, ok = <-r.chs[0]:
   137  		idx = 1
   138  	case bat, ok = <-r.chs[1]:
   139  		idx = 2
   140  	case bat, ok = <-r.chs[2]:
   141  		idx = 3
   142  	case bat, ok = <-r.chs[3]:
   143  		idx = 4
   144  	case bat, ok = <-r.chs[4]:
   145  		idx = 5
   146  	case bat, ok = <-r.chs[5]:
   147  		idx = 6
   148  	case bat, ok = <-r.chs[6]:
   149  		idx = 7
   150  	}
   151  	return idx, bat, ok
   152  }
   153  
   154  func (r *ReceiverOperator) selectFrom8Reg() (int, *batch.Batch, bool) {
   155  	idx := 0
   156  	ok := true
   157  	var bat *batch.Batch
   158  	select {
   159  	case <-r.proc.Ctx.Done():
   160  		return 0, nil, true
   161  	case bat, ok = <-r.chs[0]:
   162  		idx = 1
   163  	case bat, ok = <-r.chs[1]:
   164  		idx = 2
   165  	case bat, ok = <-r.chs[2]:
   166  		idx = 3
   167  	case bat, ok = <-r.chs[3]:
   168  		idx = 4
   169  	case bat, ok = <-r.chs[4]:
   170  		idx = 5
   171  	case bat, ok = <-r.chs[5]:
   172  		idx = 6
   173  	case bat, ok = <-r.chs[6]:
   174  		idx = 7
   175  	case bat, ok = <-r.chs[7]:
   176  		idx = 8
   177  	}
   178  	return idx, bat, ok
   179  }
   180  
   181  func (r *ReceiverOperator) selectFrom9Reg() (int, *batch.Batch, bool) {
   182  	idx := 0
   183  	ok := true
   184  	var bat *batch.Batch
   185  	select {
   186  	case <-r.proc.Ctx.Done():
   187  		return 0, nil, true
   188  	case bat, ok = <-r.chs[0]:
   189  		idx = 1
   190  	case bat, ok = <-r.chs[1]:
   191  		idx = 2
   192  	case bat, ok = <-r.chs[2]:
   193  		idx = 3
   194  	case bat, ok = <-r.chs[3]:
   195  		idx = 4
   196  	case bat, ok = <-r.chs[4]:
   197  		idx = 5
   198  	case bat, ok = <-r.chs[5]:
   199  		idx = 6
   200  	case bat, ok = <-r.chs[6]:
   201  		idx = 7
   202  	case bat, ok = <-r.chs[7]:
   203  		idx = 8
   204  	case bat, ok = <-r.chs[8]:
   205  		idx = 9
   206  	}
   207  	return idx, bat, ok
   208  }
   209  
   210  func (r *ReceiverOperator) selectFrom10Reg() (int, *batch.Batch, bool) {
   211  	idx := 0
   212  	ok := true
   213  	var bat *batch.Batch
   214  	select {
   215  	case <-r.proc.Ctx.Done():
   216  		return 0, nil, true
   217  	case bat, ok = <-r.chs[0]:
   218  		idx = 1
   219  	case bat, ok = <-r.chs[1]:
   220  		idx = 2
   221  	case bat, ok = <-r.chs[2]:
   222  		idx = 3
   223  	case bat, ok = <-r.chs[3]:
   224  		idx = 4
   225  	case bat, ok = <-r.chs[4]:
   226  		idx = 5
   227  	case bat, ok = <-r.chs[5]:
   228  		idx = 6
   229  	case bat, ok = <-r.chs[6]:
   230  		idx = 7
   231  	case bat, ok = <-r.chs[7]:
   232  		idx = 8
   233  	case bat, ok = <-r.chs[8]:
   234  		idx = 9
   235  	case bat, ok = <-r.chs[9]:
   236  		idx = 10
   237  	}
   238  	return idx, bat, ok
   239  }
   240  
   241  func (r *ReceiverOperator) selectFrom11Reg() (int, *batch.Batch, bool) {
   242  	idx := 0
   243  	ok := true
   244  	var bat *batch.Batch
   245  	select {
   246  	case <-r.proc.Ctx.Done():
   247  		return 0, nil, true
   248  	case bat, ok = <-r.chs[0]:
   249  		idx = 1
   250  	case bat, ok = <-r.chs[1]:
   251  		idx = 2
   252  	case bat, ok = <-r.chs[2]:
   253  		idx = 3
   254  	case bat, ok = <-r.chs[3]:
   255  		idx = 4
   256  	case bat, ok = <-r.chs[4]:
   257  		idx = 5
   258  	case bat, ok = <-r.chs[5]:
   259  		idx = 6
   260  	case bat, ok = <-r.chs[6]:
   261  		idx = 7
   262  	case bat, ok = <-r.chs[7]:
   263  		idx = 8
   264  	case bat, ok = <-r.chs[8]:
   265  		idx = 9
   266  	case bat, ok = <-r.chs[9]:
   267  		idx = 10
   268  	case bat, ok = <-r.chs[10]:
   269  		idx = 11
   270  	}
   271  	return idx, bat, ok
   272  }
   273  
   274  func (r *ReceiverOperator) selectFrom12Reg() (int, *batch.Batch, bool) {
   275  	idx := 0
   276  	ok := true
   277  	var bat *batch.Batch
   278  	select {
   279  	case <-r.proc.Ctx.Done():
   280  		return 0, nil, true
   281  	case bat, ok = <-r.chs[0]:
   282  		idx = 1
   283  	case bat, ok = <-r.chs[1]:
   284  		idx = 2
   285  	case bat, ok = <-r.chs[2]:
   286  		idx = 3
   287  	case bat, ok = <-r.chs[3]:
   288  		idx = 4
   289  	case bat, ok = <-r.chs[4]:
   290  		idx = 5
   291  	case bat, ok = <-r.chs[5]:
   292  		idx = 6
   293  	case bat, ok = <-r.chs[6]:
   294  		idx = 7
   295  	case bat, ok = <-r.chs[7]:
   296  		idx = 8
   297  	case bat, ok = <-r.chs[8]:
   298  		idx = 9
   299  	case bat, ok = <-r.chs[9]:
   300  		idx = 10
   301  	case bat, ok = <-r.chs[10]:
   302  		idx = 11
   303  	case bat, ok = <-r.chs[11]:
   304  		idx = 12
   305  	}
   306  	return idx, bat, ok
   307  }
   308  
   309  func (r *ReceiverOperator) selectFrom13Reg() (int, *batch.Batch, bool) {
   310  	idx := 0
   311  	ok := true
   312  	var bat *batch.Batch
   313  	select {
   314  	case <-r.proc.Ctx.Done():
   315  		return 0, nil, true
   316  	case bat, ok = <-r.chs[0]:
   317  		idx = 1
   318  	case bat, ok = <-r.chs[1]:
   319  		idx = 2
   320  	case bat, ok = <-r.chs[2]:
   321  		idx = 3
   322  	case bat, ok = <-r.chs[3]:
   323  		idx = 4
   324  	case bat, ok = <-r.chs[4]:
   325  		idx = 5
   326  	case bat, ok = <-r.chs[5]:
   327  		idx = 6
   328  	case bat, ok = <-r.chs[6]:
   329  		idx = 7
   330  	case bat, ok = <-r.chs[7]:
   331  		idx = 8
   332  	case bat, ok = <-r.chs[8]:
   333  		idx = 9
   334  	case bat, ok = <-r.chs[9]:
   335  		idx = 10
   336  	case bat, ok = <-r.chs[10]:
   337  		idx = 11
   338  	case bat, ok = <-r.chs[11]:
   339  		idx = 12
   340  	case bat, ok = <-r.chs[12]:
   341  		idx = 13
   342  	}
   343  	return idx, bat, ok
   344  }
   345  
   346  func (r *ReceiverOperator) selectFrom14Reg() (int, *batch.Batch, bool) {
   347  	idx := 0
   348  	ok := true
   349  	var bat *batch.Batch
   350  	select {
   351  	case <-r.proc.Ctx.Done():
   352  		return 0, nil, true
   353  	case bat, ok = <-r.chs[0]:
   354  		idx = 1
   355  	case bat, ok = <-r.chs[1]:
   356  		idx = 2
   357  	case bat, ok = <-r.chs[2]:
   358  		idx = 3
   359  	case bat, ok = <-r.chs[3]:
   360  		idx = 4
   361  	case bat, ok = <-r.chs[4]:
   362  		idx = 5
   363  	case bat, ok = <-r.chs[5]:
   364  		idx = 6
   365  	case bat, ok = <-r.chs[6]:
   366  		idx = 7
   367  	case bat, ok = <-r.chs[7]:
   368  		idx = 8
   369  	case bat, ok = <-r.chs[8]:
   370  		idx = 9
   371  	case bat, ok = <-r.chs[9]:
   372  		idx = 10
   373  	case bat, ok = <-r.chs[10]:
   374  		idx = 11
   375  	case bat, ok = <-r.chs[11]:
   376  		idx = 12
   377  	case bat, ok = <-r.chs[12]:
   378  		idx = 13
   379  	case bat, ok = <-r.chs[13]:
   380  		idx = 14
   381  	}
   382  	return idx, bat, ok
   383  }
   384  
   385  func (r *ReceiverOperator) selectFrom15Reg() (int, *batch.Batch, bool) {
   386  	idx := 0
   387  	ok := true
   388  	var bat *batch.Batch
   389  	select {
   390  	case <-r.proc.Ctx.Done():
   391  		return 0, nil, true
   392  	case bat, ok = <-r.chs[0]:
   393  		idx = 1
   394  	case bat, ok = <-r.chs[1]:
   395  		idx = 2
   396  	case bat, ok = <-r.chs[2]:
   397  		idx = 3
   398  	case bat, ok = <-r.chs[3]:
   399  		idx = 4
   400  	case bat, ok = <-r.chs[4]:
   401  		idx = 5
   402  	case bat, ok = <-r.chs[5]:
   403  		idx = 6
   404  	case bat, ok = <-r.chs[6]:
   405  		idx = 7
   406  	case bat, ok = <-r.chs[7]:
   407  		idx = 8
   408  	case bat, ok = <-r.chs[8]:
   409  		idx = 9
   410  	case bat, ok = <-r.chs[9]:
   411  		idx = 10
   412  	case bat, ok = <-r.chs[10]:
   413  		idx = 11
   414  	case bat, ok = <-r.chs[11]:
   415  		idx = 12
   416  	case bat, ok = <-r.chs[12]:
   417  		idx = 13
   418  	case bat, ok = <-r.chs[13]:
   419  		idx = 14
   420  	case bat, ok = <-r.chs[14]:
   421  		idx = 15
   422  	}
   423  	return idx, bat, ok
   424  }
   425  
   426  func (r *ReceiverOperator) selectFrom16Reg() (int, *batch.Batch, bool) {
   427  	idx := 0
   428  	ok := true
   429  	var bat *batch.Batch
   430  	select {
   431  	case <-r.proc.Ctx.Done():
   432  		return 0, nil, true
   433  	case bat, ok = <-r.chs[0]:
   434  		idx = 1
   435  	case bat, ok = <-r.chs[1]:
   436  		idx = 2
   437  	case bat, ok = <-r.chs[2]:
   438  		idx = 3
   439  	case bat, ok = <-r.chs[3]:
   440  		idx = 4
   441  	case bat, ok = <-r.chs[4]:
   442  		idx = 5
   443  	case bat, ok = <-r.chs[5]:
   444  		idx = 6
   445  	case bat, ok = <-r.chs[6]:
   446  		idx = 7
   447  	case bat, ok = <-r.chs[7]:
   448  		idx = 8
   449  	case bat, ok = <-r.chs[8]:
   450  		idx = 9
   451  	case bat, ok = <-r.chs[9]:
   452  		idx = 10
   453  	case bat, ok = <-r.chs[10]:
   454  		idx = 11
   455  	case bat, ok = <-r.chs[11]:
   456  		idx = 12
   457  	case bat, ok = <-r.chs[12]:
   458  		idx = 13
   459  	case bat, ok = <-r.chs[13]:
   460  		idx = 14
   461  	case bat, ok = <-r.chs[14]:
   462  		idx = 15
   463  	case bat, ok = <-r.chs[15]:
   464  		idx = 16
   465  	}
   466  	return idx, bat, ok
   467  }
   468  
   469  func (r *ReceiverOperator) selectFrom32Reg() (int, *batch.Batch, bool) {
   470  	idx := 0
   471  	ok := true
   472  	var bat *batch.Batch
   473  	select {
   474  	case <-r.proc.Ctx.Done():
   475  		return 0, nil, true
   476  	case bat, ok = <-r.chs[0]:
   477  		idx = 1
   478  	case bat, ok = <-r.chs[1]:
   479  		idx = 2
   480  	case bat, ok = <-r.chs[2]:
   481  		idx = 3
   482  	case bat, ok = <-r.chs[3]:
   483  		idx = 4
   484  	case bat, ok = <-r.chs[4]:
   485  		idx = 5
   486  	case bat, ok = <-r.chs[5]:
   487  		idx = 6
   488  	case bat, ok = <-r.chs[6]:
   489  		idx = 7
   490  	case bat, ok = <-r.chs[7]:
   491  		idx = 8
   492  	case bat, ok = <-r.chs[8]:
   493  		idx = 9
   494  	case bat, ok = <-r.chs[9]:
   495  		idx = 10
   496  	case bat, ok = <-r.chs[10]:
   497  		idx = 11
   498  	case bat, ok = <-r.chs[11]:
   499  		idx = 12
   500  	case bat, ok = <-r.chs[12]:
   501  		idx = 13
   502  	case bat, ok = <-r.chs[13]:
   503  		idx = 14
   504  	case bat, ok = <-r.chs[14]:
   505  		idx = 15
   506  	case bat, ok = <-r.chs[15]:
   507  		idx = 16
   508  	case bat, ok = <-r.chs[16]:
   509  		idx = 17
   510  	case bat, ok = <-r.chs[17]:
   511  		idx = 18
   512  	case bat, ok = <-r.chs[18]:
   513  		idx = 19
   514  	case bat, ok = <-r.chs[19]:
   515  		idx = 20
   516  	case bat, ok = <-r.chs[20]:
   517  		idx = 21
   518  	case bat, ok = <-r.chs[21]:
   519  		idx = 22
   520  	case bat, ok = <-r.chs[22]:
   521  		idx = 23
   522  	case bat, ok = <-r.chs[23]:
   523  		idx = 24
   524  	case bat, ok = <-r.chs[24]:
   525  		idx = 25
   526  	case bat, ok = <-r.chs[25]:
   527  		idx = 26
   528  	case bat, ok = <-r.chs[26]:
   529  		idx = 27
   530  	case bat, ok = <-r.chs[27]:
   531  		idx = 28
   532  	case bat, ok = <-r.chs[28]:
   533  		idx = 29
   534  	case bat, ok = <-r.chs[29]:
   535  		idx = 30
   536  	case bat, ok = <-r.chs[30]:
   537  		idx = 31
   538  	case bat, ok = <-r.chs[31]:
   539  		idx = 32
   540  	}
   541  	return idx, bat, ok
   542  }
   543  
   544  func (r *ReceiverOperator) selectFrom48Reg() (int, *batch.Batch, bool) {
   545  	idx := 0
   546  	ok := true
   547  	var bat *batch.Batch
   548  	select {
   549  	case <-r.proc.Ctx.Done():
   550  		return 0, nil, true
   551  	case bat, ok = <-r.chs[0]:
   552  		idx = 1
   553  	case bat, ok = <-r.chs[1]:
   554  		idx = 2
   555  	case bat, ok = <-r.chs[2]:
   556  		idx = 3
   557  	case bat, ok = <-r.chs[3]:
   558  		idx = 4
   559  	case bat, ok = <-r.chs[4]:
   560  		idx = 5
   561  	case bat, ok = <-r.chs[5]:
   562  		idx = 6
   563  	case bat, ok = <-r.chs[6]:
   564  		idx = 7
   565  	case bat, ok = <-r.chs[7]:
   566  		idx = 8
   567  	case bat, ok = <-r.chs[8]:
   568  		idx = 9
   569  	case bat, ok = <-r.chs[9]:
   570  		idx = 10
   571  	case bat, ok = <-r.chs[10]:
   572  		idx = 11
   573  	case bat, ok = <-r.chs[11]:
   574  		idx = 12
   575  	case bat, ok = <-r.chs[12]:
   576  		idx = 13
   577  	case bat, ok = <-r.chs[13]:
   578  		idx = 14
   579  	case bat, ok = <-r.chs[14]:
   580  		idx = 15
   581  	case bat, ok = <-r.chs[15]:
   582  		idx = 16
   583  	case bat, ok = <-r.chs[16]:
   584  		idx = 17
   585  	case bat, ok = <-r.chs[17]:
   586  		idx = 18
   587  	case bat, ok = <-r.chs[18]:
   588  		idx = 19
   589  	case bat, ok = <-r.chs[19]:
   590  		idx = 20
   591  	case bat, ok = <-r.chs[20]:
   592  		idx = 21
   593  	case bat, ok = <-r.chs[21]:
   594  		idx = 22
   595  	case bat, ok = <-r.chs[22]:
   596  		idx = 23
   597  	case bat, ok = <-r.chs[23]:
   598  		idx = 24
   599  	case bat, ok = <-r.chs[24]:
   600  		idx = 25
   601  	case bat, ok = <-r.chs[25]:
   602  		idx = 26
   603  	case bat, ok = <-r.chs[26]:
   604  		idx = 27
   605  	case bat, ok = <-r.chs[27]:
   606  		idx = 28
   607  	case bat, ok = <-r.chs[28]:
   608  		idx = 29
   609  	case bat, ok = <-r.chs[29]:
   610  		idx = 30
   611  	case bat, ok = <-r.chs[30]:
   612  		idx = 31
   613  	case bat, ok = <-r.chs[31]:
   614  		idx = 32
   615  	case bat, ok = <-r.chs[32]:
   616  		idx = 33
   617  	case bat, ok = <-r.chs[33]:
   618  		idx = 34
   619  	case bat, ok = <-r.chs[34]:
   620  		idx = 35
   621  	case bat, ok = <-r.chs[35]:
   622  		idx = 36
   623  	case bat, ok = <-r.chs[36]:
   624  		idx = 37
   625  	case bat, ok = <-r.chs[37]:
   626  		idx = 38
   627  	case bat, ok = <-r.chs[38]:
   628  		idx = 39
   629  	case bat, ok = <-r.chs[39]:
   630  		idx = 40
   631  	case bat, ok = <-r.chs[40]:
   632  		idx = 41
   633  	case bat, ok = <-r.chs[41]:
   634  		idx = 42
   635  	case bat, ok = <-r.chs[42]:
   636  		idx = 43
   637  	case bat, ok = <-r.chs[43]:
   638  		idx = 44
   639  	case bat, ok = <-r.chs[44]:
   640  		idx = 45
   641  	case bat, ok = <-r.chs[45]:
   642  		idx = 46
   643  	case bat, ok = <-r.chs[46]:
   644  		idx = 47
   645  	case bat, ok = <-r.chs[47]:
   646  		idx = 48
   647  	}
   648  	return idx, bat, ok
   649  }
   650  
   651  func (r *ReceiverOperator) selectFrom64Reg() (int, *batch.Batch, bool) {
   652  	idx := 0
   653  	ok := true
   654  	var bat *batch.Batch
   655  	select {
   656  	case <-r.proc.Ctx.Done():
   657  		return 0, nil, true
   658  	case bat, ok = <-r.chs[0]:
   659  		idx = 1
   660  	case bat, ok = <-r.chs[1]:
   661  		idx = 2
   662  	case bat, ok = <-r.chs[2]:
   663  		idx = 3
   664  	case bat, ok = <-r.chs[3]:
   665  		idx = 4
   666  	case bat, ok = <-r.chs[4]:
   667  		idx = 5
   668  	case bat, ok = <-r.chs[5]:
   669  		idx = 6
   670  	case bat, ok = <-r.chs[6]:
   671  		idx = 7
   672  	case bat, ok = <-r.chs[7]:
   673  		idx = 8
   674  	case bat, ok = <-r.chs[8]:
   675  		idx = 9
   676  	case bat, ok = <-r.chs[9]:
   677  		idx = 10
   678  	case bat, ok = <-r.chs[10]:
   679  		idx = 11
   680  	case bat, ok = <-r.chs[11]:
   681  		idx = 12
   682  	case bat, ok = <-r.chs[12]:
   683  		idx = 13
   684  	case bat, ok = <-r.chs[13]:
   685  		idx = 14
   686  	case bat, ok = <-r.chs[14]:
   687  		idx = 15
   688  	case bat, ok = <-r.chs[15]:
   689  		idx = 16
   690  	case bat, ok = <-r.chs[16]:
   691  		idx = 17
   692  	case bat, ok = <-r.chs[17]:
   693  		idx = 18
   694  	case bat, ok = <-r.chs[18]:
   695  		idx = 19
   696  	case bat, ok = <-r.chs[19]:
   697  		idx = 20
   698  	case bat, ok = <-r.chs[20]:
   699  		idx = 21
   700  	case bat, ok = <-r.chs[21]:
   701  		idx = 22
   702  	case bat, ok = <-r.chs[22]:
   703  		idx = 23
   704  	case bat, ok = <-r.chs[23]:
   705  		idx = 24
   706  	case bat, ok = <-r.chs[24]:
   707  		idx = 25
   708  	case bat, ok = <-r.chs[25]:
   709  		idx = 26
   710  	case bat, ok = <-r.chs[26]:
   711  		idx = 27
   712  	case bat, ok = <-r.chs[27]:
   713  		idx = 28
   714  	case bat, ok = <-r.chs[28]:
   715  		idx = 29
   716  	case bat, ok = <-r.chs[29]:
   717  		idx = 30
   718  	case bat, ok = <-r.chs[30]:
   719  		idx = 31
   720  	case bat, ok = <-r.chs[31]:
   721  		idx = 32
   722  	case bat, ok = <-r.chs[32]:
   723  		idx = 33
   724  	case bat, ok = <-r.chs[33]:
   725  		idx = 34
   726  	case bat, ok = <-r.chs[34]:
   727  		idx = 35
   728  	case bat, ok = <-r.chs[35]:
   729  		idx = 36
   730  	case bat, ok = <-r.chs[36]:
   731  		idx = 37
   732  	case bat, ok = <-r.chs[37]:
   733  		idx = 38
   734  	case bat, ok = <-r.chs[38]:
   735  		idx = 39
   736  	case bat, ok = <-r.chs[39]:
   737  		idx = 40
   738  	case bat, ok = <-r.chs[40]:
   739  		idx = 41
   740  	case bat, ok = <-r.chs[41]:
   741  		idx = 42
   742  	case bat, ok = <-r.chs[42]:
   743  		idx = 43
   744  	case bat, ok = <-r.chs[43]:
   745  		idx = 44
   746  	case bat, ok = <-r.chs[44]:
   747  		idx = 45
   748  	case bat, ok = <-r.chs[45]:
   749  		idx = 46
   750  	case bat, ok = <-r.chs[46]:
   751  		idx = 47
   752  	case bat, ok = <-r.chs[47]:
   753  		idx = 48
   754  	case bat, ok = <-r.chs[48]:
   755  		idx = 49
   756  	case bat, ok = <-r.chs[49]:
   757  		idx = 50
   758  	case bat, ok = <-r.chs[50]:
   759  		idx = 51
   760  	case bat, ok = <-r.chs[51]:
   761  		idx = 52
   762  	case bat, ok = <-r.chs[52]:
   763  		idx = 53
   764  	case bat, ok = <-r.chs[53]:
   765  		idx = 54
   766  	case bat, ok = <-r.chs[54]:
   767  		idx = 55
   768  	case bat, ok = <-r.chs[55]:
   769  		idx = 56
   770  	case bat, ok = <-r.chs[56]:
   771  		idx = 57
   772  	case bat, ok = <-r.chs[57]:
   773  		idx = 58
   774  	case bat, ok = <-r.chs[58]:
   775  		idx = 59
   776  	case bat, ok = <-r.chs[59]:
   777  		idx = 60
   778  	case bat, ok = <-r.chs[60]:
   779  		idx = 61
   780  	case bat, ok = <-r.chs[61]:
   781  		idx = 62
   782  	case bat, ok = <-r.chs[62]:
   783  		idx = 63
   784  	case bat, ok = <-r.chs[63]:
   785  		idx = 64
   786  	}
   787  	return idx, bat, ok
   788  }
   789  
   790  func (r *ReceiverOperator) selectFrom80Reg() (int, *batch.Batch, bool) {
   791  	idx := 0
   792  	ok := true
   793  	var bat *batch.Batch
   794  	select {
   795  	case <-r.proc.Ctx.Done():
   796  		return 0, nil, true
   797  	case bat, ok = <-r.chs[0]:
   798  		idx = 1
   799  	case bat, ok = <-r.chs[1]:
   800  		idx = 2
   801  	case bat, ok = <-r.chs[2]:
   802  		idx = 3
   803  	case bat, ok = <-r.chs[3]:
   804  		idx = 4
   805  	case bat, ok = <-r.chs[4]:
   806  		idx = 5
   807  	case bat, ok = <-r.chs[5]:
   808  		idx = 6
   809  	case bat, ok = <-r.chs[6]:
   810  		idx = 7
   811  	case bat, ok = <-r.chs[7]:
   812  		idx = 8
   813  	case bat, ok = <-r.chs[8]:
   814  		idx = 9
   815  	case bat, ok = <-r.chs[9]:
   816  		idx = 10
   817  	case bat, ok = <-r.chs[10]:
   818  		idx = 11
   819  	case bat, ok = <-r.chs[11]:
   820  		idx = 12
   821  	case bat, ok = <-r.chs[12]:
   822  		idx = 13
   823  	case bat, ok = <-r.chs[13]:
   824  		idx = 14
   825  	case bat, ok = <-r.chs[14]:
   826  		idx = 15
   827  	case bat, ok = <-r.chs[15]:
   828  		idx = 16
   829  	case bat, ok = <-r.chs[16]:
   830  		idx = 17
   831  	case bat, ok = <-r.chs[17]:
   832  		idx = 18
   833  	case bat, ok = <-r.chs[18]:
   834  		idx = 19
   835  	case bat, ok = <-r.chs[19]:
   836  		idx = 20
   837  	case bat, ok = <-r.chs[20]:
   838  		idx = 21
   839  	case bat, ok = <-r.chs[21]:
   840  		idx = 22
   841  	case bat, ok = <-r.chs[22]:
   842  		idx = 23
   843  	case bat, ok = <-r.chs[23]:
   844  		idx = 24
   845  	case bat, ok = <-r.chs[24]:
   846  		idx = 25
   847  	case bat, ok = <-r.chs[25]:
   848  		idx = 26
   849  	case bat, ok = <-r.chs[26]:
   850  		idx = 27
   851  	case bat, ok = <-r.chs[27]:
   852  		idx = 28
   853  	case bat, ok = <-r.chs[28]:
   854  		idx = 29
   855  	case bat, ok = <-r.chs[29]:
   856  		idx = 30
   857  	case bat, ok = <-r.chs[30]:
   858  		idx = 31
   859  	case bat, ok = <-r.chs[31]:
   860  		idx = 32
   861  	case bat, ok = <-r.chs[32]:
   862  		idx = 33
   863  	case bat, ok = <-r.chs[33]:
   864  		idx = 34
   865  	case bat, ok = <-r.chs[34]:
   866  		idx = 35
   867  	case bat, ok = <-r.chs[35]:
   868  		idx = 36
   869  	case bat, ok = <-r.chs[36]:
   870  		idx = 37
   871  	case bat, ok = <-r.chs[37]:
   872  		idx = 38
   873  	case bat, ok = <-r.chs[38]:
   874  		idx = 39
   875  	case bat, ok = <-r.chs[39]:
   876  		idx = 40
   877  	case bat, ok = <-r.chs[40]:
   878  		idx = 41
   879  	case bat, ok = <-r.chs[41]:
   880  		idx = 42
   881  	case bat, ok = <-r.chs[42]:
   882  		idx = 43
   883  	case bat, ok = <-r.chs[43]:
   884  		idx = 44
   885  	case bat, ok = <-r.chs[44]:
   886  		idx = 45
   887  	case bat, ok = <-r.chs[45]:
   888  		idx = 46
   889  	case bat, ok = <-r.chs[46]:
   890  		idx = 47
   891  	case bat, ok = <-r.chs[47]:
   892  		idx = 48
   893  	case bat, ok = <-r.chs[48]:
   894  		idx = 49
   895  	case bat, ok = <-r.chs[49]:
   896  		idx = 50
   897  	case bat, ok = <-r.chs[50]:
   898  		idx = 51
   899  	case bat, ok = <-r.chs[51]:
   900  		idx = 52
   901  	case bat, ok = <-r.chs[52]:
   902  		idx = 53
   903  	case bat, ok = <-r.chs[53]:
   904  		idx = 54
   905  	case bat, ok = <-r.chs[54]:
   906  		idx = 55
   907  	case bat, ok = <-r.chs[55]:
   908  		idx = 56
   909  	case bat, ok = <-r.chs[56]:
   910  		idx = 57
   911  	case bat, ok = <-r.chs[57]:
   912  		idx = 58
   913  	case bat, ok = <-r.chs[58]:
   914  		idx = 59
   915  	case bat, ok = <-r.chs[59]:
   916  		idx = 60
   917  	case bat, ok = <-r.chs[60]:
   918  		idx = 61
   919  	case bat, ok = <-r.chs[61]:
   920  		idx = 62
   921  	case bat, ok = <-r.chs[62]:
   922  		idx = 63
   923  	case bat, ok = <-r.chs[63]:
   924  		idx = 64
   925  	case bat, ok = <-r.chs[64]:
   926  		idx = 65
   927  	case bat, ok = <-r.chs[65]:
   928  		idx = 66
   929  	case bat, ok = <-r.chs[66]:
   930  		idx = 67
   931  	case bat, ok = <-r.chs[67]:
   932  		idx = 68
   933  	case bat, ok = <-r.chs[68]:
   934  		idx = 69
   935  	case bat, ok = <-r.chs[69]:
   936  		idx = 70
   937  	case bat, ok = <-r.chs[70]:
   938  		idx = 71
   939  	case bat, ok = <-r.chs[71]:
   940  		idx = 72
   941  	case bat, ok = <-r.chs[72]:
   942  		idx = 73
   943  	case bat, ok = <-r.chs[73]:
   944  		idx = 74
   945  	case bat, ok = <-r.chs[74]:
   946  		idx = 75
   947  	case bat, ok = <-r.chs[75]:
   948  		idx = 76
   949  	case bat, ok = <-r.chs[76]:
   950  		idx = 77
   951  	case bat, ok = <-r.chs[77]:
   952  		idx = 78
   953  	case bat, ok = <-r.chs[78]:
   954  		idx = 79
   955  	case bat, ok = <-r.chs[79]:
   956  		idx = 80
   957  	}
   958  	return idx, bat, ok
   959  }