userkdg commented on issue #13972:
URL:
https://github.com/apache/shardingsphere/issues/13972#issuecomment-991005101
> > I will check on this soon.
>
> ```java
> private SubstitutableColumnNameToken generateSQLTokens(final String
tableName, final ColumnProjectionSegment columnSegment,
> final
ColumnProjection columnProjection, final SubqueryType subqueryType) {
> Collection<ColumnProjection> projections =
generateProjections(tableName, columnProjection, subqueryType, false);
> int startIndex = columnSegment.getColumn().getOwner().isPresent()
? columnSegment.getColumn().getOwner().get().getStopIndex() + 2 :
columnSegment.getColumn().getStartIndex();
> int stopIndex = columnSegment.getStopIndex();
> return new SubstitutableColumnNameToken(startIndex, stopIndex,
projections);
> }
>
> ```
>
> i dont understand **
columnSegment.getColumn().getOwner().get().getStopIndex() + 2 **, startIndex
need add 2
i found ``` +2 `` reason
such as :
``` sql
preview select ab.address from ec_oms_order ab where ab.address ='1';
select aab.address_cipher AS address from ec_oms_order ab where
aab.address_cipher ='9ht7b2lvIAZEi99P2eIg3w=='
```
when we set table alias multi letters , will produce bugs due to ```+2```
only support one length letter .
....
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]