PetarVasiljevic-DB commented on PR #48625:
URL: https://github.com/apache/spark/pull/48625#issuecomment-2444416683

   > Does this approach still work when the resultset given by limit 1 is empty?
   This is actually fine as we won't set arrayDimension in metadata. Later on, 
when reading we are doing something like 
   ```
   val dim = if (metadata.contains("arrayDimension")) {
     metadata.getLong("arrayDimension").toInt
   } else {
     1
   }```
   
   so we are always going to fallback to 1. This is also what happened so far, 
if metadata for some reason doesn't contain info about dimensionality we 
fallback to 1. I can write tests though to make sure this works.


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to