korlov42 commented on a change in pull request #6456: IGNITE-11470: Views don't 
show in Dbeaver
URL: https://github.com/apache/ignite/pull/6456#discussion_r316660801
 
 

 ##########
 File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetadataInfo.java
 ##########
 @@ -48,8 +49,40 @@
     /** Root context. Used to get all the database metadata. */
     private final GridKernalContext ctx;
 
-    /** The only one possible value of table type. */
-    public static final String TABLE_TYPE = "TABLE";
+    /** Comparator for {@link ColumnInformation} by schema then table name 
then column order. */
+    private static final Comparator<ColumnInformation> 
bySchemaThenTabNameThenColOrder = new Comparator<ColumnInformation>() {
+        @Override public int compare(ColumnInformation o1, ColumnInformation 
o2) {
+            int schemaCmp = o1.schemaName().compareTo(o2.schemaName());
+
+            if (schemaCmp != 0)
+                return schemaCmp;
+
+            int tblNameCmp = o1.tableName().compareTo(o2.tableName());
+
+            if (tblNameCmp != 0)
+                return tblNameCmp;
+
+            return Integer.compare(o1.columnId(), o2.columnId());
+        }
+    };
+
+    /** Comparator for {@link JdbcTableMeta} by table type then schema then 
table name. */
+    private static final Comparator<TableInformation> 
byTblTypeThenSchemaThenTabname =
 
 Review comment:
   _TblName_ should be used instead of _Tabname_

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to