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 2022/07/09 13:39:53 UTC

[GitHub] [shardingsphere] tuichenchuxin commented on issue #14686: `IndexOutOfBoundsException` occurred when previewing insert SQL

tuichenchuxin commented on issue #14686:
URL: https://github.com/apache/shardingsphere/issues/14686#issuecomment-1179546943

   @TeslaCN I found `sbtest1` is sharding table and `id` is sharding column. So we need to get sharding value. but there is no parameter. So error occurs.
   use this sql will be ok.
   ```
   sbtest_sharding=> preview insert into sbtest1 (id, k, c, pad) values (1, ?, ?, ?);
    data_source_name |                        actual_sql
   ------------------+-----------------------------------------------------------
    ds_1             | insert into sbtest1_1 (id, k, c, pad) values (1, ?, ?, ?)
   (1 row)
   ```
   And I found `PreviewHandler` set parameters is always empty. If we need to support perview with parameter, We need to set parameters for `LogicSQL`
   ![image](https://user-images.githubusercontent.com/86938616/178108200-28c2ee43-bcdd-44e4-a997-49ad0934a635.png)
   
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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