Github user denalex commented on a diff in the pull request:
https://github.com/apache/incubator-hawq/pull/1249#discussion_r119750193
--- Diff:
pxf/pxf-jdbc/src/main/java/org/apache/hawq/pxf/plugins/jdbc/JdbcPartitionFragmenter.java
---
@@ -111,30 +110,40 @@ public JdbcPartitionFragmenter(InputData inConf)
throws UserDataException {
partitionBy =
inConf.getUserProperty("PARTITION_BY").split(":");
partitionColumn = partitionBy[0];
partitionType = PartitionType.getType(partitionBy[1]);
- } catch (IllegalArgumentException e1) {
+ } catch (IllegalArgumentException | ArrayIndexOutOfBoundsException
e1) {
throw new UserDataException("The parameter 'PARTITION_BY'
invalid, the pattern is 'column_name:date|int|enum'");
}
+ //parse and validate parameter-RANGE
try {
- range = inConf.getUserProperty("RANGE").split(":");
+ if (inConf.getUserProperty("RANGE") != null) {
+ range = inConf.getUserProperty("RANGE").split(":");
+ if (range.length == 1 && partitionType !=
PartitionType.ENUM)
+ throw new UserDataException("The parameter 'RANGE'
does not specify '[:end_value]'");
--- End diff --
in the similar fashion, we might support open ended lower range as well --
in cases where min value is not known or changes dynamically.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---