yeah GENERATED ALWAYS AS Null evaluate to false that's why iy is not working. I hope that it will be improved in the future. Spark community know about INSERT INTO issues , onhttps://spark.apache.org/docs/latest/sql-ref-syntax-dml-insert-into.html we can read:

Note:The current behaviour has some limitations:

  • All specified columns should exist in the table and not be duplicated from each other. It includes all columns except the static partition columns.
  • The size of the column list should be exactly the size of the data from VALUESclause or query.


My blog: https://databrickster.medium.com/