You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Ivan Artiukhov (Jira)" <ji...@apache.org> on 2025/02/18 14:45:00 UTC
[jira] [Created] (IGNITE-24552) Failure upon creating a table with default TIMESTAMP column
Ivan Artiukhov created IGNITE-24552:
---------------------------------------
Summary: Failure upon creating a table with default TIMESTAMP column
Key: IGNITE-24552
URL: https://issues.apache.org/jira/browse/IGNITE-24552
Project: Ignite
Issue Type: Bug
Components: sql
Affects Versions: 3.0
Reporter: Ivan Artiukhov
The following Ignite versions are affected:
* Apache Ignite ver. 3.0.0
* Apache Ignite ver. 3.1.0-SNAPSHOT-sha1:05f8e503e1baeeb0b6d3ac0c06ddd40c649b8b95
h1. Steps
# Start a node via {{bin/ignite3db}}
# Init a node via AI3 CLI: {{cluster init --name cluster1 --metastorage-group defaultNode}}
# In the CLI enter the {{sql}} mode and try to create a table with a TIMESTAMP column with default value: {{create table time_table_1 (id int primary key, creation_time timestamp default CURRENT_TIMESTAMP)}}
h1. Expected result
The table is created
h1. Actual result
The table is not created. The following error is seen in the CLI:
{noformat}
SQL query execution error
Failed to parse query: Incorrect syntax near the keyword 'CURRENT_TIMESTAMP' at line 1, column 80
{noformat}
The following error is seen in the node's log:
{code:java}
2025-02-18 17:39:04:266 +0300 [INFO][%defaultNode%sql-execution-pool-0][JdbcQueryEventHandlerImpl] Exception while executing query.
org.apache.ignite.sql.SqlException: IGN-SQL-3 TraceId:5393b80c-3c05-44f5-8607-8df8568c266f Failed to parse query: Incorrect syntax near the keyword 'CURRENT_TIMESTAMP' at line 1, column 80
at org.apache.ignite.internal.sql.engine.sql.IgniteSqlParser.convertException(IgniteSqlParser.java:220)
at org.apache.ignite.internal.sql.engine.sql.IgniteSqlParser.parse(IgniteSqlParser.java:129)
at org.apache.ignite.internal.sql.engine.sql.IgniteSqlParser.parse(IgniteSqlParser.java:91)
at org.apache.ignite.internal.sql.engine.sql.ParserServiceImpl.parseScript(ParserServiceImpl.java:89)
at org.apache.ignite.internal.sql.engine.exec.fsm.QueryExecutor.parseScript(QueryExecutor.java:260)
at org.apache.ignite.internal.sql.engine.exec.fsm.ParsingPhaseHandler.lambda$handle$0(ParsingPhaseHandler.java:48)
at org.apache.ignite.internal.sql.engine.exec.QueryTaskExecutorImpl.lambda$execute$0(QueryTaskExecutorImpl.java:86)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)