[Bug]: Combined Hive table list does not follow the type and name sort order

Cerrado
#4,409 1 comentario 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 2 días

@hutiefang76 ya está trabajando en esto.

Desde el 1/10/2026.

  • #4410 de @hutiefang76 — abierto

Evaluación

Este issue todavía no se ha evaluado.

Descripción

What happened?

TableController.getTableList sorts managed entries by type and name before appending unmanaged Hive entries. In a Hive catalog containing a managed Iceberg table and an unmanaged Hive table, the response puts ICEBERG before HIVE, contrary to the comparator applied to the managed list. The combined response should use the same type/name order.

Affects Versions

Reproduced on master at 9442f8c. Released versions have not been checked.

What table formats are you seeing the problem on?

Mixed-Hive, Iceberg and unmanaged Hive tables

What engines are you seeing the problem on?

AMS

How to reproduce
  1. Use a Hive catalog where ServerCatalog.listTables returns iceberg_a with format ICEBERG.
  2. Have HMS return an unmanaged table named hive_a.
  3. Call TableController.getTableList for the database.
  4. The response order is iceberg_a:ICEBERG, hive_a:HIVE; applying the existing type/name comparator to the combined list gives hive_a:HIVE, iceberg_a:ICEBERG.

The regression test calls the actual controller and captures its response, mocking catalog access and the HMS lookup.

Relevant log output

The combined-list and keyword-filtered order assertions fail on the original implementation.

Anything else

Proposed fix: Move the existing type/name comparator after managed and unmanaged Hive entries have been combined. Cover combined ordering, managed-name deduplication, keyword filtering and non-Hive catalogs.

Code was assisted by DeepSeek v4 Flash via Reasonix 1.39.4; submission text was assisted by Codex. The patch and local test results were reviewed.

Are you willing to submit a PR?
  • Yes I am willing to submit a PR!
Code of Conduct
  • I agree to follow this project's Code of Conduct
Lenguaje dominante
Java
Estrellas
1.2k
Forks
399
Merge medio
4 d 8 h
PR fusionados (30 d)
24

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de apache/amoro

Todos los issues de apache/amoro

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.