Changeset: 9b33406217ce for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/9b33406217ce
Modified Files:
        sql/backends/monet5/generator/generator.c
Branch: Dec2025
Log Message:

in case of nil project a nil also in the generator.projection


diffs (30 lines):

diff --git a/sql/backends/monet5/generator/generator.c 
b/sql/backends/monet5/generator/generator.c
--- a/sql/backends/monet5/generator/generator.c
+++ b/sql/backends/monet5/generator/generator.c
@@ -1199,9 +1199,14 @@ VLTgenerator_thetasubselect(Client cntxt
                }                                                               
                                                                \
                v = (TPE*) Tloc(bn,0);                                          
                                        \
                for(; cnt-- > 0; o++){                                          
                                        \
-                       val = f + ((TPE) (ol == NULL  ? o : ol[o])) * s;        
                \
-                       if ( (s > 0 &&  (val < f || val >= l)) || (s < 0 && 
(val <= l || val > f))) \
-                               continue;                                       
                                                        \
+                       oid oi = ol == NULL ? o : ol[o];                        
                                \
+                       if (is_oid_nil(oi)) {                                   
                                        \
+                               val = TPE##_nil;                                
                                                \
+                       } else {                                                
                                                        \
+                               val = f + ((TPE) (ol == NULL  ? o : ol[o])) * 
s;                \
+                               if ( (s > 0 &&  (val < f || val >= l)) || (s < 
0 && (val <= l || val > f))) \
+                                       continue;                               
                                                        \
+                       }                                                       
                                                                \
                        *v++ = val;                                             
                                                        \
                        c++;                                                    
                                                        \
                }                                                               
                                                                \
@@ -1246,7 +1251,7 @@ VLTgenerator_projection(Client cntxt, Ma
        cnt = BATcount(b);
        if ( b->ttype == TYPE_void) {
                o = b->tseqbase;
-               if (is_oid_nil(o)) {    
+               if (is_oid_nil(o)) {
                        tpe = getArgType(mb,p,1);
                        BAT *bn = BATconstant(b->hseqbase, tpe, 
ATOMnilptr(tpe), cnt, TRANSIENT);
                        BBPunfix(b->batCacheid);
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to