Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
Signed-off-by: Bharathwaj G <[email protected]>
  • Loading branch information
bharath-techie committed Feb 8, 2024
1 parent 722e6cb commit 81ed9fb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,12 @@
/** Base class for star tree builder */
public abstract class BaseSingleTreeBuilder {
public static final int STAR_IN_DOC_VALUES_INDEX = -1;
public final static long SECOND = 1000;
public final static long MINUTE = 60 * SECOND;
public final static long HOUR = 60 * 60 * SECOND;
public final static long DAY = 24 * HOUR;
public final static long YEAR = 365 * DAY;
public final static int SECOND = 1;// HTTP codec
public final static int MINUTE = 60 * SECOND;
public final static int HOUR = 60 * 60 * SECOND;
public final static int DAY = 24 * HOUR;
public final static int MONTH = 30 * DAY;
public final static int YEAR = 365 * DAY;
private static final Logger logger = LogManager.getLogger(BaseSingleTreeBuilder.class);
final int _numDimensions;
final String[] _dimensionsSplitOrder;
Expand Down Expand Up @@ -97,8 +98,8 @@ public abstract class BaseSingleTreeBuilder {
dimensionsSplitOrder = new ArrayList<>();
dimensionsSplitOrder.add("minute");
dimensionsSplitOrder.add("hour");
dimensionsSplitOrder.add("day");
dimensionsSplitOrder.add("month");
//dimensionsSplitOrder.add("day");
//dimensionsSplitOrder.add("month");
// dimensionsSplitOrder.add("year");
dimensionsSplitOrder.add("status");
_numDimensions = dimensionsSplitOrder.size();
Expand Down Expand Up @@ -567,15 +568,15 @@ Record getNextSegmentRecord() throws IOException {
private long getTimeStampVal(final String fieldName, final long val) {
switch (fieldName) {
case "minute":
return val / MINUTE * MINUTE;
return val / MINUTE;// * MINUTE;
case "hour":
return val / HOUR * HOUR;
return val / HOUR;// * HOUR;
case "day":
return val / DAY * DAY;
return val / DAY;// * DAY;
case "month":
return DateUtils.roundMonthOfYear(val); // TODO
return val / MONTH;// * MONTH; // TODO
case "year":
return DateUtils.roundYear(val);
return val / YEAR;// * YEAR;
default:
return val;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ private String getKey(Map<String, NumericDocValues> fieldColsMap, int doc) throw
for (Map.Entry<String, NumericDocValues> fieldEntry : fieldColsMap.entrySet()) {
fieldEntry.getValue().advanceExact(doc);
long val = fieldEntry.getValue().longValue();
System.out.println("Key field : " + fieldEntry.getKey() + " Value : " + val);
sj.add("" + val);
}
return sj.toString();
Expand Down

0 comments on commit 81ed9fb

Please sign in to comment.