lintingbin commented on issue #14557:
URL: https://github.com/apache/iceberg/issues/14557#issuecomment-3521554048

   @nastra Here are the results I obtained from running native Spark SQL:
   ```
   spark-sql (default)>
                      >
                      >
                      >
                      > CREATE VIEW tmp.test1
                      > AS select
                      > `version.string` as `version`,`event_time.string` as 
`event_time`
                      > from dev_game_ods.10058_log;
   Time taken: 1.224 seconds
   spark-sql (default)> CREATE VIEW tmp.test2 USING iceberg
                      > AS select
                      > `version.string` as `version`,`event_time.string` as 
`event_time`
                      > from dev_game_ods.10058_log;
   
   [PARSE_SYNTAX_ERROR] Syntax error at or near 'USING'.(line 1, pos 22)
   
   == SQL ==
   CREATE VIEW tmp.test2 USING iceberg
   ----------------------^^^
   AS select
   `version.string` as `version`,`event_time.string` as `event_time`
   from dev_game_ods.10058_log
   
   spark-sql (default)> CREATE VIEW tmp.test2
                      > AS select
                      > `version.string` as `version`,`event_time.string` as 
`event_time`
                      > from dev_game_ods.10058_log USING iceberg;
   
   [PARSE_SYNTAX_ERROR] Syntax error at or near 'USING'.(line 4, pos 28)
   
   == SQL ==
   CREATE VIEW tmp.test2
   AS select
   `version.string` as `version`,`event_time.string` as `event_time`
   from dev_game_ods.10058_log USING iceberg
   ----------------------------^^^
   
   spark-sql (default)> DESCRIBE EXTENDED view tmp.test1;
   [TABLE_OR_VIEW_NOT_FOUND] The table or view `view` cannot be found. Verify 
the spelling and correctness of the schema and catalog.
   If you did not qualify the name with a schema, verify the current_schema() 
output, or qualify the name with the correct schema and catalog.
   To tolerate the error on drop use DROP VIEW IF EXISTS or DROP TABLE IF 
EXISTS.; line 1 pos 18;
   'DescribeColumn 'tmp.test1, true, [info_name#1849, info_value#1850]
   +- 'UnresolvedTableOrView [view], DESCRIBE TABLE, true
   
   spark-sql (default)> show create table tmp.test1;
   CREATE VIEW tmp.test1 (
     version,
     event_time)
   TBLPROPERTIES (
     'create_engine_version' = 'Spark 3.4.2',
     'current-schema' = 
'{"type":"struct","schema-id":0,"fields":[{"id":0,"name":"version","required":false,"type":"string"},{"id":1,"name":"event_time","required":false,"type":"string"}]}',
     'engine_version' = 'Spark 3.4.2',
     'metadata_location' = 
'gs://xxx/user/hive/warehouse/tmp.db/test1/metadata/00000-987e995a-22fe-438e-87de-2a5eb62046b5.gz.metadata.json',
     'spark.query-column-names' = 'version,event_time',
     'table_type' = 'ICEBERG-VIEW',
     'transient_lastDdlTime' = '1762947982',
     'uuid' = 'e1cca356-ae17-40dc-a8ee-6a275ea9ac1e')
   AS select
   `version.string` as `version`,`event_time.string` as `event_time`
   from dev_game_ods.10058_log
   
   Time taken: 0.3 seconds, Fetched 1 row(s)
   ```


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to