cloud-fan commented on PR #52759:
URL: https://github.com/apache/spark/pull/52759#issuecomment-3474523874

   We can test with the in memory catalog. See an existing test case in 
`org.apache.spark.sql.connector.catalog.CatalogSuite`.
   ```
     test("Catalogs can load the catalog") {
       val catalog = newCatalog()
   
       val conf = new SQLConf
       conf.setConfString("spark.sql.catalog.test", catalog.getClass.getName)
   
       val loaded = Catalogs.load("test", conf)
       assert(loaded.getClass == catalog.getClass)
     }
   ```
   
   We can add a new test case based on this one. In the new test case, we 
configure the catalog with the special change, e.g.
   ```
   spark.conf.set("spark.sql.catalog.test.myKey", "${env:NON_EXISITING}")
   ```
   
   In `BasicInMemoryTableCatalog#initialize`, we keep the passed options, so 
that we can verify it in tests, to make sure it's empty string, not 
`${env:NON_EXISITING}`.


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