Skip to content

Commit

Permalink
add comment/set everything as I think it supposed to work
Browse files Browse the repository at this point in the history
  • Loading branch information
kgyrtkirk committed Feb 28, 2025
1 parent 6eaaa4d commit 08becb3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ public interface DataSource extends Cacheable
* </p>
* Processing boundaries are identified {@link ExecutionVertex}.
*/
//FIXME: maybe this should renamed to "canBeReadDirectly"
// the need seems to be to have a flag which communicates that it could be read directly.
boolean isProcessable();

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,10 @@ public boolean isCacheable(boolean isBroker)
@Override
public boolean isGlobal()
{
// FIXME: this feels like dodgy to me - but this is how it was before
return query.getDataSource().isGlobal();
// FIXME: this was query.getDataSource().isGlobal()
// but it feeled dodgy to me
// in general: I think isProcessable should be a precondition to isGblobal
return false;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
package org.apache.druid.server;

import com.google.inject.Inject;
import org.apache.druid.error.DruidException;
import org.apache.druid.java.util.common.IAE;
import org.apache.druid.java.util.common.ISE;
import org.apache.druid.java.util.common.guava.FunctionalIterable;
Expand Down Expand Up @@ -98,8 +97,9 @@ public <T> QueryRunner<T> getQueryRunnerForIntervals(final Query<T> query, final
final AtomicLong cpuAccumulator = new AtomicLong(0L);

if (dataSourceFromQuery instanceof QueryDataSource) {
// possible bug? dataSourceFromQuery is QueryDataSource ; query is GBY with canPerformSubquery
throw DruidException.defensive("This might not work correctly");
// is this a possible bug? dataSourceFromQuery is QueryDataSource ; query is GBY with canPerformSubquery
// FIXME: let's not fix this
// throw DruidException.defensive("This might not work correctly");
}

// segmentMapFn will ignore all DS maps ass QDS will return identity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ public boolean isGlobal()
@Override
public boolean isProcessable()
{
// FIXME this seems illogical
return false;
// FIXME return false seemed illogical
return true;
}

@Override
Expand Down

0 comments on commit 08becb3

Please sign in to comment.