I’m trying to execute “toUnixTimestamp(now())” against system.local table (AstraDB Serverless).
It works fine when I execute it inside AstraDB CQL Console: SELECT toUnixTimestamp(now()) FROM
system.local
;
The problem is that I cannot execute it successfully using Astra CLI or Java-driver:
command: SELECT toUnixTimestamp(now()) FROM
system.local
;
error output:
com.datastax.oss.driver.api.core.servererrors.InvalidQueryException: unexpected argument type for function call 'toUnixTimestamp(...)' in select statementat com.datastax.oss.driver.api.core.servererrors.InvalidQueryException.copy(InvalidQueryException.java:48) at com.datastax.oss.driver.internal.core.util.concurrent.CompletableFutures.getUninterruptibly(CompletableFutures.java:149)
I’m able to execute it using a custom table (Astra CLI / Java-driver): SELECT toUnixTimestamp(now()) FROM
demo.example
;
But for my use case, I need to execute it agains system.local.
The scenario is the same for the following functions: toUnixTimestamp(), toTimestamp() and dateOf().
Only now() function works with every approach: AstraDB CQL console, Astra CLI and Java-driver (SELECT now() FROM
system.local
;
).
Are there any restrictions on what can be accessed inside system.local using AstraDB CQL Console but cannot be accessed using Astra CLI or Java-driver?