You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "alexch2000 (via GitHub)" <gi...@apache.org> on 2024/02/06 15:20:15 UTC

[I] Aggregation Function with '=' Operator Fails for Multivalued Columns in Apache Pinot [pinot]

alexch2000 opened a new issue, #12374:
URL: https://github.com/apache/pinot/issues/12374

   `=` sign doesn't work as an operator inside aggregation functions for multivalued columns.  For instance, following query fails with error 
   
   ```
   select 
   SUM(case when DayOfWeek = 3 AND DivTailNums = 'N7713A' then 1 else 0 end) as res
   from airlineStats
   Group BY Carrier
   ```
   
   Error: 
   ```
   Error Code: 200
   
   QueryExecutionError:
   java.lang.UnsupportedOperationException
   	at org.apache.pinot.segment.spi.index.reader.ForwardIndexReader.readDictIds(ForwardIndexReader.java:118)
   	at org.apache.pinot.core.common.DataFetcher$ColumnValueReader.readStringValues(DataFetcher.java:570)
   	at org.apache.pinot.core.common.DataFetcher.fetchStringValues(DataFetcher.java:239)
   	at org.apache.pinot.core.common.DataBlockCache.getStringValuesForSVColumn(DataBlockCache.java:277)
   ```
   
   Same query works with `=` in where statement
   
   ```
   select 
   SUM(case when DayOfWeek = 3 then 1 else 0 end) as res
   from airlineStats
   WHERE DivTailNums = 'N7713A'
   Group BY Carrier
   ```
   Result: 
   
   `{"columns":["res"],"records":[[2]]}`
   
   Version info 
   
   ```
   {
     "pinot-protobuf": "1.1.0-SNAPSHOT-f22de0a4be910af09556666df3aa44ae78d59187",
     "pinot-kafka-2.0": "1.1.0-SNAPSHOT-f22de0a4be910af09556666df3aa44ae78d59187",
     "pinot-avro": "1.1.0-SNAPSHOT-f22de0a4be910af09556666df3aa44ae78d59187",
     "pinot-distribution": "1.1.0-SNAPSHOT-f22de0a4be910af09556666df3aa44ae78d59187",
     "pinot-csv": "1.1.0-SNAPSHOT-f22de0a4be910af09556666df3aa44ae78d59187",
     "pinot-s3": "1.1.0-SNAPSHOT-f22de0a4be910af09556666df3aa44ae78d59187",
     "pinot-yammer": "1.1.0-SNAPSHOT-f22de0a4be910af09556666df3aa44ae78d59187",
     "pinot-segment-uploader-default": "1.1.0-SNAPSHOT-f22de0a4be910af09556666df3aa44ae78d59187",
     "pinot-confluent-avro": "1.1.0-SNAPSHOT-f22de0a4be910af09556666df3aa44ae78d59187",
     "pinot-thrift": "1.1.0-SNAPSHOT-f22de0a4be910af09556666df3aa44ae78d59187",
     "pinot-batch-ingestion-standalone": "1.1.0-SNAPSHOT-f22de0a4be910af09556666df3aa44ae78d59187",
     "pinot-orc": "1.1.0-SNAPSHOT-f22de0a4be910af09556666df3aa44ae78d59187",
     "pinot-pulsar": "1.1.0-SNAPSHOT-f22de0a4be910af09556666df3aa44ae78d59187",
     "pinot-clp-log": "1.1.0-SNAPSHOT-f22de0a4be910af09556666df3aa44ae78d59187",
     "pinot-dropwizard": "1.1.0-SNAPSHOT-f22de0a4be910af09556666df3aa44ae78d59187",
     "pinot-azure": "1.1.0-SNAPSHOT-f22de0a4be910af09556666df3aa44ae78d59187",
     "pinot-gcs": "1.1.0-SNAPSHOT-f22de0a4be910af09556666df3aa44ae78d59187",
     "pinot-hdfs": "1.1.0-SNAPSHOT-f22de0a4be910af09556666df3aa44ae78d59187",
     "pinot-kinesis": "1.1.0-SNAPSHOT-f22de0a4be910af09556666df3aa44ae78d59187",
     "pinot-adls": "1.1.0-SNAPSHOT-f22de0a4be910af09556666df3aa44ae78d59187",
     "pinot-json": "1.1.0-SNAPSHOT-f22de0a4be910af09556666df3aa44ae78d59187",
     "pinot-minion-builtin-tasks": "1.1.0-SNAPSHOT-f22de0a4be910af09556666df3aa44ae78d59187",
     "pinot-parquet": "1.1.0-SNAPSHOT-f22de0a4be910af09556666df3aa44ae78d59187",
     "pinot-segment-writer-file-based": "1.1.0-SNAPSHOT-f22de0a4be910af09556666df3aa44ae78d59187"
   }
   ```
   
   


-- 
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: commits-unsubscribe@pinot.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [I] Aggregation Function with '=' Operator Fails for Multivalued Columns in Apache Pinot [pinot]

Posted by "abhioncbr (via GitHub)" <gi...@apache.org>.
abhioncbr commented on issue #12374:
URL: https://github.com/apache/pinot/issues/12374#issuecomment-1944441513

   Please assign it to me. Thanks


-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [I] Aggregation Function with '=' Operator Fails for Multivalued Columns in Apache Pinot [pinot]

Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang commented on issue #12374:
URL: https://github.com/apache/pinot/issues/12374#issuecomment-1943213096

   This `=` is translated into `equals()` transform function, which doesn't support MV column in left hand side as of now. We can add the support into `EqualsTransformFunction`. Same for other `BinaryOperatorTransformFunction`s


-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org