Skip to content

Commit

Permalink
Addressing comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ankit0811 authored and Ankit Kothari committed Aug 2, 2023
1 parent 32bca40 commit e35a906
Show file tree
Hide file tree
Showing 16 changed files with 14 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public DoubleFirstAggregator(BaseLongColumnValueSelector timeSelector, ColumnVal
}

@Override
void setFirstValue(ColumnValueSelector valueSelector)
void setFirstValue()
{
firstValue = valueSelector.getDouble();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@ public byte[] getCacheKey()
@Override
public ColumnType getIntermediateType()
{
// if we don't pretend to be a primitive, group by v1 gets sad and doesn't work because no complex type serde
return TYPE;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public FloatFirstAggregator(
}

@Override
void setFirstValue(ColumnValueSelector valueSelector)
void setFirstValue()
{
firstValue = valueSelector.getFloat();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ public byte[] getCacheKey()
@Override
public ColumnType getIntermediateType()
{
// if we don't pretend to be a primitive, group by v1 gets sad and doesn't work because no complex type serde
return TYPE;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public LongFirstAggregator(BaseLongColumnValueSelector timeSelector, ColumnValue
}

@Override
void setFirstValue(ColumnValueSelector valueSelector)
void setFirstValue()
{
firstValue = valueSelector.getLong();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ public byte[] getCacheKey()
@Override
public ColumnType getIntermediateType()
{
// if we don't pretend to be a primitive, group by v1 gets sad and doesn't work because no complex type serde
return TYPE;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public NumericFirstAggregator(BaseLongColumnValueSelector timeSelector, ColumnVa
/**
* Store the current primitive typed 'first' value
*/
abstract void setFirstValue(ColumnValueSelector valueSelector);
abstract void setFirstValue();

/**
* Store a non-null first value
Expand All @@ -71,7 +71,7 @@ public void aggregate()
if (object instanceof SerializablePair) {
SerializablePair<Long, Number> inPair = (SerializablePair<Long, Number>) object;

if (inPair != null && inPair.lhs < firstTime) {
if (inPair.lhs < firstTime) {
firstTime = inPair.lhs;
if (inPair.rhs == null) {
rhsNull = true;
Expand All @@ -88,7 +88,7 @@ public void aggregate()
if (time < firstTime) {
firstTime = time;
if (useDefault || !valueSelector.isNull()) {
setFirstValue(valueSelector);
setFirstValue();
rhsNull = false;
} else {
setFirstValue(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public void aggregate(ByteBuffer buf, int position)
final Object object = valueSelector.getObject();
if (object instanceof SerializablePair) {
final SerializablePair<Long, Number> inPair = (SerializablePair<Long, Number>) object;
if (inPair != null && inPair.lhs < firstTime) {
if (inPair.lhs < firstTime) {
if (inPair.rhs == null) {
updateTimeWithNull(buf, position, inPair.lhs);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public DoubleLastAggregator(BaseLongColumnValueSelector timeSelector, ColumnValu
}

@Override
void setLastValue(ColumnValueSelector valueSelector)
void setLastValue()
{
lastValue = valueSelector.getDouble();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@ public byte[] getCacheKey()
@Override
public ColumnType getIntermediateType()
{
// if we don't pretend to be a primitive, group by v1 gets sad and doesn't work because no complex type serde
return TYPE;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public FloatLastAggregator(BaseLongColumnValueSelector timeSelector, ColumnValue
}

@Override
void setLastValue(ColumnValueSelector valueSelector)
void setLastValue()
{
lastValue = valueSelector.getFloat();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ public byte[] getCacheKey()
@Override
public ColumnType getIntermediateType()
{
// if we don't pretend to be a primitive, group by v1 gets sad and doesn't work because no complex type serde
return TYPE;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public LongLastAggregator(BaseLongColumnValueSelector timeSelector, ColumnValueS
}

@Override
void setLastValue(ColumnValueSelector valueSelector)
void setLastValue()
{
lastValue = valueSelector.getLong();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,6 @@ public byte[] getCacheKey()
@Override
public ColumnType getIntermediateType()
{
// if we don't pretend to be a primitive, group by v1 gets sad and doesn't work because no complex type serde
return TYPE;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public NumericLastAggregator(BaseLongColumnValueSelector timeSelector, ColumnVal
/**
* Store the current primitive typed 'last' value
*/
abstract void setLastValue(ColumnValueSelector valueSelector);
abstract void setLastValue();

abstract void setLastValue(Number lastValue);

Expand All @@ -70,7 +70,7 @@ public void aggregate()
if (object instanceof SerializablePair) {
final SerializablePair<Long, Number> inPair = (SerializablePair<Long, Number>) object;

if (inPair != null && inPair.lhs >= lastTime) {
if (inPair.lhs >= lastTime) {
lastTime = inPair.lhs;

if (inPair.rhs == null) {
Expand All @@ -88,7 +88,7 @@ public void aggregate()
if (time >= lastTime) {
lastTime = time;
if (useDefault || !valueSelector.isNull()) {
setLastValue(valueSelector);
setLastValue();
rhsNull = false;
} else {
setLastValue(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public void aggregate(ByteBuffer buf, int position)
if (object instanceof SerializablePair) {
final SerializablePair<Long, Number> inPair = (SerializablePair<Long, Number>) object;

if (inPair != null && inPair.lhs >= lastTime) {
if (inPair.lhs >= lastTime) {
if (inPair.rhs == null) {
updateTimeWithNull(buf, position, inPair.lhs);
} else {
Expand Down

0 comments on commit e35a906

Please sign in to comment.