You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "dianbaiyizhong (via GitHub)" <gi...@apache.org> on 2023/06/04 11:59:23 UTC

[GitHub] [dolphinscheduler] dianbaiyizhong opened a new pull request, #14273: 解决h2数据源下,因为字段value属于关键字导致sql报错

dianbaiyizhong opened a new pull request, #14273:
URL: https://github.com/apache/dolphinscheduler/pull/14273

   版本:3.1.7
   
   报错截图:
   
   ![image](https://github.com/apache/dolphinscheduler/assets/11265013/04d9ae3d-d6cb-42cc-8f50-612c9225cf04)
   
   报错异常日志
   ```
   Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL statement "SELECT a.id,\000a               a.field,\000a               a.type,\000a               a.title,\000a               a.[*]value,\000a               a.options,\000a               a.placeholder,\000a               a.option_source_type,\000a               a.value_type,\000a               a.input_type,\000a               a.is_show,\000a               a.can_edit,\000a               a.is_emit,\000a               a.is_validate,\000a               b.values_map,\000a               b.index\000a        FROM t_ds_dq_rule_input_entry a join ( SELECT *\000a        FROM t_ds_relation_rule_input_entry where rule_id = ? )  b\000a        on a.id = b.rule_input_entry_id order by b.index"; expected "identifier"; SQL statement:
   SELECT a.id,
                  a.field,
                  a.type,
                  a.title,
                  a.value,
                  a.options,
                  a.placeholder,
                  a.option_source_type,
                  a.value_type,
                  a.input_type,
                  a.is_show,
                  a.can_edit,
                  a.is_emit,
                  a.is_validate,
                  b.values_map,
                  b.index
           FROM t_ds_dq_rule_input_entry a join ( SELECT *
           FROM t_ds_relation_rule_input_entry where rule_id = ? )  b
           on a.id = b.rule_input_entry_id order by b.index [42001-210]
           at org.h2.message.DbException.getJdbcSQLException(DbException.java:521)
           at org.h2.message.DbException.getJdbcSQLException(DbException.java:496)
           at org.h2.message.DbException.getSyntaxError(DbException.java:265)
           at org.h2.command.Parser.readIdentifier(Parser.java:5759)
           at org.h2.command.Parser.readTermObjectDot(Parser.java:4882)
           at org.h2.command.Parser.readTerm(Parser.java:5201)
           at org.h2.command.Parser.readFactor(Parser.java:3423)
           at org.h2.command.Parser.readSum(Parser.java:3410)
           at org.h2.command.Parser.readConcat(Parser.java:3375)
           at org.h2.command.Parser.readCondition(Parser.java:3160)
           at org.h2.command.Parser.readExpression(Parser.java:3076)
           at org.h2.command.Parser.parseSelectExpressions(Parser.java:2876)
           at org.h2.command.Parser.parseSelect(Parser.java:2893)
           at org.h2.command.Parser.parseQueryPrimary(Parser.java:2783)
           at org.h2.command.Parser.parseQueryTerm(Parser.java:2650)
           at org.h2.command.Parser.parseQueryExpressionBody(Parser.java:2629)
           at org.h2.command.Parser.parseQueryExpressionBodyAndEndOfQuery(Parser.java:2622)
           at org.h2.command.Parser.parseQueryExpression(Parser.java:2615)
           at org.h2.command.Parser.parseQuery(Parser.java:2576)
           at org.h2.command.Parser.parsePrepared(Parser.java:707)
           at org.h2.command.Parser.parse(Parser.java:674)
           at org.h2.command.Parser.parse(Parser.java:644)
           at org.h2.command.Parser.prepareCommand(Parser.java:551)
           at org.h2.engine.SessionLocal.prepareLocal(SessionLocal.java:615)
           at org.h2.engine.SessionLocal.prepareCommand(SessionLocal.java:553)
           at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1116)
           at org.h2.jdbc.JdbcPreparedStatement.<init>(JdbcPreparedStatement.java:92)
           at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:288)
           at com.zaxxer.hikari.pool.ProxyConnection.prepareStatement(ProxyConnection.java:337)
           at com.zaxxer.hikari.pool.HikariProxyConnection.prepareStatement(HikariProxyConnection.java)
           at org.apache.ibatis.executor.statement.PreparedStatementHandler.instantiateStatement(PreparedStatementHandler.java:86)
           at org.apache.ibatis.executor.statement.BaseStatementHandler.prepare(BaseStatementHandler.java:88)
           at org.apache.ibatis.executor.statement.RoutingStatementHandler.prepare(RoutingStatementHandler.java:59)
           at sun.reflect.GeneratedMethodAccessor147.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:497)
           at org.apache.ibatis.plugin.Invocation.proceed(Invocation.java:49)
           at com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor.intercept(MybatisPlusInterceptor.java:106)
           at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:62)
           at com.sun.proxy.$Proxy236.prepare(Unknown Source)
           at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:87)
           at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:62)
           at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:325)
           at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)
           at com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor.intercept(MybatisPlusInterceptor.java:81)
           at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:62)
           at com.sun.proxy.$Proxy235.query(Unknown Source)
           at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:151)
           at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:145)
           at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)
           at sun.reflect.GeneratedMethodAccessor205.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:497)
           at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:427)
           ... 81 common frames omitted
   ```
   
   触发场景:
   在使用默认的h2作为数据源启动下,拖入数据质量的时候会触发
   
   ## Purpose of the pull request
   
   我使用了反括号方式将value关键字括起来
   
   
   
   
   


-- 
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@dolphinscheduler.apache.org

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


[GitHub] [dolphinscheduler] SbloodyS commented on pull request #14273: 解决h2数据源下,因为字段value属于关键字导致sql报错

Posted by "SbloodyS (via GitHub)" <gi...@apache.org>.
SbloodyS commented on PR #14273:
URL: https://github.com/apache/dolphinscheduler/pull/14273#issuecomment-1575542509

   Please remove irrelevant commit and using english in title and description. 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@dolphinscheduler.apache.org

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


[GitHub] [dolphinscheduler] SbloodyS closed pull request #14273: 解决h2数据源下,因为字段value属于关键字导致sql报错

Posted by "SbloodyS (via GitHub)" <gi...@apache.org>.
SbloodyS closed pull request #14273: 解决h2数据源下,因为字段value属于关键字导致sql报错
URL: https://github.com/apache/dolphinscheduler/pull/14273


-- 
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@dolphinscheduler.apache.org

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