You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2019/12/17 18:17:42 UTC

[GitHub] [ignite] nizhikov commented on a change in pull request #6991: IGNITE-12301 Free-lists system view

nizhikov commented on a change in pull request #6991: IGNITE-12301 Free-lists system view
URL: https://github.com/apache/ignite/pull/6991#discussion_r358950945
 
 

 ##########
 File path: modules/indexing/src/main/java/org/apache/ignite/spi/systemview/SystemViewLocal.java
 ##########
 @@ -56,19 +62,45 @@
     /** System view for export. */
     private final SystemView<R> sysView;
 
+    /** View attribute names. */
+    private final String[] attributeNames;
+
     /**
      * @param ctx Kernal context.
      * @param sysView View to export.
      */
     public SystemViewLocal(GridKernalContext ctx, SystemView<R> sysView) {
-        super(sqlName(sysView.name()), sysView.description(), ctx, columnsList(sysView));
+        super(sqlName(sysView.name()), sysView.description(), ctx, indexes(sysView), columns(sysView));
 
         this.sysView = sysView;
+
+        attributeNames = new String[sysView.walker().count()];
+
+        sysView.walker().visitAll(new AttributeVisitor() {
+            @Override public <T> void accept(int idx, String name, Class<T> clazz, boolean filtering) {
+                attributeNames[idx] = name;
+            }
+        });
     }
 
     /** {@inheritDoc} */
     @Override public Iterator<Row> getRows(Session ses, SearchRow first, SearchRow last) {
-        Iterator<R> rows = sysView.iterator();
+        Iterator<R> rows;
+
+        if (sysView instanceof FiltrableSystemView) {
 
 Review comment:
   We should store the result of this check inside some boolean variable.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services