scylladb / scylla-doc-issues

Repository for reporting issues about Scylla documentation (Deprecated)
2 stars 6 forks source link

Issue in page Data Manipulation #855

Closed seeekr closed 2 years ago

seeekr commented 2 years ago

I would like to report an issue in page https://docs.scylladb.com/getting-started/dml

Problem

CleanShot 2022-05-28 at 18 10 26@2x

Second query has 4 column names but only 3 values?

Suggest a fix

Still learning Scylla/CQL, not sure if it would accept an additional '' or null in there as second to last value, to indicate that it is not present. Or if that column name must be removed from the query.

tzach commented 2 years ago

You are right The correct results is

 movie    | director      | main_actor | year
----------+---------------+------------+------
 Serenity | Joseph Whedon |    Unknown | null
tzach commented 2 years ago

As you can test yourself with the following:

cqlsh:mykeyspace> CREATE TABLE NerdMovies (movie text PRIMARY KEY, director text, main_actor text, year INT);
cqlsh:mykeyspace> INSERT INTO NerdMovies  (movie, director, main_actor)
              ... VALUES ('Serenity', 'Anonymous', 'Unknown')
              ... USING TIMESTAMP  1442880000000000;
cqlsh:mykeyspace> select * from NerdMovies;

 movie    | director  | main_actor | year
----------+-----------+------------+------
 Serenity | Anonymous |    Unknown | null

(1 rows)
cqlsh:mykeyspace> INSERT INTO NerdMovies  (movie, director, main_actor)
              ... VALUES ('Serenity', 'Joseph Whedon', 'Nathan Fillion')
              ... USING TIMESTAMP 1442880000000000;
cqlsh:mykeyspace> select * from NerdMovies;

 movie    | director      | main_actor | year
----------+---------------+------------+------
 Serenity | Joseph Whedon |    Unknown | null

(1 rows)
annastuchlik commented 2 years ago

Fixed with https://github.com/scylladb/scylla-docs/pull/4066