Uploaded image for project: 'Apache AsterixDB'
  1. Apache AsterixDB
  2. ASTERIXDB-3521

Datasource functions are replicated even if used with different arguments

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.9.9
    • 0.9.10
    • FUN - Functions

    Description

      Datasource functions are replicated even if used with different argument

      For example the following even if called with different parameters, would end up replicating and returning the same result by randomly picking one of the functions and replicating it.

      SELECT dump_index("Default", "test", "test_someName_idx") as stringIndex
      UNION ALL
      SELECT dump_index("Default", "test", "test_someField_idx") as intIndex; 

      Plan:

      distribute result [$$11] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
      -- DISTRIBUTE_RESULT  |UNPARTITIONED|
        exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
        -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
          union ($$16, $$17, $$11) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
          -- UNION_ALL  |UNPARTITIONED|
            exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
              project ([$$16]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
              -- STREAM_PROJECT  |UNPARTITIONED|
                assign [$$16] <- [cast({"stringIndex": $$13})] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
                -- ASSIGN  |UNPARTITIONED|
                  project ([$$13]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
                  -- STREAM_PROJECT  |UNPARTITIONED|
                    assign [$$13] <- [$$15] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
                    -- ASSIGN  |UNPARTITIONED|
                      exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
                        replicate [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
                        -- REPLICATE  |UNPARTITIONED|
                          exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
                          -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
                            aggregate [$$15] <- [listify($$14)] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
                            -- AGGREGATE  |UNPARTITIONED|
                              exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
                              -- RANDOM_MERGE_EXCHANGE  |PARTITIONED|
                                data-scan []<-[$$14] <- asterix.dump-index. [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
                                -- DATASOURCE_SCAN  |PARTITIONED|
                                  exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
                                  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                    empty-tuple-source [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
                                    -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
            exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
            -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
              project ([$$17]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
              -- STREAM_PROJECT  |UNPARTITIONED|
                assign [$$17] <- [cast({"intIndex": $$15})] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
                -- ASSIGN  |UNPARTITIONED|
                  exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
                  -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
                    replicate [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
                    -- REPLICATE  |UNPARTITIONED|
                      exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
                      -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
                        aggregate [$$15] <- [listify($$14)] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
                        -- AGGREGATE  |UNPARTITIONED|
                          exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
                          -- RANDOM_MERGE_EXCHANGE  |PARTITIONED|
                            data-scan []<-[$$14] <- asterix.dump-index. [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
                            -- DATASOURCE_SCAN  |PARTITIONED|
                              exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
                              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                empty-tuple-source [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
                                -- EMPTY_TUPLE_SOURCE  |PARTITIONED| 

      Attachments

        Activity

          People

            HussainHT Hussain Towaileb
            HussainHT Hussain Towaileb
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: