[jira] [Comment Edited] (CASSANDRA-13592) Null Pointer exception at SELECT JSON statement
[ https://issues.apache.org/jira/browse/CASSANDRA-13592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16073057#comment-16073057 ] ZhaoYang edited comment on CASSANDRA-13592 at 7/4/17 5:26 AM: -- || source || junit-result || dtest-result|| | [trunk|https://github.com/jasonstack/cassandra/commits/CASSANDRA-13592] | [junit|https://circleci.com/gh/jasonstack/cassandra/102] | {{cql_tests.py:SlowQueryTester.local_query_test}} {{cql_tests.py:SlowQueryTester.remote_query_test}} [known|https://issues.apache.org/jira/browse/CASSANDRA-13592] {{bootstrap_test.TestBootstrap.consistent_range_movement_false_with_rf1_should_succeed_test}}[known|https://issues.apache.org/jira/browse/CASSANDRA-13576] | | [3.11|https://github.com/jasonstack/cassandra/commits/CASSANDRA-13592-cassandra-3.11] | [junit|https://circleci.com/gh/jasonstack/cassandra/99] | {{topology_test.TestTopology.size_estimates_multidc_test}}[known|https://issues.apache.org/jira/browse/CASSANDRA-13229] {{cqlsh_tests.cqlsh_tests.TestCqlsh.test_describe}} [known|https://issues.apache.org/jira/browse/CASSANDRA-13250]| | [3.0|https://github.com/jasonstack/cassandra/commits/CASSANDRA-13592-cassandra-3.0] | [junit|https://circleci.com/gh/jasonstack/cassandra/100] | {{offline_tools_test.TestOfflineTools.sstableofflinerelevel_test}}[known|https://issues.apache.org/jira/browse/CASSANDRA-12617] {{cqlsh_tests.cqlsh_copy_tests.CqlshCopyTest.test_bulk_round_trip_with_single_cor}} [known|https://issues.apache.org/jira/browse/CASSANDRA-13244] | | [2.2|https://github.com/jasonstack/cassandra/commits/CASSANDRA-13592-cassandra-2.2] | [junit|https://circleci.com/gh/jasonstack/cassandra/97] | passed | Updated java doc and split the test cases. was (Author: jasonstack): || source || junit-result || dtest-result|| | [trunk|https://github.com/jasonstack/cassandra/commits/CASSANDRA-13592] | [junit|https://circleci.com/gh/jasonstack/cassandra/102] | {{cql_tests.py:SlowQueryTester.local_query_test}} {{cql_tests.py:SlowQueryTester.remote_query_test}} [known|https://issues.apache.org/jira/browse/CASSANDRA-13592] {{bootstrap_test.TestBootstrap.consistent_range_movement_false_with_rf1_should_succeed_test}}[known|https://issues.apache.org/jira/browse/CASSANDRA-13576] | | [3.11|https://github.com/jasonstack/cassandra/commits/CASSANDRA-13592-cassandra-3.11] | [junit|https://circleci.com/gh/jasonstack/cassandra/99] | rebuilding| | [3.0|https://github.com/jasonstack/cassandra/commits/CASSANDRA-13592-cassandra-3.0] | [junit|https://circleci.com/gh/jasonstack/cassandra/100] | rebuilding | | [2.2|https://github.com/jasonstack/cassandra/commits/CASSANDRA-13592-cassandra-2.2] | [junit|https://circleci.com/gh/jasonstack/cassandra/97] | passed | Updated, rebuilding flaky tests.. > Null Pointer exception at SELECT JSON statement > --- > > Key: CASSANDRA-13592 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13592 > Project: Cassandra > Issue Type: Bug > Components: CQL > Environment: Debian Linux >Reporter: Wyss Philipp >Assignee: ZhaoYang > Labels: beginner > Attachments: system.log > > > A Nulll pointer exception appears when the command > {code} > SELECT JSON * FROM examples.basic; > ---MORE--- > message="java.lang.NullPointerException"> > Examples.basic has the following description (DESC examples.basic;): > CREATE TABLE examples.basic ( > key frozen> PRIMARY KEY, > wert text > ) WITH bloom_filter_fp_chance = 0.01 > AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'} > AND comment = '' > AND compaction = {'class': > 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', > 'max_threshold': '32', 'min_threshold': '4'} > AND compression = {'chunk_length_in_kb': '64', 'class': > 'org.apache.cassandra.io.compress.LZ4Compressor'} > AND crc_check_chance = 1.0 > AND dclocal_read_repair_chance = 0.1 > AND default_time_to_live = 0 > AND gc_grace_seconds = 864000 > AND max_index_interval = 2048 > AND memtable_flush_period_in_ms = 0 > AND min_index_interval = 128 > AND read_repair_chance = 0.0 > AND speculative_retry = '99PERCENTILE'; > {code} > The error appears after the ---MORE--- line. > The field "wert" has a JSON formatted string. -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Comment Edited] (CASSANDRA-13592) Null Pointer exception at SELECT JSON statement
[ https://issues.apache.org/jira/browse/CASSANDRA-13592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16069565#comment-16069565 ] ZhaoYang edited comment on CASSANDRA-13592 at 6/30/17 9:47 AM: --- || source || junit-result || dtest-result|| | [trunk|https://github.com/jasonstack/cassandra/commits/CASSANDRA-13592] | [junit|https://circleci.com/gh/jasonstack/cassandra/84] | {{cql_tests.py:SlowQueryTester.local_query_test}} failed on trunk {{cql_tests.py:SlowQueryTester.remote_query_test}} failed on trunk {{bootstrap_test.TestBootstrap.simultaneous_bootstrap_test}}[known|https://issues.apache.org/jira/browse/CASSANDRA-13506] | | [3.11|https://github.com/jasonstack/cassandra/commits/CASSANDRA-13592-cassandra-3.11] | [junit|https://circleci.com/gh/jasonstack/cassandra/82] | {{topology_test.TestTopology.size_estimates_multidc_test}}[known|https://issues.apache.org/jira/browse/CASSANDRA-13229] {{cqlsh_tests.cqlsh_tests.TestCqlsh.test_describe}} [known|https://issues.apache.org/jira/browse/CASSANDRA-13250] | | [3.0|https://github.com/jasonstack/cassandra/commits/CASSANDRA-13592-cassandra-3.0] | [junit|https://circleci.com/gh/jasonstack/cassandra/83] | {{auth_test.TestAuth.system_auth_ks_is_alterable_test}}[known|https://issues.apache.org/jira/browse/CASSANDRA-13113] {{offline_tools_test.TestOfflineTools.sstableofflinerelevel_test}}[known|https://issues.apache.org/jira/browse/CASSANDRA-12617] {{repair_tests.incremental_repair_test.TestIncRepair.multiple_repair_test}}[known|https://issues.apache.org/jira/browse/CASSANDRA-13515]| | [2.2|https://github.com/jasonstack/cassandra/commits/CASSANDRA-13592-cassandra-2.2] | [junit|https://circleci.com/gh/jasonstack/cassandra/85] | passed | 1. in {{listType, mapType, setType, TupleType}}.toJSONString(), keep buffer position the same. 2. change {{DurationType}}.toJSONString() to {{return "\"" + +"\"";}} (with double-quote) to be consistent with user json input 3. change {{EmptyType}}.toJSONString() to directly {{return "\"\"";}}, otherwise parent method throws NPE. was (Author: jasonstack): || source || junit-result || dtest-result|| | [trunk|https://github.com/jasonstack/cassandra/commits/CASSANDRA-13592] | [junit|https://circleci.com/gh/jasonstack/cassandra/84] | {{cql_tests.py:SlowQueryTester.local_query_test}} failed on trunk {{bootstrap_test.TestBootstrap.simultaneous_bootstrap_test}}[known|https://issues.apache.org/jira/browse/CASSANDRA-13506] | | [3.11|https://github.com/jasonstack/cassandra/commits/CASSANDRA-13592-cassandra-3.11] | [junit|https://circleci.com/gh/jasonstack/cassandra/82] | {{topology_test.TestTopology.size_estimates_multidc_test}}[known|https://issues.apache.org/jira/browse/CASSANDRA-13229] {{cqlsh_tests.cqlsh_tests.TestCqlsh.test_describe}} [known|https://issues.apache.org/jira/browse/CASSANDRA-13250] | | [3.0|https://github.com/jasonstack/cassandra/commits/CASSANDRA-13592-cassandra-3.0] | [junit|https://circleci.com/gh/jasonstack/cassandra/83] | {{auth_test.TestAuth.system_auth_ks_is_alterable_test}}[known|https://issues.apache.org/jira/browse/CASSANDRA-13113] {{offline_tools_test.TestOfflineTools.sstableofflinerelevel_test}}[known|https://issues.apache.org/jira/browse/CASSANDRA-12617] {{repair_tests.incremental_repair_test.TestIncRepair.multiple_repair_test}}[known|https://issues.apache.org/jira/browse/CASSANDRA-13515]| | [2.2|https://github.com/jasonstack/cassandra/commits/CASSANDRA-13592-cassandra-2.2] | [junit|https://circleci.com/gh/jasonstack/cassandra/85] | passed | 1. in {{listType, mapType, setType, TupleType}}.toJSONString(), keep buffer position the same. 2. change {{DurationType}}.toJSONString() to {{return "\"" + +"\"";}} (with double-quote) to be consistent with user json input 3. change {{EmptyType}}.toJSONString() to directly {{return "\"\"";}}, otherwise parent method throws NPE. > Null Pointer exception at SELECT JSON statement > --- > > Key: CASSANDRA-13592 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13592 > Project: Cassandra > Issue Type: Bug > Components: CQL > Environment: Debian Linux >Reporter: Wyss Philipp >Assignee: ZhaoYang > Labels: beginner > Attachments: system.log > > > A Nulll pointer exception appears when the command > {code} > SELECT JSON * FROM examples.basic; > ---MORE--- > message="java.lang.NullPointerException"> > Examples.basic has the following description (DESC examples.basic;): > CREATE TABLE examples.basic ( > key frozen> PRIMARY KEY, > wert text > ) WITH bloom_filter_fp_chance = 0.01 > AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'} > AND comment = '' > AND compaction = {'class': >
[jira] [Comment Edited] (CASSANDRA-13592) Null Pointer exception at SELECT JSON statement
[ https://issues.apache.org/jira/browse/CASSANDRA-13592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16069565#comment-16069565 ] ZhaoYang edited comment on CASSANDRA-13592 at 6/30/17 9:23 AM: --- || source || junit-result || dtest-result|| | [trunk|https://github.com/jasonstack/cassandra/commits/CASSANDRA-13592] | [junit|https://circleci.com/gh/jasonstack/cassandra/84] | {{cql_tests.py:SlowQueryTester.local_query_test}} failed on trunk {{bootstrap_test.TestBootstrap.simultaneous_bootstrap_test}}[known|https://issues.apache.org/jira/browse/CASSANDRA-13506] | | [3.11|https://github.com/jasonstack/cassandra/commits/CASSANDRA-13592-cassandra-3.11] | [junit|https://circleci.com/gh/jasonstack/cassandra/82] | {{topology_test.TestTopology.size_estimates_multidc_test}}[known|https://issues.apache.org/jira/browse/CASSANDRA-13229] {{cqlsh_tests.cqlsh_tests.TestCqlsh.test_describe}} [known|https://issues.apache.org/jira/browse/CASSANDRA-13250] | | [3.0|https://github.com/jasonstack/cassandra/commits/CASSANDRA-13592-cassandra-3.0] | [junit|https://circleci.com/gh/jasonstack/cassandra/83] | {{auth_test.TestAuth.system_auth_ks_is_alterable_test}}[known|https://issues.apache.org/jira/browse/CASSANDRA-13113] {{offline_tools_test.TestOfflineTools.sstableofflinerelevel_test}}[known|https://issues.apache.org/jira/browse/CASSANDRA-12617] {{repair_tests.incremental_repair_test.TestIncRepair.multiple_repair_test}}[known|https://issues.apache.org/jira/browse/CASSANDRA-13515]| | [2.2|https://github.com/jasonstack/cassandra/commits/CASSANDRA-13592-cassandra-2.2] | [junit|https://circleci.com/gh/jasonstack/cassandra/85] | passed | 1. in {{listType, mapType, setType, TupleType}}.toJSONString(), keep buffer position the same. 2. change {{DurationType}}.toJSONString() to {{return "\"" + +"\"";}} (with double-quote) to be consistent with user json input 3. change {{EmptyType}}.toJSONString() to directly {{return "\"\"";}}, otherwise parent method throws NPE. was (Author: jasonstack): || source || junit-result || dtest-result|| | [trunk|https://github.com/jasonstack/cassandra/commits/CASSANDRA-13592] | [junit|https://circleci.com/gh/jasonstack/cassandra/84] | {{cql_tests.py:SlowQueryTester.local_query_test}} failed on trunk {{bootstrap_test.TestBootstrap.simultaneous_bootstrap_test}}[known|https://issues.apache.org/jira/browse/CASSANDRA-13506] | | [3.11|https://github.com/jasonstack/cassandra/commits/CASSANDRA-13592-cassandra-3.11] | [junit|https://circleci.com/gh/jasonstack/cassandra/82] | {{topology_test.TestTopology.size_estimates_multidc_test}}[known|https://issues.apache.org/jira/browse/CASSANDRA-13229] {{cqlsh_tests.cqlsh_tests.TestCqlsh.test_describe}} [known|https://issues.apache.org/jira/browse/CASSANDRA-13250] | | [3.0|https://github.com/jasonstack/cassandra/commits/CASSANDRA-13592-cassandra-3.0] | [junit|https://circleci.com/gh/jasonstack/cassandra/83] | {{auth_test.TestAuth.system_auth_ks_is_alterable_test}} [known|https://issues.apache.org/jira/browse/CASSANDRA-13113]{{offline_tools_test.TestOfflineTools.sstableofflinerelevel_test}} [known|https://issues.apache.org/jira/browse/CASSANDRA-12617] {{repair_tests.incremental_repair_test.TestIncRepair.multiple_repair_test }} | [known|https://issues.apache.org/jira/browse/CASSANDRA-13515]| | [2.2|https://github.com/jasonstack/cassandra/commits/CASSANDRA-13592-cassandra-2.2] | [junit|https://circleci.com/gh/jasonstack/cassandra/85] | passed | 1. in {{listType, mapType, setType, TupleType}}.toJSONString(), keep buffer position the same. 2. change {{DurationType}}.toJSONString() to {{return "\"" + +"\"";}} (with double-quote) to be consistent with user json input 3. change {{EmptyType}}.toJSONString() to directly {{return "\"\"";}}, otherwise parent method throws NPE. > Null Pointer exception at SELECT JSON statement > --- > > Key: CASSANDRA-13592 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13592 > Project: Cassandra > Issue Type: Bug > Components: CQL > Environment: Debian Linux >Reporter: Wyss Philipp >Assignee: ZhaoYang > Labels: beginner > Attachments: system.log > > > A Nulll pointer exception appears when the command > {code} > SELECT JSON * FROM examples.basic; > ---MORE--- > message="java.lang.NullPointerException"> > Examples.basic has the following description (DESC examples.basic;): > CREATE TABLE examples.basic ( > key frozen> PRIMARY KEY, > wert text > ) WITH bloom_filter_fp_chance = 0.01 > AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'} > AND comment = '' > AND compaction = {'class': > 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', > 'max_threshold': '32', 'min_threshold': '4'}
[jira] [Comment Edited] (CASSANDRA-13592) Null Pointer exception at SELECT JSON statement
[ https://issues.apache.org/jira/browse/CASSANDRA-13592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16069565#comment-16069565 ] ZhaoYang edited comment on CASSANDRA-13592 at 6/30/17 9:20 AM: --- || source || junit-result || dtest-result|| | [trunk|https://github.com/jasonstack/cassandra/commits/CASSANDRA-13592] | [junit|https://circleci.com/gh/jasonstack/cassandra/84] | {{cql_tests.py:SlowQueryTester.local_query_test}} failed on trunk {{bootstrap_test.TestBootstrap.simultaneous_bootstrap_test}}[known|https://issues.apache.org/jira/browse/CASSANDRA-13506] | | [3.11|https://github.com/jasonstack/cassandra/commits/CASSANDRA-13592-cassandra-3.11] | [junit|https://circleci.com/gh/jasonstack/cassandra/82] | {{topology_test.TestTopology.size_estimates_multidc_test}}[known|https://issues.apache.org/jira/browse/CASSANDRA-13229] {{cqlsh_tests.cqlsh_tests.TestCqlsh.test_describe}} [known|https://issues.apache.org/jira/browse/CASSANDRA-13250] | | [3.0|https://github.com/jasonstack/cassandra/commits/CASSANDRA-13592-cassandra-3.0] | [junit|https://circleci.com/gh/jasonstack/cassandra/83] | {{auth_test.TestAuth.system_auth_ks_is_alterable_test}} [known|https://issues.apache.org/jira/browse/CASSANDRA-13113]{{offline_tools_test.TestOfflineTools.sstableofflinerelevel_test}} [known|https://issues.apache.org/jira/browse/CASSANDRA-12617] {{repair_tests.incremental_repair_test.TestIncRepair.multiple_repair_test }} | [known|https://issues.apache.org/jira/browse/CASSANDRA-13515]| | [2.2|https://github.com/jasonstack/cassandra/commits/CASSANDRA-13592-cassandra-2.2] | [junit|https://circleci.com/gh/jasonstack/cassandra/85] | passed | 1. in {{listType, mapType, setType, TupleType}}.toJSONString(), keep buffer position the same. 2. change {{DurationType}}.toJSONString() to {{return "\"" + +"\"";}} (with double-quote) to be consistent with user json input 3. change {{EmptyType}}.toJSONString() to directly {{return "\"\"";}}, otherwise parent method throws NPE. was (Author: jasonstack): || source || junit-result || dtest-result|| | [trunk|https://github.com/jasonstack/cassandra/commits/CASSANDRA-13592] | [junit|https://circleci.com/gh/jasonstack/cassandra/84] | {{cql_tests.py:SlowQueryTester.local_query_test}} failed on trunk {{bootstrap_test.TestBootstrap.simultaneous_bootstrap_test}}[known|https://issues.apache.org/jira/browse/CASSANDRA-13506] | | [3.11|https://github.com/jasonstack/cassandra/commits/CASSANDRA-13592-cassandra-3.11] | [junit|https://circleci.com/gh/jasonstack/cassandra/82] | {{topology_test.TestTopology.size_estimates_multidc_test}}[known|https://issues.apache.org/jira/browse/CASSANDRA-13229] {{cqlsh_tests.cqlsh_tests.TestCqlsh.test_describe}} [known|https://issues.apache.org/jira/browse/CASSANDRA-13250] | | [3.0|https://github.com/jasonstack/cassandra/commits/CASSANDRA-13592-cassandra-3.0] | [junit|https://circleci.com/gh/jasonstack/cassandra/83] | | | [2.2|https://github.com/jasonstack/cassandra/commits/CASSANDRA-13592-cassandra-2.2] | [junit|https://circleci.com/gh/jasonstack/cassandra/85] | passed | 1. in {{listType, mapType, setType, TupleType}}.toJSONString(), keep buffer position the same. 2. change {{DurationType}}.toJSONString() to {{return "\"" + +"\"";}} (with double-quote) to be consistent with user json input 3. change {{EmptyType}}.toJSONString() to directly {{return "\"\"";}}, otherwise parent method throws NPE. > Null Pointer exception at SELECT JSON statement > --- > > Key: CASSANDRA-13592 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13592 > Project: Cassandra > Issue Type: Bug > Components: CQL > Environment: Debian Linux >Reporter: Wyss Philipp >Assignee: ZhaoYang > Labels: beginner > Attachments: system.log > > > A Nulll pointer exception appears when the command > {code} > SELECT JSON * FROM examples.basic; > ---MORE--- > message="java.lang.NullPointerException"> > Examples.basic has the following description (DESC examples.basic;): > CREATE TABLE examples.basic ( > key frozen> PRIMARY KEY, > wert text > ) WITH bloom_filter_fp_chance = 0.01 > AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'} > AND comment = '' > AND compaction = {'class': > 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', > 'max_threshold': '32', 'min_threshold': '4'} > AND compression = {'chunk_length_in_kb': '64', 'class': > 'org.apache.cassandra.io.compress.LZ4Compressor'} > AND crc_check_chance = 1.0 > AND dclocal_read_repair_chance = 0.1 > AND default_time_to_live = 0 > AND gc_grace_seconds = 864000 > AND max_index_interval = 2048 > AND memtable_flush_period_in_ms = 0 > AND min_index_interval = 128 >
[jira] [Comment Edited] (CASSANDRA-13592) Null Pointer exception at SELECT JSON statement
[ https://issues.apache.org/jira/browse/CASSANDRA-13592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16069565#comment-16069565 ] ZhaoYang edited comment on CASSANDRA-13592 at 6/30/17 7:37 AM: --- || source || junit-result || dtest-result|| | [trunk|https://github.com/jasonstack/cassandra/commits/CASSANDRA-13592] | [junit|https://circleci.com/gh/jasonstack/cassandra/84] | {{cql_tests.py:SlowQueryTester.local_query_test}} failed on trunk {{bootstrap_test.TestBootstrap.simultaneous_bootstrap_test}}[known|https://issues.apache.org/jira/browse/CASSANDRA-13506] | | [3.11|https://github.com/jasonstack/cassandra/commits/CASSANDRA-13592-cassandra-3.11] | [junit|https://circleci.com/gh/jasonstack/cassandra/82] | {{topology_test.TestTopology.size_estimates_multidc_test}}[known|https://issues.apache.org/jira/browse/CASSANDRA-13229] {{cqlsh_tests.cqlsh_tests.TestCqlsh.test_describe}} [known|https://issues.apache.org/jira/browse/CASSANDRA-13250] | | [3.0|https://github.com/jasonstack/cassandra/commits/CASSANDRA-13592-cassandra-3.0] | [junit|https://circleci.com/gh/jasonstack/cassandra/83] | | | [2.2|https://github.com/jasonstack/cassandra/commits/CASSANDRA-13592-cassandra-2.2] | [junit|https://circleci.com/gh/jasonstack/cassandra/85] | passed | 1. in {{listType, mapType, setType, TupleType}}.toJSONString(), keep buffer position the same. 2. change {{DurationType}}.toJSONString() to {{return "\"" + +"\"";}} (with double-quote) to be consistent with user json input 3. change {{EmptyType}}.toJSONString() to directly {{return "\"\"";}}, otherwise parent method throws NPE. was (Author: jasonstack): || source || junit-result || dtest-result|| | [trunk|https://github.com/jasonstack/cassandra/commits/CASSANDRA-13592] | [junit|https://circleci.com/gh/jasonstack/cassandra/84] | | | [3.11|https://github.com/jasonstack/cassandra/commits/CASSANDRA-13592-cassandra-3.11] | [junit|https://circleci.com/gh/jasonstack/cassandra/82] | | | [3.0|https://github.com/jasonstack/cassandra/commits/CASSANDRA-13592-cassandra-3.0] | [junit|https://circleci.com/gh/jasonstack/cassandra/83] | | | [2.2|https://github.com/jasonstack/cassandra/commits/CASSANDRA-13592-cassandra-2.2] | [junit|https://circleci.com/gh/jasonstack/cassandra/85] | | 1. in {{listType, mapType, setType, TupleType}}.toJSONString(), keep buffer position the same. 2. change {{DurationType}}.toJSONString() to {{return "\"" + +"\"";}} (with double-quote) to be consistent with user json input 3. change {{EmptyType}}.toJSONString() to directly {{return "\"\"";}}, otherwise parent method throws NPE. > Null Pointer exception at SELECT JSON statement > --- > > Key: CASSANDRA-13592 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13592 > Project: Cassandra > Issue Type: Bug > Components: CQL > Environment: Debian Linux >Reporter: Wyss Philipp >Assignee: ZhaoYang > Labels: beginner > Attachments: system.log > > > A Nulll pointer exception appears when the command > {code} > SELECT JSON * FROM examples.basic; > ---MORE--- > message="java.lang.NullPointerException"> > Examples.basic has the following description (DESC examples.basic;): > CREATE TABLE examples.basic ( > key frozen> PRIMARY KEY, > wert text > ) WITH bloom_filter_fp_chance = 0.01 > AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'} > AND comment = '' > AND compaction = {'class': > 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', > 'max_threshold': '32', 'min_threshold': '4'} > AND compression = {'chunk_length_in_kb': '64', 'class': > 'org.apache.cassandra.io.compress.LZ4Compressor'} > AND crc_check_chance = 1.0 > AND dclocal_read_repair_chance = 0.1 > AND default_time_to_live = 0 > AND gc_grace_seconds = 864000 > AND max_index_interval = 2048 > AND memtable_flush_period_in_ms = 0 > AND min_index_interval = 128 > AND read_repair_chance = 0.0 > AND speculative_retry = '99PERCENTILE'; > {code} > The error appears after the ---MORE--- line. > The field "wert" has a JSON formatted string. -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Comment Edited] (CASSANDRA-13592) Null Pointer exception at SELECT JSON statement
[ https://issues.apache.org/jira/browse/CASSANDRA-13592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16068410#comment-16068410 ] ZhaoYang edited comment on CASSANDRA-13592 at 6/30/17 4:53 AM: --- Thanks.. Yes, it's better solve it within {{type.toJSONString}} I will add test the specification of {{type.toJSONString}}. all should not change buffer position. Got a question about {{DurationType.toJSONString()}}, imo, it should return string value with double quote {{"-2h9m"}}, like {{TimeType.toJSONString()}}. but it only returns string value {{-2h9m}} . Is it expected? it would be different from user's json input. One more thing is about: EmptyType. it should directly {{return "\"\"";}} instead of using parent method which causes null-pointer exception. EmptyType seems not used for json-path, but good to keep it safe. was (Author: jasonstack): Thanks.. Yes, it's better solve it within {{type.toJSONString}} I will add test the specification of {{type.toJSONString}}. all should not change buffer position. Got a question about {{DurationType.toJSONString()}}, imo, it should return string value with double quote {{"-2h9m"}}, like {{TimeType.toJSONString()}}. but it only returns string value {{-2h9m}} . Is it expected? it would be different from user input. One more thing is about: EmptyType. it should directly {{return "\"\"";}} instead of using parent method which causes null-pointer exception. EmptyType seems not used for json-path, but good to keep it safe. > Null Pointer exception at SELECT JSON statement > --- > > Key: CASSANDRA-13592 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13592 > Project: Cassandra > Issue Type: Bug > Components: CQL > Environment: Debian Linux >Reporter: Wyss Philipp >Assignee: ZhaoYang > Labels: beginner > Attachments: system.log > > > A Nulll pointer exception appears when the command > {code} > SELECT JSON * FROM examples.basic; > ---MORE--- > message="java.lang.NullPointerException"> > Examples.basic has the following description (DESC examples.basic;): > CREATE TABLE examples.basic ( > key frozen> PRIMARY KEY, > wert text > ) WITH bloom_filter_fp_chance = 0.01 > AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'} > AND comment = '' > AND compaction = {'class': > 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', > 'max_threshold': '32', 'min_threshold': '4'} > AND compression = {'chunk_length_in_kb': '64', 'class': > 'org.apache.cassandra.io.compress.LZ4Compressor'} > AND crc_check_chance = 1.0 > AND dclocal_read_repair_chance = 0.1 > AND default_time_to_live = 0 > AND gc_grace_seconds = 864000 > AND max_index_interval = 2048 > AND memtable_flush_period_in_ms = 0 > AND min_index_interval = 128 > AND read_repair_chance = 0.0 > AND speculative_retry = '99PERCENTILE'; > {code} > The error appears after the ---MORE--- line. > The field "wert" has a JSON formatted string. -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Comment Edited] (CASSANDRA-13592) Null Pointer exception at SELECT JSON statement
[ https://issues.apache.org/jira/browse/CASSANDRA-13592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16068410#comment-16068410 ] ZhaoYang edited comment on CASSANDRA-13592 at 6/30/17 4:17 AM: --- Thanks.. Yes, it's better solve it within {{type.toJSONString}} I will add test the specification of {{type.toJSONString}}. all should not change buffer position. Got a question about {{DurationType.toJSONString()}}, imo, it should return string value with double quote {{"-2h9m"}}, like {{TimeType.toJSONString()}}. but it only returns string value {{-2h9m}} . Is it expected? it would be different from user input. One more thing is about: EmptyType. it should directly {{return "\"\"";}} instead of using parent method which causes null-pointer exception. EmptyType seems not used for json-path, but good to keep it safe. was (Author: jasonstack): Thanks.. Yes, it's better solve it within type.toJSONString I will add test the specification of type.toJSONString. all should not change buffer position. Got a question about DurationType.toJSONString(), imo, it should return value with double quote("-2h9m"), like TimeType.toJSONString(). but it only returns value(-2h9m) . Is it expected? > Null Pointer exception at SELECT JSON statement > --- > > Key: CASSANDRA-13592 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13592 > Project: Cassandra > Issue Type: Bug > Components: CQL > Environment: Debian Linux >Reporter: Wyss Philipp >Assignee: ZhaoYang > Labels: beginner > Attachments: system.log > > > A Nulll pointer exception appears when the command > {code} > SELECT JSON * FROM examples.basic; > ---MORE--- > message="java.lang.NullPointerException"> > Examples.basic has the following description (DESC examples.basic;): > CREATE TABLE examples.basic ( > key frozen> PRIMARY KEY, > wert text > ) WITH bloom_filter_fp_chance = 0.01 > AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'} > AND comment = '' > AND compaction = {'class': > 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', > 'max_threshold': '32', 'min_threshold': '4'} > AND compression = {'chunk_length_in_kb': '64', 'class': > 'org.apache.cassandra.io.compress.LZ4Compressor'} > AND crc_check_chance = 1.0 > AND dclocal_read_repair_chance = 0.1 > AND default_time_to_live = 0 > AND gc_grace_seconds = 864000 > AND max_index_interval = 2048 > AND memtable_flush_period_in_ms = 0 > AND min_index_interval = 128 > AND read_repair_chance = 0.0 > AND speculative_retry = '99PERCENTILE'; > {code} > The error appears after the ---MORE--- line. > The field "wert" has a JSON formatted string. -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Comment Edited] (CASSANDRA-13592) Null Pointer exception at SELECT JSON statement
[ https://issues.apache.org/jira/browse/CASSANDRA-13592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16068410#comment-16068410 ] ZhaoYang edited comment on CASSANDRA-13592 at 6/29/17 3:20 PM: --- Thanks.. Yes, it's better solve it within type.toJSONString I will add test the specification of type.toJSONString. all should not change buffer position. Got a question about DurationType.toJSONString(), imo, it should return value with double quote("-2h9m"), like TimeType.toJSONString(). but it only returns value(-2h9m) . Is it expected? was (Author: jasonstack): Thanks.. Yes, it's better solve it within type.toJSONString I will add test the specification of type.toJSONString. all should not change buffer position. > Null Pointer exception at SELECT JSON statement > --- > > Key: CASSANDRA-13592 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13592 > Project: Cassandra > Issue Type: Bug > Components: CQL > Environment: Debian Linux >Reporter: Wyss Philipp >Assignee: ZhaoYang > Labels: beginner > Attachments: system.log > > > A Nulll pointer exception appears when the command > {code} > SELECT JSON * FROM examples.basic; > ---MORE--- > message="java.lang.NullPointerException"> > Examples.basic has the following description (DESC examples.basic;): > CREATE TABLE examples.basic ( > key frozen> PRIMARY KEY, > wert text > ) WITH bloom_filter_fp_chance = 0.01 > AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'} > AND comment = '' > AND compaction = {'class': > 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', > 'max_threshold': '32', 'min_threshold': '4'} > AND compression = {'chunk_length_in_kb': '64', 'class': > 'org.apache.cassandra.io.compress.LZ4Compressor'} > AND crc_check_chance = 1.0 > AND dclocal_read_repair_chance = 0.1 > AND default_time_to_live = 0 > AND gc_grace_seconds = 864000 > AND max_index_interval = 2048 > AND memtable_flush_period_in_ms = 0 > AND min_index_interval = 128 > AND read_repair_chance = 0.0 > AND speculative_retry = '99PERCENTILE'; > {code} > The error appears after the ---MORE--- line. > The field "wert" has a JSON formatted string. -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Comment Edited] (CASSANDRA-13592) Null Pointer exception at SELECT JSON statement
[ https://issues.apache.org/jira/browse/CASSANDRA-13592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16068410#comment-16068410 ] ZhaoYang edited comment on CASSANDRA-13592 at 6/29/17 2:53 PM: --- Thanks.. Yes, it's better solve it within type.toJSONString I will add test the specification of type.toJSONString. all should not change buffer position. was (Author: jasonstack): Thanks.. Yes, it's better solve it within type.toJSONString I will add test the specification of type.toJSONString. all should not change buffer position. While adding test cases for DurationType, I found following error, maybe related to [cassandra-11873|https://issues.apache.org/jira/browse/CASSANDRA-11873] {code} CREATE KEYSPACE ks WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}; CREATE TABLE ks.cf ( key text PRIMARY KEY , d duration ); // following CQL will fail, due to `JSON_OBJECT_MAPPER.readValue(json, Object.class);` returning `-2` INSERT INTO ks.cf (key , d ) VALUES ( '22', fromJson('-2h1m')); // following CQL will pass, value of duration is taken from the json map of `JSON_OBJECT_MAPPER.readValue(json, Map.class);` INSERT INTO ks.cf JSON '{ "key":"111", "d":"-2h9m"}'; {code} > Null Pointer exception at SELECT JSON statement > --- > > Key: CASSANDRA-13592 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13592 > Project: Cassandra > Issue Type: Bug > Components: CQL > Environment: Debian Linux >Reporter: Wyss Philipp >Assignee: ZhaoYang > Labels: beginner > Attachments: system.log > > > A Nulll pointer exception appears when the command > {code} > SELECT JSON * FROM examples.basic; > ---MORE--- > message="java.lang.NullPointerException"> > Examples.basic has the following description (DESC examples.basic;): > CREATE TABLE examples.basic ( > key frozen> PRIMARY KEY, > wert text > ) WITH bloom_filter_fp_chance = 0.01 > AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'} > AND comment = '' > AND compaction = {'class': > 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', > 'max_threshold': '32', 'min_threshold': '4'} > AND compression = {'chunk_length_in_kb': '64', 'class': > 'org.apache.cassandra.io.compress.LZ4Compressor'} > AND crc_check_chance = 1.0 > AND dclocal_read_repair_chance = 0.1 > AND default_time_to_live = 0 > AND gc_grace_seconds = 864000 > AND max_index_interval = 2048 > AND memtable_flush_period_in_ms = 0 > AND min_index_interval = 128 > AND read_repair_chance = 0.0 > AND speculative_retry = '99PERCENTILE'; > {code} > The error appears after the ---MORE--- line. > The field "wert" has a JSON formatted string. -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Comment Edited] (CASSANDRA-13592) Null Pointer exception at SELECT JSON statement
[ https://issues.apache.org/jira/browse/CASSANDRA-13592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16064405#comment-16064405 ] ZhaoYang edited comment on CASSANDRA-13592 at 6/27/17 8:43 AM: --- In Json path, the bytebuffer is being consumed with position = capacity. So in page-state, no partition key bytes are written. Using bf.duplicate() would fix this issue. {code} public static List rowToJson(List row, ProtocolVersion protocolVersion, ResultSet.ResultMetadata metadata) { StringBuilder sb = new StringBuilder("{"); for (int i = 0; i < metadata.names.size(); i++) { if (i > 0) sb.append(", "); ColumnSpecification spec = metadata.names.get(i); String columnName = spec.name.toString(); if (!columnName.equals(columnName.toLowerCase(Locale.US))) columnName = "\"" + columnName + "\""; ByteBuffer buffer = row.get(i); sb.append('"'); sb.append(Json.quoteAsJsonString(columnName)); sb.append("\": "); if (buffer == null) sb.append("null"); else // use duplicate() to avoid buffer being consumed sb.append(spec.type.toJSONString(buffer.duplicate(), protocolVersion)); } sb.append("}"); return Collections.singletonList(UTF8Type.instance.getSerializer().serialize(sb.toString())); } {code} was (Author: jasonstack): it seems like driver issue.. it swallowed the keys paging state.. > Null Pointer exception at SELECT JSON statement > --- > > Key: CASSANDRA-13592 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13592 > Project: Cassandra > Issue Type: Bug > Components: CQL > Environment: Debian Linux >Reporter: Wyss Philipp > Labels: beginner > Attachments: system.log > > > A Nulll pointer exception appears when the command > {code} > SELECT JSON * FROM examples.basic; > ---MORE--- > message="java.lang.NullPointerException"> > Examples.basic has the following description (DESC examples.basic;): > CREATE TABLE examples.basic ( > key frozen> PRIMARY KEY, > wert text > ) WITH bloom_filter_fp_chance = 0.01 > AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'} > AND comment = '' > AND compaction = {'class': > 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', > 'max_threshold': '32', 'min_threshold': '4'} > AND compression = {'chunk_length_in_kb': '64', 'class': > 'org.apache.cassandra.io.compress.LZ4Compressor'} > AND crc_check_chance = 1.0 > AND dclocal_read_repair_chance = 0.1 > AND default_time_to_live = 0 > AND gc_grace_seconds = 864000 > AND max_index_interval = 2048 > AND memtable_flush_period_in_ms = 0 > AND min_index_interval = 128 > AND read_repair_chance = 0.0 > AND speculative_retry = '99PERCENTILE'; > {code} > The error appears after the ---MORE--- line. > The field "wert" has a JSON formatted string. -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org