Skip to content
Permalink
Browse files
[ASTERIXDB-2988][COMP] Fix compile-time error with indexnl hint
- user model changes: no
- storage format changes: no
- interface changes: no

- Fixed internal compiler error (ASX1030) when indexnl hint
  is specified and the probe branch does not have a primary
  key. For now ingore the hint in this case

Change-Id: Ic31d9fdc870b4d19a375cab0d2c8d7a452600c55
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/14724
Contrib: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Dmitry Lychagin <dmitry.lychagin@couchbase.com>
Reviewed-by: Ali Alsuliman <ali.al.solaiman@gmail.com>
  • Loading branch information
Dmitry Lychagin committed Jan 7, 2022
1 parent 83e5345 commit 9cf8cd75810103e68364b6502a44bfbb799a6849
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
@@ -431,6 +431,7 @@ public void getPrimaryKeyVars(Mutable<ILogicalOperator> dataSourceRefToFetch, Li
}
break;
case EXTERNAL_SCAN:
case COLLECTION_SCAN:
break;
case NO_DATASOURCE:
default:
@@ -0,0 +1,34 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

/*
* No index join because the probe branch does not have a primary key
*/

DROP dataverse test if exists;
CREATE dataverse test;
USE test;

CREATE DATASET ds1(x int, y int) PRIMARY KEY x;

CREATE INDEX idx_y ON ds1(y) TYPE BTREE;

SELECT r1, ds1.x, ds1.y
FROM range(0, 4) r1 LEFT OUTER JOIN ds1 ON r1 /* +indexnl */ = ds1.y
ORDER BY r1;
@@ -0,0 +1,20 @@
-- DISTRIBUTE_RESULT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
-- STREAM_PROJECT |PARTITIONED|
-- ASSIGN |PARTITIONED|
-- SORT_MERGE_EXCHANGE [$$r1(ASC) ] |PARTITIONED|
-- STABLE_SORT [$$r1(ASC)] |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
-- STREAM_PROJECT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
-- HYBRID_HASH_JOIN [$$r1][$$32] |PARTITIONED|
-- HASH_PARTITION_EXCHANGE [$$r1] |PARTITIONED|
-- UNNEST |UNPARTITIONED|
-- EMPTY_TUPLE_SOURCE |UNPARTITIONED|
-- HASH_PARTITION_EXCHANGE [$$32] |PARTITIONED|
-- ASSIGN |PARTITIONED|
-- STREAM_PROJECT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
-- DATASOURCE_SCAN (test.ds1) |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
-- EMPTY_TUPLE_SOURCE |PARTITIONED|

0 comments on commit 9cf8cd7

Please sign in to comment.