java.lang.ClassCastException: com.alibaba.druid.sql.ast.expr.SQLPropertyExpr cannot be cast to com.alibaba.druid.sql.dialect.mysql.ast.expr.MySqlSelectGroupByExpr

GitHub | dahai2016 | 6 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    1.5 group by 带别名时报错(SQL Server)

    GitHub | 6 months ago | dahai2016
    java.lang.ClassCastException: com.alibaba.druid.sql.ast.expr.SQLPropertyExpr cannot be cast to com.alibaba.druid.sql.dialect.mysql.ast.expr.MySqlSelectGroupByExpr

    Root Cause Analysis

    1. java.lang.ClassCastException

      com.alibaba.druid.sql.ast.expr.SQLPropertyExpr cannot be cast to com.alibaba.druid.sql.dialect.mysql.ast.expr.MySqlSelectGroupByExpr

      at org.opencloudb.parser.druid.impl.DruidSelectParser.buildGroupByCols()
    2. org.opencloudb.parser
      DefaultDruidParser.parser
      1. org.opencloudb.parser.druid.impl.DruidSelectParser.buildGroupByCols(DruidSelectParser.java:559)
      2. org.opencloudb.parser.druid.impl.DruidSelectParser.parseAggGroupCommon(DruidSelectParser.java:178)
      3. org.opencloudb.parser.druid.impl.DruidSelectSqlServerParser.parseOrderAggGroupSqlServer(DruidSelectSqlServerParser.java:81)
      4. org.opencloudb.parser.druid.impl.DruidSelectSqlServerParser.sqlserverParse(DruidSelectSqlServerParser.java:72)
      5. org.opencloudb.parser.druid.impl.DruidSelectSqlServerParser.statementParse(DruidSelectSqlServerParser.java:39)
      6. org.opencloudb.parser.druid.impl.DefaultDruidParser.parser(DefaultDruidParser.java:63)
      6 frames
    3. org.opencloudb.route
      RouteService.route
      1. org.opencloudb.route.impl.DruidMycatRouteStrategy.routeNormalSqlWithAST(DruidMycatRouteStrategy.java:64)
      2. org.opencloudb.route.impl.AbstractRouteStrategy.route(AbstractRouteStrategy.java:76)
      3. org.opencloudb.route.RouteService.route(RouteService.java:133)
      3 frames
    4. org.opencloudb.server
      ServerQueryHandler.query
      1. org.opencloudb.server.ServerConnection.routeEndExecuteSQL(ServerConnection.java:227)
      2. org.opencloudb.server.ServerConnection.execute(ServerConnection.java:175)
      3. org.opencloudb.server.handler.SelectHandler.handle(SelectHandler.java:106)
      4. org.opencloudb.server.ServerQueryHandler.query(ServerQueryHandler.java:77)
      4 frames
    5. org.opencloudb.net
      NIOReactor$RW.run
      1. org.opencloudb.net.FrontendConnection.query(FrontendConnection.java:308)
      2. org.opencloudb.net.handler.FrontendCommandHandler.handle(FrontendCommandHandler.java:71)
      3. org.opencloudb.net.FrontendConnection.rawHandle(FrontendConnection.java:435)
      4. org.opencloudb.net.FrontendConnection.handle(FrontendConnection.java:417)
      5. org.opencloudb.net.AbstractConnection.onReadData(AbstractConnection.java:313)
      6. org.opencloudb.net.NIOSocketWR.asynRead(NIOSocketWR.java:186)
      7. org.opencloudb.net.AbstractConnection.asynRead(AbstractConnection.java:274)
      8. org.opencloudb.net.NIOReactor$RW.run(NIOReactor.java:100)
      8 frames