0

BigQuery 返回代码 500:“意外。请重试。”

示例查询:

SELECT IF((bD >= "2013-03-18" AND bD < "2013-03-25"), "2013w12", IF((bD >= "2012-03-19" AND bD < "2012-03-26"), "2012w12", IF((bD >= "2011-03-21" AND bD < "2011-03-28"), "2011w12", ""))) AS pD_pW_T, IF((bD >= "2013-03-18" AND bD < "2013-03-25"), IF(bD > vD, null, (-(2013 - vY))), IF((bD >= "2012-03-19" AND bD < "2012-03-26"), IF(bD > vD, null, (-(2012 - vY))), IF((bD >= "2011-03-21" AND bD < "2011-03-28"), IF(bD > vD, null, (-(2011 - vY))), null))) AS aRD_y, IF((bD >= "2013-03-18" AND bD < "2013-03-25"), IF(bD > vD, null, (-(2013 - vY))), IF((bD >= "2012-03-19" AND bD < "2012-03-26"), IF(bD > vD, null, (-(2012 - vY))), IF((bD >= "2011-03-21" AND bD < "2011-03-28"), IF(bD > vD, null, (-(2011 - vY))), null))) AS aRD_y_name, STRING(SUM(ac)) AS acK_ac_0 FROM tabl.dataset_2009, tabl.dataset_2007, tabl.dataset_2008, tabl.dataset_2013, tabl.dataset_2012, tabl.dataset_2011, tabl.dataset_2010 WHERE (((bD >= "2013-03-18" AND bD < "2013-03-25") OR (bD >= "2012-03-19" AND bD < "2012-03-26") OR (bD >= "2011-03-21" AND bD < "2011-03-28"))) AND (((bD < "2013-03-27"))) AND (ac <> 0) GROUP BY pD_pW_T, aRD_y, aRD_y_name

生产中的代码已经运行了数周。

减少执行查询的表数量似乎有效。

4

1 回答 1

1

看起来您的一个表上存在模式不匹配:aRD_y 在一个表中具有整数类型,而在另一个表中具有布尔类型。如果您尝试将这些表合并在一起,您将收到错误消息。

我将在内部提交一个错误以改进此错误消息。感谢您的报告!

于 2013-07-26T18:31:41.573 回答