Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot filtering on bytes data type #4040

Closed
xiangfu0 opened this issue Mar 30, 2019 · 2 comments
Closed

Cannot filtering on bytes data type #4040

xiangfu0 opened this issue Mar 30, 2019 · 2 comments

Comments

@xiangfu0
Copy link
Contributor

Table schema:

{
  "metricFieldSpecs": [
  ],
  "dimensionFieldSpecs": [
    {
      "dataType": "BYTES",
      "name": "uuid"
    },
    ...
  ],
  "timeFieldSpec": {
    "incomingGranularitySpec": {
      "dataType": "LONG",
      "timeType": "MILLISECONDS",
      "name": "start_time_millis"
    }
  },
  "schemaName": "myTable"
}

Sample query:

select * from myTable where uuid = "c8b3bce0b378fc5ce8067fc271a34892" limit 10

Exceptions got:

{
    "exceptions": [
    {
        "message": "QueryExecutionError:\njava.lang.ClassCastException: java.lang.String cannot be cast to [B\n\tat org.apache.pinot.core.realtime.impl.dictionary.BytesOnHeapMutableDictionary.indexOf(BytesOnHeapMutableDictionary.java:36)\n\tat org.apache.pinot.core.operator.filter.predicate.EqualsPredicateEvaluatorFactory$DictionaryBasedEqPredicateEvaluator.<init>(EqualsPredicateEvaluatorFactory.java:76)\n\tat org.apache.pinot.core.operator.filter.predicate.EqualsPredicateEvaluatorFactory.newDictionaryBasedEvaluator(EqualsPredicateEvaluatorFactory.java:43)\n\tat org.apache.pinot.core.operator.filter.predicate.PredicateEvaluatorProvider.getPredicateEvaluator(PredicateEvaluatorProvider.java:44)\n\tat org.apache.pinot.core.plan.FilterPlanNode.constructPhysicalOperator(FilterPlanNode.java:105)\n\tat org.apache.pinot.core.plan.FilterPlanNode.run(FilterPlanNode.java:55)\n\tat org.apache.pinot.core.plan.DocIdSetPlanNode.run(DocIdSetPlanNode.java:52)\n\tat org.apache.pinot.core.plan.ProjectionPlanNode.run(ProjectionPlanNode.java:56)\n\tat org.apache.pinot.core.plan.SelectionPlanNode.run(SelectionPlanNode.java:69)\n\tat org.apache.pinot.core.plan.CombinePlanNode.run(CombinePlanNode.java:77)\n\tat org.apache.pinot.core.plan.InstanceResponsePlanNode.run(InstanceResponsePlanNode.java:38)\n\tat org.apache.pinot.core.plan.GlobalPlanImplV0.execute(GlobalPlanImplV0.java:45)\n\tat org.apache.pinot.core.query.executor.ServerQueryExecutorV1Impl.processQuery(ServerQueryExecutorV1Impl.java:164)\n\tat org.apache.pinot.core.query.scheduler.QueryScheduler.processQueryAndSerialize(QueryScheduler.java:131)",
        "errorCode": 200
    }],
    "numServersQueried": 1,
    "numServersResponded": 1,
    "numSegmentsQueried": 1,
    "numSegmentsProcessed": 0,
    "numSegmentsMatched": 0,
    "numDocsScanned": 0,
    "numEntriesScannedInFilter": 0,
    "numEntriesScannedPostFilter": 0,
    "numGroupsLimitReached": false,
    "totalDocs": 0,
    "timeUsedMs": 335,
    "segmentStatistics": [],
    "traceInfo": {}
}
@xiangfu0
Copy link
Contributor Author

The assertion assert rawValue instanceof byte[]; at line 35, file: org.apache.pinot.core.realtime.impl.dictionary.BytesOnHeapMutableDictionary will pass for String object.

@snleee
Copy link
Contributor

snleee commented Apr 5, 2019

Closing the issue since the fix has been merged.

@snleee snleee closed this as completed Apr 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants