paleolimbot commented on code in PR #749:
URL: https://github.com/apache/sedona-db/pull/749#discussion_r3238804275


##########
rust/sedona-raster/src/array.rs:
##########
@@ -230,11 +233,16 @@ impl<'a> RasterRef for RasterRefImpl<'a> {
 
         // Only the canonical identity view (null view row) is written today.
         // A non-null view row would require the view → byte-stride composition
-        // path that is deferred to a follow-up; reject it here so callers see
-        // a clean "no band" rather than a panic.
-        if !self.band_view_list.is_null(band_row) {
-            return None;
-        }
+        // path, which is not yet implemented. Surface it loudly here rather
+        // than silently returning None, so callers see a clear invariant
+        // violation instead of an out-of-range-looking miss.
+        assert!(
+            self.band_view_list.is_null(band_row),
+            "{}",
+            sedona_common::sedona_internal_datafusion_err!(
+                "non-null view row at band {band_row}: view composition is not 
yet implemented"
+            )
+        );

Review Comment:
   Is this intentional? Maybe:
   
   ```suggestion
           if !self.band_view_list.is_null(band_row) {
               return sedona_internal_err!(
                   "non-null view row at band {band_row}: view composition is 
not yet implemented"
               );
           }
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to