Bug: NPE when INSERT INTO b SELECT * FROM a
See original GitHub issueMaybe directly related to #10851
CrateDB version: 4.3.2
Environment description: CrateDB Cloud - Dev Cluster
- 3x 0.25 vCPUs
- 3x 2 GB Memory (0.5 GB Heap)
Problem description:
- 1 TIMESTAMP column (PK)
- ~ 190 DOUBLE PRECISION columns
- ~ 10 TEXT columns
CREATE TABLE open_pv (
DateTime TIMESTAMPTZ PRIMARY KEY ,
temperature_outdoor_fantasytown_weather DOUBLE PRECISION,
...
c_phase_voltage_brightcounty_pv DOUBLE PRECISION);
- 103.2 MB (Size primary shard)
- 23,422 records
when creating a second table open_pv2
with the schema as open_pv
and trying to copy the data with
INSERT INTO open_pv2 SELECT * FROM open_pv
-- INSERT ERROR (0.000 sec)
this leads to the following error
NullPointerException[Cannot invoke "org.elasticsearch.common.io.stream.Writeable$Reader.read(org.elasticsearch.common.io.stream.StreamInput)" because "this.reader" is null]
Limiting the number by using LIMIT 10000;
the query succedes
INSERT INTO open_pv2 SELECT * FROM open_pv LIMIT 10000;
-- INSERT OK, 10000 rows affected (37.742 sec)
Steps to reproduce:
- Create Table
open_pv
CREATE TABLE open_pv (
DateTime TIMESTAMPTZ PRIMARY KEY ,
temperature_outdoor_fantasytown_weather DOUBLE PRECISION,
...
c_phase_voltage_brightcounty_pv DOUBLE PRECISION);
-
Insert ~25.000 rows
-
Create Table
open_pv2
CREATE TABLE open_pv2 (
DateTime TIMESTAMPTZ PRIMARY KEY ,
temperature_outdoor_fantasytown_weather DOUBLE PRECISION,
...
c_phase_voltage_brightcounty_pv DOUBLE PRECISION);
- Try to copy table with
INSERT SELECT FROM
INSERT INTO open_pv2 SELECT * FROM open_pv
-- INSERT ERROR (0.000 sec)
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Nullpointerexception when trying to insert a value into SQLite
I'm trying to insert some values into an SQLite Database which are entered by the user, however when I press the button to...
Read more >java.lang.NullPointerException when doing SQL on ms access
I am trying to perform Insert and delete commands on an access ... Everything is fine when i do a Select * FROM...,...
Read more >NullPointerException when void convert to varchar using Tez
NullPointerException when void convert to varchar using Tez. Status: ... insert into testTezVarchar select a1 as a,b1 as b from testTezVoid; ...
Read more >CaseExpr toThrift NPE · Issue #3854 · apache/doris - GitHub
SELECT CASE WHEN c>(SELECT avg(c) FROM t1) THEN a*2 ELSE b*10 END FROM t1 ORDER BY 1;. 2020-06-13 10:58:36,086 ...
Read more >Java NullPointerException - Detect, Fix, and Best Practices
Some of the common reasons for NullPointerException in java programs are: ... Sometimes we get an error page response from a java web ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@proddata We’ve fixed this by #10882, it will be part of the next 4.3 release. Thank you again for reporting.
@proddata Thank you for that information, we are now able to reproduce the issue and working on a fix.