phoenix-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [phoenix] BinShi-SecularBird commented on a change in pull request #494: PHOENIX-5262 Wrong Result on Salted table with Varbinary PK
Date Mon, 29 Apr 2019 15:37:14 GMT
BinShi-SecularBird commented on a change in pull request #494: PHOENIX-5262 Wrong Result on
Salted table with Varbinary PK
URL: https://github.com/apache/phoenix/pull/494#discussion_r279418816
 
 

 ##########
 File path: phoenix-core/src/test/java/org/apache/phoenix/util/ScanUtilTest.java
 ##########
 @@ -45,291 +48,305 @@
 /**
  * Test the SetKey method in ScanUtil.
  */
-@RunWith(Parameterized.class)
+@RunWith(Enclosed.class)
 public class ScanUtilTest {
 
-    private final List<List<KeyRange>> slots;
-    private final byte[] expectedKey;
-    private final RowKeySchema schema;
-    private final Bound bound;
-
-    public ScanUtilTest(List<List<KeyRange>> slots, int[] widths, byte[] expectedKey,
Bound bound) throws Exception {
-        RowKeySchemaBuilder builder = new RowKeySchemaBuilder(widths.length);
-        for (final int width : widths) {
-            if (width > 0) {
-                builder.addField(new PDatum() {
-                    @Override
-                    public boolean isNullable() {
-                        return false;
-                    }
-                    @Override
-                    public PDataType getDataType() {
-                        return PChar.INSTANCE;
-                    }
-                    @Override
-                    public Integer getMaxLength() {
-                        return width;
-                    }
-                    @Override
-                    public Integer getScale() {
-                        return null;
-                    }
-                    @Override
-                    public SortOrder getSortOrder() {
-                        return SortOrder.getDefault();
-                    }
-                }, false, SortOrder.getDefault());
-            } else {
-                builder.addField(new PDatum() {
-                    @Override
-                    public boolean isNullable() {
-                        return false;
-                    }
-                    @Override
-                    public PDataType getDataType() {
-                        return PVarchar.INSTANCE;
-                    }
-                    @Override
-                    public Integer getMaxLength() {
-                        return null;
-                    }
-                    @Override
-                    public Integer getScale() {
-                        return null;
-                    }
-                    @Override
-                    public SortOrder getSortOrder() {
-                        return SortOrder.getDefault();
-                    }
-                }, false, SortOrder.getDefault());
+    @RunWith(Parameterized.class)
+    public static class ParameterizedScanUtilTest {
+
+
 
 Review comment:
   remove the blank lines at 56 and 57?

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

Mime
View raw message