timothy-e opened a new issue, #19188:
URL: https://github.com/apache/pinot/issues/19188
To reproduce, add the following test to
`pinot-query-runtime/src/test/resources/queries/LookupJoin.json`:
```json
"lookup_join_literal_key": {
"comment": "Tests a lookup join where one dimension primary-key
component is supplied as a literal in the join condition.",
"tables": {
"fact_tbl": {
"schema": [
{"name": "rate_start_date", "type": "LONG"}
],
"inputs": [
[1]
]
},
"dim_tbl": {
"schema": [
{"name": "currency", "type": "STRING"},
{"name": "rate_start_date", "type": "LONG"},
{"name": "rate", "type": "INT"}
],
"inputs": [
["gbp", 1, 125],
["usd", 1, 100]
],
"replicated": true,
"isDimTable": true,
"primaryKeyColumns": ["currency", "rate_start_date"]
}
},
"queries": [
{
"description": "Lookup join with a literal dimension primary-key
component",
"sql": "SELECT /*+ joinOptions(join_strategy='lookup') */
{dim_tbl}.currency, {dim_tbl}.rate FROM {fact_tbl} JOIN {dim_tbl} ON
{dim_tbl}.currency = 'gbp' AND {dim_tbl}.rate_start_date =
{fact_tbl}.rate_start_date",
"outputs": [
["gbp", 125]
]
}
]
}
```
Then run it:
```
./mvnw -pl pinot-query-runtime -am \
-Dtest='ResourceBasedQueriesTest#testQueryTestCasesWithOutput' \
-Dpinot.fileFilter=LookupJoin \
-Dsurefire.failIfNoSpecifiedTests=false \
test
```
It fails with
```
Mismatched number of results.
Expected Rows:
[gbp, 125]
Actual Rows:
expected [1] but found [0]
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]