You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by GitBox <gi...@apache.org> on 2019/04/29 15:37:14 UTC

[GitHub] [phoenix] BinShi-SecularBird commented on a change in pull request #494: PHOENIX-5262 Wrong Result on Salted table with Varbinary PK

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