You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/06/25 23:01:41 UTC

[GitHub] [incubator-superset] fx19880617 opened a new issue #10168: Wrong query sent for selecting time field in FilterBox

fx19880617 opened a new issue #10168:
URL: https://github.com/apache/incubator-superset/issues/10168


   When select a time column in filter box, the query send out is wrong, it contains an extra count(*) in ORDER BY clause without using it.
   
   ### Expected results
   
   Expected query is:
   ```
   SELECT COUNT(*), mergedTimeMillis FROM "pullRequestMergedEvents" WHERE mergedTimeMillis >= 1592438400000 AND mergedTimeMillis < 1593043200000 GROUP BY mergedTimeMillis ORDER BY COUNT(*) DESC LIMIT 1000
   ```
   
   or
   
   
   ```
   SELECT mergedTimeMillis FROM "pullRequestMergedEvents" WHERE mergedTimeMillis >= 1592438400000 AND mergedTimeMillis < 1593043200000 GROUP BY mergedTimeMillis LIMIT 1000
   ```
   
   or
   
   ```
   SELECT distinct mergedTimeMillis FROM "pullRequestMergedEvents" WHERE mergedTimeMillis >= 1592438400000 AND mergedTimeMillis < 1593043200000 LIMIT 1000
   ```
   
   ### Actual results
   
   The actual query sent is: 
   `SELECT mergedTimeMillis FROM "pullRequestMergedEvents" WHERE mergedTimeMillis >= 1592438400000 AND mergedTimeMillis < 1593043200000 GROUP BY mergedTimeMillis ORDER BY COUNT(*) DESC LIMIT 1000`
   
   #### Screenshots
   
   ![image](https://user-images.githubusercontent.com/1202120/85803634-79d16000-b6fc-11ea-9eb5-1dc835d482d7.png)
   
   ### Environment
   
   (please complete the following information):
   
   - superset version: `0.36.0`
   - python version: `3.6.9`
   
   ### Checklist
   
   Make sure these boxes are checked before submitting your issue - thank you!
   
   - [x] I have checked the superset logs for python stacktraces and included it here as text if there are any.
   - [x] I have reproduced the issue with at least the latest released version of superset.
   - [x] I have checked the issue tracker for the same issue and I haven't found one similar.
   
   ### Additional context
   
   Add any other context about the problem here.
   
   ```
   {
   	cache_key: null,
   	cached_dttm: null,
   	cache_timeout: 86400,
   	error: "pinot error: {'errorCode': 200, 'message': 'QueryExecutionError:\n' 'java.lang.IllegalStateException\n' '\tat ' 'shaded.com.google.common.base.Preconditions.checkState(Preconditions.java:429)\n' '\tat ' 'org.apache.pinot.core.query.request.context.ExpressionContext.toTransformExpressionTree(ExpressionContext.java:102)\n' '\tat ' 'org.apache.pinot.core.plan.SelectionPlanNode.collectExpressions(SelectionPlanNode.java:89)\n' '\tat ' 'org.apache.pinot.core.plan.SelectionPlanNode.<init>(SelectionPlanNode.java:50)\n' '\tat ' 'org.apache.pinot.core.plan.maker.InstancePlanMakerImplV2.makeSegmentPlanNode(InstancePlanMakerImplV2.java:136)\n' '\tat ' 'org.apache.pinot.core.plan.maker.InstancePlanMakerImplV2.makeInstancePlan(InstancePlanMakerImplV2.java:101)\n' '\tat ' 'org.apache.pinot.core.query.executor.ServerQueryExecutorV1Impl.processQuery(ServerQueryExecutorV1Impl.java:213)\n' '\tat ' 'org.apache.pinot.core.query.scheduler.QueryScheduler.processQueryAndSerialize(QueryScheduler.java:152)\n' '\tat ' 'org.apache.pinot.core.query.scheduler.QueryScheduler.lambda$createQueryFutureTask$0(QueryScheduler.java:136)\n' '\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\n' '\tat ' 'java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)\n' '\tat ' 'shaded.com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:111)\n' '\tat ' 'shaded.com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:58)\n' '\tat ' 'shaded.com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:75)'}",
   	form_data: {
   		datasource: "2__table",
   		viz_type: "filter_box",
   		url_params: {},
   		time_range_endpoints: [
   			"inclusive",
   			"exclusive"
   		],
   		granularity_sqla: "mergedTimeMillis",
   		time_range: "Last week",
   		filter_configs: [{
   			key: "iZn_0neWH",
   			column: "mergedTimeMillis",
   			asc: true,
   			clearable: true,
   			multiple: true
   		}],
   		date_filter: true,
   		instant_filtering: true,
   		show_sqla_time_granularity: false,
   		show_sqla_time_column: false,
   		show_druid_time_granularity: false,
   		show_druid_time_origin: false,
   		adhoc_filters: [],
   		where: "",
   		having: "",
   		having_filters: [],
   		filters: []
   	},
   	is_cached: false,
   	query: "SELECT mergedTimeMillis FROM "
   	pullRequestMergedEvents " WHERE mergedTimeMillis >= 1592438400000 AND mergedTimeMillis < 1593043200000 GROUP BY mergedTimeMillis ORDER BY COUNT(*) DESC LIMIT 1000",
   	status: "failed",
   	stacktrace: null,
   	rowcount: 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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] stale[bot] closed issue #10168: Wrong query sent for selecting time field in FilterBox

Posted by GitBox <gi...@apache.org>.
stale[bot] closed issue #10168:
URL: https://github.com/apache/incubator-superset/issues/10168


   


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] stale[bot] commented on issue #10168: Wrong query sent for selecting time field in FilterBox

Posted by GitBox <gi...@apache.org>.
stale[bot] commented on issue #10168:
URL: https://github.com/apache/incubator-superset/issues/10168#issuecomment-683258404


   This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue `.pinned` to prevent stale bot from closing the issue.
   


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] issue-label-bot[bot] commented on issue #10168: Wrong query sent for selecting time field in FilterBox

Posted by GitBox <gi...@apache.org>.
issue-label-bot[bot] commented on issue #10168:
URL: https://github.com/apache/incubator-superset/issues/10168#issuecomment-649859385


   Issue-Label Bot is automatically applying the label `#bug` to this issue, with a confidence of 0.96. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback! 
   
    Links: [app homepage](https://github.com/marketplace/issue-label-bot), [dashboard](https://mlbot.net/data/apache/incubator-superset) and [code](https://github.com/hamelsmu/MLapp) for this bot.


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org