You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2019/07/24 03:16:23 UTC
[GitHub] [incubator-shardingsphere] wanglichao1 opened a new issue #2753:
key generator column set error column
wanglichao1 opened a new issue #2753: key generator column set error column
URL: https://github.com/apache/incubator-shardingsphere/issues/2753
I set "key-generator.column=id",but the generator value set on "type" column,I use version 4.0.0-RC1.
My config:
`spring.shardingsphere.sharding.tables.user_integral_details.actual-data-nodes=ds.user_integral_details_$->{0..63}
spring.shardingsphere.sharding.tables.user_integral_details.table-strategy.inline.sharding-column=user_id
spring.shardingsphere.sharding.tables.user_integral_details.table-strategy.inline.algorithm-expression=user_integral_details_$->{user_id % 64}
spring.shardingsphere.sharding.tables.user_integral_details.key-generator.column=id
spring.shardingsphere.sharding.tables.user_integral_details.key-generator.type=SNOWFLAKE
spring.shardingsphere.sharding.tables.user_integral_details.key-generator.props.worker.id=${SNOWFLAKE_WORKER_ID}
spring.shardingsphere.sharding.tables.user_integral_details.key-generator.props.max.tolerate.time.difference.milliseconds=100`
Debug info:
`2019-07-24 11:01:22.674 INFO 19292 --- [nio-6001-exec-3] ShardingSphere-SQL : Logic SQL: insert into user_integral_details (create_date, modify_date, order_list, clazz_id, extend_id, integral, organization_id, project_id, reason, type, user_id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
2019-07-24 11:01:22.675 INFO 19292 --- [nio-6001-exec-3] ShardingSphere-SQL : SQLStatement: InsertStatement(super=DMLStatement(super=AbstractSQLStatement(type=DML, tables=Tables(tables=[Table(name=user_integral_details, alias=Optional.absent())]), routeConditions=Conditions(orCondition=OrCondition(andConditions=[AndCondition(conditions=[Condition(column=Column(name=user_id, tableName=user_integral_details), operator=EQUAL, compareOperator=null, positionValueMap={}, positionIndexMap={0=10})])])), encryptConditions=Conditions(orCondition=OrCondition(andConditions=[])), sqlTokens=[TableToken(tableName=user_integral_details, quoteCharacter=NONE, schemaNameLength=0), SQLToken(startIndex=34)], parametersIndex=11, logicSQL=insert into user_integral_details (create_date, modify_date, order_list, clazz_id, extend_id, integral, organization_id, project_id, reason, type, user_id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)), deleteStatement=false, updateTableAlias={}, updateColumnValues={}, whereStartIndex=0, whereStopIndex=0, whereParameterStartIndex=0, whereParameterEndIndex=0), columnNames=[create_date, modify_date, order_list, clazz_id, extend_id, integral, organization_id, project_id, reason, type, user_id], values=[InsertValue(columnValues=[org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@73fa8879, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@29af73c1, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@56e8bb5, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@43086be, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@232e7f01, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@714d21de, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@8f2f61, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@a5cb8, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@500cedcf, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@48d775c1, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@315abf9d])])
2019-07-24 11:01:22.675 INFO 19292 --- [nio-6001-exec-3] ShardingSphere-SQL : Actual SQL: ds ::: insert into user_integral_details_56 (create_date, modify_date, order_list, clazz_id, extend_id, integral, organization_id, project_id, reason, type, user_id, id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ::: [2019-07-24T11:01:22.627+0800, null, 1563937282627, 1331, null, 1.0, 184, 635, 协助管理, 360742367440936961, 22136, null]
`
----------------------------------------------------------------
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
With regards,
Apache Git Services