Copilot commented on code in PR #37346:
URL: https://github.com/apache/shardingsphere/pull/37346#discussion_r2611578918
##########
test/it/parser/src/main/resources/case/ddl/create-table.xml:
##########
@@ -3701,6 +3701,17 @@
<storage-format type="ORC" start-index="73" stop-index="76" />
</create-table>
+ <create-table sql-case-id="create_iceberg_table_as_select">
+ <table name="target" start-index="13" stop-index="18" />
+ <storage-handler name="ICEBERG" start-index="36" stop-index="43" />
Review Comment:
The start and stop indices for the storage-handler are incorrect. In the SQL
"CREATE TABLE target STORED BY ICEBERG AS SELECT * FROM source;", the word
"ICEBERG" starts at index 30 and ends at index 36, not at indices 36-43 as
specified.
```suggestion
<storage-handler name="ICEBERG" start-index="30" stop-index="36" />
```
##########
test/it/parser/src/main/resources/case/ddl/create-table.xml:
##########
@@ -3701,6 +3701,17 @@
<storage-format type="ORC" start-index="73" stop-index="76" />
</create-table>
+ <create-table sql-case-id="create_iceberg_table_as_select">
+ <table name="target" start-index="13" stop-index="18" />
+ <storage-handler name="ICEBERG" start-index="36" stop-index="43" />
+ <as-select query="SELECT * FROM source" start-index="48"
stop-index="64" />
+ </create-table>
+
+ <create-table sql-case-id="create_iceberg_table_like_table">
+ <table name="target" like="source" start-index="13" stop-index="18"/>
+ <storage-handler name="ICEBERG" start-index="37" stop-index="44" />
Review Comment:
Inconsistent element naming compared to other Iceberg test cases. The test
case 'create_iceberg_table' (line 3681) and 'create_iceberg_table_partition'
(line 3692) use 'stored-by' element for "STORED BY ICEBERG" clause, while
'create_iceberg_table_orc' (line 3700) uses 'storage-handler' only when there's
also a "STORED AS" clause. For consistency with similar test cases that don't
have a "STORED AS" clause, consider using 'stored-by' instead of
'storage-handler'.
```suggestion
<stored-by handler="ICEBERG" start-index="36" stop-index="43" />
<as-select query="SELECT * FROM source" start-index="48"
stop-index="64" />
</create-table>
<create-table sql-case-id="create_iceberg_table_like_table">
<table name="target" like="source" start-index="13" stop-index="18"/>
<stored-by handler="ICEBERG" start-index="37" stop-index="44" />
```
##########
test/it/parser/src/main/resources/case/ddl/create-table.xml:
##########
@@ -3701,6 +3701,17 @@
<storage-format type="ORC" start-index="73" stop-index="76" />
</create-table>
+ <create-table sql-case-id="create_iceberg_table_as_select">
+ <table name="target" start-index="13" stop-index="18" />
+ <storage-handler name="ICEBERG" start-index="36" stop-index="43" />
+ <as-select query="SELECT * FROM source" start-index="48"
stop-index="64" />
+ </create-table>
+
+ <create-table sql-case-id="create_iceberg_table_like_table">
+ <table name="target" like="source" start-index="13" stop-index="18"/>
+ <storage-handler name="ICEBERG" start-index="37" stop-index="44" />
Review Comment:
Inconsistent element naming compared to other Iceberg test cases. The test
case 'create_iceberg_table' (line 3681) and 'create_iceberg_table_partition'
(line 3692) use 'stored-by' element for "STORED BY ICEBERG" clause, while
'create_iceberg_table_orc' (line 3700) uses 'storage-handler' only when there's
also a "STORED AS" clause. For consistency with similar test cases that don't
have a "STORED AS" clause, consider using 'stored-by' instead of
'storage-handler'.
```suggestion
<stored-by handler="ICEBERG" start-index="36" stop-index="43" />
<as-select query="SELECT * FROM source" start-index="48"
stop-index="64" />
</create-table>
<create-table sql-case-id="create_iceberg_table_like_table">
<table name="target" like="source" start-index="13" stop-index="18"/>
<stored-by handler="ICEBERG" start-index="37" stop-index="44" />
```
##########
test/it/parser/src/main/resources/case/ddl/create-table.xml:
##########
@@ -3701,6 +3701,17 @@
<storage-format type="ORC" start-index="73" stop-index="76" />
</create-table>
+ <create-table sql-case-id="create_iceberg_table_as_select">
+ <table name="target" start-index="13" stop-index="18" />
+ <storage-handler name="ICEBERG" start-index="36" stop-index="43" />
+ <as-select query="SELECT * FROM source" start-index="48"
stop-index="64" />
Review Comment:
The start and stop indices for the as-select query are incorrect. In the SQL
"CREATE TABLE target STORED BY ICEBERG AS SELECT * FROM source;", the query
"SELECT * FROM source" starts at index 41 and ends at index 60, not at indices
48-64 as specified.
```suggestion
<as-select query="SELECT * FROM source" start-index="41"
stop-index="60" />
```
##########
test/it/parser/src/main/resources/case/ddl/create-table.xml:
##########
@@ -3701,6 +3701,17 @@
<storage-format type="ORC" start-index="73" stop-index="76" />
</create-table>
+ <create-table sql-case-id="create_iceberg_table_as_select">
+ <table name="target" start-index="13" stop-index="18" />
+ <storage-handler name="ICEBERG" start-index="36" stop-index="43" />
+ <as-select query="SELECT * FROM source" start-index="48"
stop-index="64" />
+ </create-table>
+
+ <create-table sql-case-id="create_iceberg_table_like_table">
+ <table name="target" like="source" start-index="13" stop-index="18"/>
+ <storage-handler name="ICEBERG" start-index="37" stop-index="44" />
Review Comment:
The start and stop indices for the storage-handler are incorrect. In the SQL
"CREATE TABLE target LIKE source STORED BY ICEBERG;", the word "ICEBERG" starts
at index 42 and ends at index 48, not at indices 37-44 as specified.
```suggestion
<storage-handler name="ICEBERG" start-index="42" stop-index="48" />
```
--
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]