I'm trying out co-located joins in the upcoming 1....
# troubleshooting
r
I'm trying out co-located joins in the upcoming 1.3 release but running into an
Failed to find table partition info for table
error. Here's the query:
Copy code
explain implementation plan for
select count(*)
from zeek /*+ tableOptions(partition_function='hashcode', partition_key='src_ip_zeek', partition_size='2') */
join zeek2 /*+ tableOptions(partition_function='hashcode', partition_key='src_ip_zeek', partition_size='2') */
on zeek.src_ip_zeek = zeek2.src_ip_zeek
And the full error:
Copy code
Error Code: 720

QueryPlanningError:
Error explain query plan for: explain implementation plan for
select count(*)
from zeek /*+ tableOptions(partition_function='hashcode', partition_key='src_ip_zeek', partition_size='2') */
join zeek2 /*+ tableOptions(partition_function='hashcode', partition_key='src_ip_zeek', partition_size='2') */
on zeek.src_ip_zeek = zeek2.src_ip_zeek
org.apache.pinot.query.QueryEnvironment.explainQuery(QueryEnvironment.java:262)
org.apache.pinot.broker.requesthandler.MultiStageBrokerRequestHandler.handleRequest(MultiStageBrokerRequestHandler.java:159)
org.apache.pinot.broker.requesthandler.BaseBrokerRequestHandler.handleRequest(BaseBrokerRequestHandler.java:168)
org.apache.pinot.broker.requesthandler.BrokerRequestHandlerDelegate.handleRequest(BrokerRequestHandlerDelegate.java:116)
Failed to find table partition info for table: zeek_REALTIME
org.apache.pinot.shaded.com.google.common.base.Preconditions.checkState(Preconditions.java:602)
org.apache.pinot.query.routing.WorkerManager.getRealtimePartitionTableInfo(WorkerManager.java:572)
org.apache.pinot.query.routing.WorkerManager.calculatePartitionTableInfo(WorkerManager.java:520)
org.apache.pinot.query.routing.WorkerManager.assignWorkersToPartitionedLeafFragment(WorkerManager.java:413)
Now I'm getting the error
Find 3 segments with invalid partition
after changing the tableConfig with:
Copy code
"segmentPartitionConfig": {
      "columnPartitionMap": {
        "src_ip_zeek": {
          "functionName": "Murmur",
          "numPartitions": 2
        }
      }
    }
And
Copy code
"routing": {
    "segmentPrunerTypes": ["partition"]
  },
Here's the
segment.partition.metadata
from one the invalid segments:
Copy code
"{\"columnPartitionMap\":{\"src_ip_zeek\":{\"numPartitions\":2,\"functionName\":\"Murmur\",\"partitions\":[0,1],\"functionConfig\":null}}}",
It appears the issue is that the segment spans multiple partitions
Got it! After re-partitioning my topic on the join key, the explain plan shows the expected
[PARTITIONED]
decorator in the
MAIL_SEND
operator
To get this behavior without the
tableOptions
hint, add
pinot.broker.multistage.infer.partition.hint=true
to
broker.extra.configs
Copy code
"instanceAssignmentConfigMap": {
  "CONSUMING": {
    "tagPoolConfig": {
      "tag": "test_REALTIME"
    },
    "replicaGroupPartitionConfig": {
      "replicaGroupBased": true,
      "numReplicaGroups": 1,
      "numPartitions": 2,
      "numInstancesPerPartition": 1,
      "partitionColumn": "src_ip_zeek"
    }
  }
},