peilinqian commented on issue #22553:
URL:
https://github.com/apache/shardingsphere/issues/22553#issuecomment-1333320567
**the log of select view is incomplete**
```
[INFO ] 2022-12-01 12:08:22.681 [Connection-233-ThreadExecutor]
ShardingSphere-SQL - Logic SQL: create view select_view as select
distinct(user_id) from t_order order by user_id
[INFO ] 2022-12-01 12:08:22.681 [Connection-233-ThreadExecutor]
ShardingSphere-SQL - SQLStatement:
OpenGaussCreateViewStatement(super=CreateViewStatement(super=AbstractSQLStatement(parameterCount=0,
parameterMarkerSegments=[], commentSegments=[]),
view=SimpleTableSegment(tableName=TableNameSegment(startIndex=12, stopIndex=22,
identifier=IdentifierValue(value=select_view, quoteCharacter=NONE)),
owner=Optional.empty, alias=Optional.empty), viewDefinition=select
distinct(user_id) from t_order order by user_id,
select=OpenGaussSelectStatement(super=SelectStatement(super=AbstractSQLStatement(parameterCount=0,
parameterMarkerSegments=[], commentSegments=[]),
projections=ProjectionsSegment(startIndex=42, stopIndex=50,
projections=[ColumnProjectionSegment(column=ColumnSegment(startIndex=43,
stopIndex=49, identifier=IdentifierValue(value=user_id, quoteCharacter=NONE),
owner=Optional.empty), alias=Optional.empty)], distinctRow=true),
from=SimpleTableSegment(tableName=TableNameSegment(startI
ndex=57, stopIndex=63, identifier=IdentifierValue(value=t_order,
quoteCharacter=NONE)), owner=Optional.empty, alias=Optional.empty),
where=Optional.empty, groupBy=Optional.empty, having=Optional.empty,
orderBy=Optional[OrderBySegment(startIndex=65, stopIndex=80,
orderByItems=[ColumnOrderByItemSegment(super=TextOrderByItemSegment(),
column=ColumnSegment(startIndex=74, stopIndex=80,
identifier=IdentifierValue(value=user_id, quoteCharacter=NONE),
owner=Optional.empty))])], combine=Optional.empty), limit=Optional.empty,
lock=Optional.empty, window=Optional.empty)))
[INFO ] 2022-12-01 12:08:22.681 [Connection-233-ThreadExecutor]
ShardingSphere-SQL - Actual SQL: ds_0 ::: create view select_view as select
distinct(user_id) from t_order order by user_id
[INFO ] 2022-12-01 12:08:22.710 [Connection-233-ThreadExecutor]
ShardingSphere-SQL - Logic SQL: select * from select_view
[INFO ] 2022-12-01 12:08:22.710 [Connection-233-ThreadExecutor]
ShardingSphere-SQL - SQLStatement:
OpenGaussSelectStatement(super=SelectStatement(super=AbstractSQLStatement(parameterCount=0,
parameterMarkerSegments=[], commentSegments=[]),
projections=ProjectionsSegment(startIndex=7, stopIndex=7,
projections=[ShorthandProjectionSegment(startIndex=7, stopIndex=7,
owner=Optional.empty, alias=Optional.empty)], distinctRow=false),
from=SimpleTableSegment(tableName=TableNameSegment(startIndex=14, stopIndex=24,
identifier=IdentifierValue(value=select_view, quoteCharacter=NONE)),
owner=Optional.empty, alias=Optional.empty), where=Optional.empty,
groupBy=Optional.empty, having=Optional.empty, orderBy=Optional.empty,
combine=Optional.empty), limit=Optional.empty, lock=Optional.empty,
window=Optional.empty)
[INFO ] 2022-12-01 12:08:22.710 [Connection-233-ThreadExecutor]
ShardingSphere-SQL - Actual SQL: ds_0 ::: select * from select_view
[INFO ] 2022-12-01 12:08:22.726 [Connection-233-ThreadExecutor]
ShardingSphere-SQL - Logic SQL: select distinct(user_id) from t_order order by
user_id
[INFO ] 2022-12-01 12:08:22.726 [Connection-233-ThreadExecutor]
ShardingSphere-SQL - SQLStatement:
OpenGaussSelectStatement(super=SelectStatement(super=AbstractSQLStatement(parameterCount=0,
parameterMarkerSegments=[], commentSegments=[]),
projections=ProjectionsSegment(startIndex=15, stopIndex=23,
projections=[ColumnProjectionSegment(column=ColumnSegment(startIndex=16,
stopIndex=22, identifier=IdentifierValue(value=user_id, quoteCharacter=NONE),
owner=Optional.empty), alias=Optional.empty)], distinctRow=true),
from=SimpleTableSegment(tableName=TableNameSegment(startIndex=30, stopIndex=36,
identifier=IdentifierValue(value=t_order, quoteCharacter=NONE)),
owner=Optional.empty, alias=Optional.empty), where=Optional.empty,
groupBy=Optional.empty, having=Optional.empty,
orderBy=Optional[OrderBySegment(startIndex=38, stopIndex=53,
orderByItems=[ColumnOrderByItemSegment(super=TextOrderByItemSegment(),
column=ColumnSegment(startIndex=47, stopIndex=53,
identifier=IdentifierValue(value=user
_id, quoteCharacter=NONE), owner=Optional.empty))])], combine=Optional.empty),
limit=Optional.empty, lock=Optional.empty, window=Optional.empty)
[INFO ] 2022-12-01 12:08:22.726 [Connection-233-ThreadExecutor]
ShardingSphere-SQL - Actual SQL: ds_0 ::: select distinct(user_id) from t_order
order by user_id
[INFO ] 2022-12-01 12:08:22.726 [Connection-233-ThreadExecutor]
ShardingSphere-SQL - Actual SQL: ds_1 ::: select distinct(user_id) from t_order
order by user_id
[INFO ] 2022-12-01 12:08:22.729 [Connection-233-ThreadExecutor]
ShardingSphere-SQL - Logic SQL: drop view select_view
[INFO ] 2022-12-01 12:08:22.729 [Connection-233-ThreadExecutor]
ShardingSphere-SQL - SQLStatement:
OpenGaussDropViewStatement(super=DropViewStatement(super=AbstractSQLStatement(parameterCount=0,
parameterMarkerSegments=[], commentSegments=[]),
views=[SimpleTableSegment(tableName=TableNameSegment(startIndex=10,
stopIndex=20, identifier=IdentifierValue(value=select_view,
quoteCharacter=NONE)), owner=Optional.empty, alias=Optional.empty)]))
[INFO ] 2022-12-01 12:08:22.729 [Connection-233-ThreadExecutor]
ShardingSphere-SQL - Actual SQL: ds_0 ::: drop view select_view
[INFO ] 2022-12-01 12:08:22.740 [Connection-233-ThreadExecutor]
ShardingSphere-SQL - Logic SQL: create view select_view as select distinct on
(user_id) * from t_order order by user_id,order_id
@
```
--
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]