TaoZhiMLND edited a comment on issue #5421:
URL: https://github.com/apache/shardingsphere/issues/5421#issuecomment-624447041


   2、ResultSet of OracleDatabaseMetaData#getIndexInfo contains a record 
describing table's statistics which INDEX_NAME is null . But 
DatabaseMetaData#getIndexInfo in mysql jdbc implementation doesn't return the 
statistics record.
   ```java
   public java.sql.ResultSet getIndexInfo(java.lang.String catalog,
                                          java.lang.String schema,
                                          java.lang.String table,
                                          boolean unique,
                                          boolean approximate)
                                   throws java.sql.SQLException
   ```
   >Get a description of a table's indices and statistics. They are ordered by 
NON_UNIQUE, TYPE, INDEX_NAME, and ORDINAL_POSITION.
   >Each index column description has the following columns:
   >1. TABLE_CAT String => table catalog (may be null)
   >2. TABLE_SCHEM String => table schema (may be null)
   >3. TABLE_NAME String => table name
   >4. NON_UNIQUE boolean => Can index values be non-unique? false when TYPE is 
tableIndexStatistic
   >5. INDEX_QUALIFIER String => index catalog (may be null); null when TYPE is 
tableIndexStatistic
   >6. INDEX_NAME String => index name; null when TYPE is tableIndexStatistic
   >7. TYPE short => index type:
   >   tableIndexStatistic - this identifies table statistics that are returned 
in conjuction with a table's index descriptions
   >   tableIndexClustered - this is a clustered index
   >   tableIndexHashed - this is a hashed index
   >   tableIndexOther - this is some other style of index
   >8. ORDINAL_POSITION short => column sequence number within index; zero when 
TYPE is tableIndexStatistic
   >…
   >11. CARDINALITY long => When TYPE is tableIndexStatistic, then this is the 
number of rows in the table; otherwise, it is the number of unique values in 
the index.
   >12. PAGES long => When TYPE is tableIndexStatisic then this is the number 
of pages used for the table, otherwise it is the number of pages used for the 
current index.
   
   Original document from 
<https://download.oracle.com/otn_hosted_doc/jdeveloper/905/jdbc-javadoc/oracle/jdbc/OracleDatabaseMetaData.html#getIndexInfo(java.lang.String,%20java.lang.String,%20java.lang.String,%20boolean,%20boolean)>
   or
   
<https://docs.oracle.com/javase/8/docs/api/java/sql/DatabaseMetaData.html#getIndexInfo-java.lang.String-java.lang.String-java.lang.String-boolean-boolean->


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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to