Skip to main content
Question

NULL value found in a column used by a subquery

  • March 31, 2023
  • 1 reply
  • 3 views

cid
  • New Participant

Hi,

I have a CREATE TABLE AS SELECT statement. The statement fails with the error:
Caused by: com.vertica.support.exceptions.FeatureNotSupportedException: [Vertica]VJDBC ERROR: NULL value found in a column used by a subquery

If I run the SELECT itself, it runs without problems returning results. I don't know which columns cause the error. There are some checks for null on certain columns.

Any ideas how to debug this issue?

Thanks.

1 reply

Bryan_H
Forum|alt.badge.img+2
  • Participating Frequently
  • April 1, 2023

We would probably need the full query to debug the issue as well as Vertica version to check for query parser issues.
My guess is that the query is parsed differently depending on whether it is standalone or part of CREATE DDL. The EXPLAIN for each SQL may show a difference in parsing that results in a subquery logic similar to the issue from the other thread.