danhuawang opened a new issue, #9516:
URL: https://github.com/apache/gravitino/issues/9516

   ### Version
   
   main branch
   
   ### Describe what's wrong
   
   Register a lance table  which originally created by lance rest api
   Then call gravitino api to load it. The columns are empty.
   
   ```
   URL: 
http://192.168.194.200:8090/api/metalakes/lrs_test/catalogs/lct_catalog_register_api/schemas/lrt_register_ns_req/tables/lrt_registered_req
   
   Status code: 200
   
   Content Type: application/json
   
   Request Headers
   Accept=application/vnd.gravitino.v1+json
   Authorization=Basic YW5vbnltb3VzOnRlc3Q=
   Content-Type=application/json
   Response Headers
   Date: Fri, 19 Dec 2025 06:57:35 GMT
   Content-Type: application/json
   Content-Length: 406
   Server: Jetty(9.4.51.v20230217)
   Response Body
   {
       "code": 0,
       "table": {
           "name": "lrt_registered_req",
           "columns": [
               
           ],
           "properties": {
               "external": "true",
               "lance.register": "true",
               "format": "lance",
               "location": "/tmp/lance-register-api/lrt_source_table/",
               "lance.creation-mode": "CREATE"
           },
           "audit": {
               "creator": "anonymous",
               "createTime": "2025-12-19T06:57:34.826304877Z"
           },
           "distribution": {
               "strategy": "none",
               "number": 0,
               "funcArgs": [
                   
               ]
           },
           "sortOrders": [
               
           ],
           "partitioning": [
               
           ],
           "indexes": [
               
           ]
       }
   }
   ```
   
   ### Error message and/or stacktrace
   
   Loading table through Gravitino API: 
http://192.168.194.200:8090/api/metalakes/lrs_test/catalogs/lct_catalog_register_api/schemas/lrt_register_ns_empty/tables/lrt_registered_empty_props
   ✓ Successfully loaded table metadata from Gravitino API
     When load table lrt_registered_empty_props through gravitino api in 
namespace lrt_register_ns_empty catalog lct_catalog_register_api                
                                                                                
           # 
com.datastrato.test.steps.GenericLakehouseCatalogSteps.loadTableThroughGravitinoAPI(java.lang.String,java.lang.String,java.lang.String)
     Then verify gravitino table columns types id:integer,name:string           
                                                                                
                                                                                
    # 
com.datastrato.test.steps.GenericLakehouseCatalogSteps.verifyGravitinoTableColumnTypes(java.lang.String)
         java.lang.AssertionError: Column not found in Gravitino response: name
        at 
com.datastrato.test.steps.GenericLakehouseCatalogSteps.verifyGravitinoTableColumnTypes(GenericLakehouseCatalogSteps.java:2615)
   
   ### How to reproduce
   
   1. Creat original lance table
   
   ```
   URL: 
http://192.168.194.200:9101/lance/v1/namespace/lct_catalog_register_api%24lrt_source_ns_req/create
   
   Status code: 200
   
   Content Type: application/json
   
   Request Headers
   Accept=application/json, application/javascript, text/javascript, text/json
   Authorization=Basic YW5vbnltb3VzOnRlc3Q=
   Content-Type=application/json
   Content Body
   {
       "mode": "create",
       "id": [
           "lct_catalog_register_api",
           "lrt_source_ns_req"
       ],
       "properties": {
           
       }
   }
   Response Headers
   Date: Fri, 19 Dec 2025 06:57:34 GMT
   Content-Type: application/json
   Content-Length: 17
   Server: Jetty(9.4.51.v20230217)
   Response Body
   {
       "properties": {
           
       }
   }
   ```
   ```
   
http://192.168.194.200:9101/lance/v1/table/lct_catalog_register_api%24lrt_source_ns_req%24lrt_source_table/create?mode=create
   
   Status code: 200
   
   Content Type: null
   
   Request Headers
   Accept=application/json, application/javascript, text/javascript, text/json
   Authorization=Basic YW5vbnltb3VzOnRlc3Q=
   x-lance-table-location=/tmp/lance-register-api/lrt_source_table
   x-lance-table-properties={"owner":"register-required"}
   Content-Type=application/vnd.apache.arrow.stream; charset=UTF-8
   Content Body
   [-1, -1, -1, -1, -56, 0, 0, 0, 16, 0, 0, 0, 0, 0, 10, 0, 14, 0, 6, 0, 13, 0, 
8, 0, 10, 0, 0, 0, 0, 0, 4, 0, 16, 0, 0, 0, 0, 1, 10, 0, 12, 0, 0, 0, 8, 0, 4, 
0, 10, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 76, 0, 0, 0, 4, 
0, 0, 0, -50, -1, -1, -1, 20, 0, 0, 0, 20, 0, 0, 0, 24, 0, 0, 0, 0, 0, 5, 1, 
20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 4, 0, 4, 0, 0, 0, 4,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, 0, 0, 8, 0, 0, 0, 15, 0, 0, 
0, 65, 108, 105, 99, 101, 66, 111, 98, 67, 104, 97, 114, 108, 105, 101, 0, -1, 
-1, -1, -1, 0, 0, 0, 0]
   Response Headers
   Date: Fri, 19 Dec 2025 06:57:34 GMT
   Content-Type: application/json
   Content-Length: 256
   Server: Jetty(9.4.51.v20230217)
   Response Body
   {
       "location": "/tmp/lance-register-api/lrt_source_table/",
       "version": null,
       "properties": {
           "owner": "register-required",
           "external": "true",
           "format": "lance",
           "location": "/tmp/lance-register-api/lrt_source_table/",
           "lance.creation-mode": "CREATE"
       },
       "storage_options": {
           
       }
   }
   ```
   2. Register a new table with the table location above
   
   ```
   URL: 
http://192.168.194.200:9101/lance/v1/namespace/lct_catalog_register_api%24lrt_register_ns_req/create
   
   Status code: 200
   
   Content Type: application/json
   
   Request Headers
   Accept=application/json, application/javascript, text/javascript, text/json
   Authorization=Basic YW5vbnltb3VzOnRlc3Q=
   Content-Type=application/json
   Content Body
   {
       "mode": "create",
       "id": [
           "lct_catalog_register_api",
           "lrt_register_ns_req"
       ],
       "properties": {
           
       }
   }
   Response Headers
   Date: Fri, 19 Dec 2025 06:57:34 GMT
   Content-Type: application/json
   Content-Length: 17
   Server: Jetty(9.4.51.v20230217)
   Response Body
   {
       "properties": {
           
       }
   }
   ```
   ```
   URL: 
http://192.168.194.200:9101/lance/v1/table/lct_catalog_register_api%24lrt_register_ns_req%24lrt_registered_req/register
   
   Status code: 200
   
   Content Type: application/json
   
   Request Headers
   Accept=application/json, application/javascript, text/javascript, text/json
   Authorization=Basic YW5vbnltb3VzOnRlc3Q=
   Content-Type=application/json
   Content Body
   {
       "mode": "CREATE",
       "location": "/tmp/lance-register-api/lrt_source_table",
       "id": [
           "lct_catalog_register_api",
           "lrt_register_ns_req",
           "lrt_registered_req"
       ],
       "properties": {
           
       }
   }
   Response Headers
   Date: Fri, 19 Dec 2025 06:57:34 GMT
   Content-Type: application/json
   Content-Length: 216
   Server: Jetty(9.4.51.v20230217)
   Response Body
   {
       "location": "/tmp/lance-register-api/lrt_source_table/",
       "properties": {
           "external": "true",
           "lance.register": "true",
           "format": "lance",
           "location": "/tmp/lance-register-api/lrt_source_table/",
           "lance.creation-mode": "CREATE"
       }
   }
   ```
   3. Load the original table by gravitino api , the columns are correct
   ```
   URL: 
http://192.168.194.200:8090/api/metalakes/lrs_test/catalogs/lct_catalog_register_api/schemas/lrt_source_ns_req/tables/lrt_source_table
   
   Status code: 200
   
   Content Type: application/json
   
   Request Headers
   Accept=application/vnd.gravitino.v1+json
   Authorization=Basic YW5vbnltb3VzOnRlc3Q=
   Content-Type=application/json
   Response Headers
   Date: Fri, 19 Dec 2025 07:38:49 GMT
   Content-Type: application/json
   Content-Length: 546
   Server: Jetty(9.4.51.v20230217)
   Response Body
   {
       "code": 0,
       "table": {
           "name": "lrt_source_table",
           "columns": [
               {
                   "name": "name",
                   "type": "string",
                   "nullable": true,
                   "autoIncrement": false
               },
               {
                   "name": "id",
                   "type": "integer",
                   "nullable": true,
                   "autoIncrement": false
               }
           ],
           "properties": {
               "owner": "register-required",
               "external": "true",
               "format": "lance",
               "location": "/tmp/lance-register-api/lrt_source_table/",
               "lance.creation-mode": "CREATE"
           },
           "audit": {
               "creator": "anonymous",
               "createTime": "2025-12-19T06:57:34.704109909Z"
           },
           "distribution": {
               "strategy": "none",
               "number": 0,
               "funcArgs": [
                   
               ]
           },
           "sortOrders": [
               
           ],
           "partitioning": [
               
           ],
           "indexes": [
               
           ]
       }
   }
   ```
   4. Load the register table by gravitino api , the columns are empty
   ```
   URL: 
http://192.168.194.200:8090/api/metalakes/lrs_test/catalogs/lct_catalog_register_api/schemas/lrt_register_ns_req/tables/lrt_registered_req
   
   Status code: 200
   
   Content Type: application/json
   
   Request Headers
   Accept=application/vnd.gravitino.v1+json
   Authorization=Basic YW5vbnltb3VzOnRlc3Q=
   Content-Type=application/json
   Response Headers
   Date: Fri, 19 Dec 2025 06:57:35 GMT
   Content-Type: application/json
   Content-Length: 406
   Server: Jetty(9.4.51.v20230217)
   Response Body
   {
       "code": 0,
       "table": {
           "name": "lrt_registered_req",
           "columns": [
               
           ],
           "properties": {
               "external": "true",
               "lance.register": "true",
               "format": "lance",
               "location": "/tmp/lance-register-api/lrt_source_table/",
               "lance.creation-mode": "CREATE"
           },
           "audit": {
               "creator": "anonymous",
               "createTime": "2025-12-19T06:57:34.826304877Z"
           },
           "distribution": {
               "strategy": "none",
               "number": 0,
               "funcArgs": [
                   
               ]
           },
           "sortOrders": [
               
           ],
           "partitioning": [
               
           ],
           "indexes": [
               
           ]
       }
   }
   ```
   
   ### Additional context
   
   _No response_


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