I haven't received the message for whatever reason. Perhaps Coverity is
having trouble with their email system. Could you instead invite
[email protected]? Since I have an existing Coverity account at that
address, I assume it will just add me to the project.

--
Michael Mior
[email protected]

2017-09-07 13:37 GMT-04:00 Julian Hyde <[email protected]>:

> I didn’t (and still don’t) see your request to join. But I just sent an
> invitation to [email protected] <mailto:[email protected]> to join
> https://scan.coverity.com/projects/julianhyde-incubator-calcite.
> Hopefully you just got it.
>
> > On Sep 7, 2017, at 10:34 AM, Michael Mior <[email protected]> wrote:
> >
> > I requested approval some time ago to be added to the project on Coverity
> > since I find it easier to review things on the web interface. If you
> > wouldn't mind approving that, would help.
> >
> > --
> > Michael Mior
> > [email protected]
> >
> > 2017-09-07 13:31 GMT-04:00 Julian Hyde <[email protected]>:
> >
> >> Here is the latest scan. Can someone please review?
> >>
> >> Julian
> >>
> >>
> >>> Begin forwarded message:
> >>>
> >>> From: [email protected]
> >>> Subject: New Defects reported by Coverity Scan for
> >> julianhyde/incubator-calcite
> >>> Date: September 7, 2017 at 10:26:37 AM PDT
> >>> To: [email protected]
> >>>
> >>>
> >>> Hi,
> >>>
> >>> Please find the latest report on new defect(s) introduced to
> >> julianhyde/incubator-calcite found with Coverity Scan.
> >>>
> >>> 69 new defect(s) introduced to julianhyde/incubator-calcite found with
> >> Coverity Scan.
> >>> 67 defect(s), reported by Coverity Scan earlier, were marked fixed in
> >> the recent build analyzed by Coverity Scan.
> >>>
> >>> New defect(s) Reported-by: Coverity Scan
> >>> Showing 20 of 69 defect(s)
> >>>
> >>>
> >>> ** CID 170823:  High impact security  (BAD_CERT_VERIFICATION)
> >>> /core/src/main/java/org/apache/calcite/runtime/SocketFactoryImpl.java:
> >> 128 in org.apache.calcite.runtime.SocketFactoryImpl.
> createSocket(java.lang.String,
> >> int)()
> >>>
> >>>
> >>> ____________________________________________________________
> >> ____________________________________________
> >>> *** CID 170823:  High impact security  (BAD_CERT_VERIFICATION)
> >>> /core/src/main/java/org/apache/calcite/runtime/SocketFactoryImpl.java:
> >> 128 in org.apache.calcite.runtime.SocketFactoryImpl.
> createSocket(java.lang.String,
> >> int)()
> >>> 122         return s;
> >>> 123       }
> >>> 124
> >>> 125       @Override public Socket createSocket(String host, int port)
> >>> 126           throws IOException {
> >>> 127         Socket s = createSocket();
> >>>>>>   CID 170823:  High impact security  (BAD_CERT_VERIFICATION)
> >>>>>>   "s" used without verifying the hostname of the SSLSession.
> >>> 128         s.connect(new InetSocketAddress(host, port),
> >> SO_CONNECT_TIMEOUT);
> >>> 129         return s;
> >>> 130       }
> >>> 131
> >>> 132       @Override public Socket createSocket(InetAddress host, int
> >> port)
> >>> 133           throws IOException {
> >>>
> >>> ** CID 170822:  Null pointer dereferences  (NULL_RETURNS)
> >>> /pig/src/main/java/org/apache/calcite/adapter/pig/PigTableScan.java:
> 59
> >> in org.apache.calcite.adapter.pig.PigTableScan.getPigTable(
> >> java.lang.String)()
> >>>
> >>>
> >>> ____________________________________________________________
> >> ____________________________________________
> >>> *** CID 170822:  Null pointer dereferences  (NULL_RETURNS)
> >>> /pig/src/main/java/org/apache/calcite/adapter/pig/PigTableScan.java:
> 59
> >> in org.apache.calcite.adapter.pig.PigTableScan.getPigTable(
> >> java.lang.String)()
> >>> 53             + "' USING PigStorage() AS " + schema + ';';
> >>> 54         implementor.addStatement(statement);
> >>> 55       }
> >>> 56
> >>> 57       private PigTable getPigTable(String name) {
> >>> 58         final CalciteSchema schema = getTable().unwrap(org.apache.
> >> calcite.jdbc.CalciteSchema.class);
> >>>>>>   CID 170822:  Null pointer dereferences  (NULL_RETURNS)
> >>>>>>   Calling a method on null object "schema.getTable(name, false)".
> >>> 59         return (PigTable) schema.getTable(name, false).getTable();
> >>> 60       }
> >>> 61
> >>> 62       private String getSchemaForPigStatement(Implementor
> >> implementor) {
> >>> 63         final List<String> fieldNamesAndTypes = new ArrayList<>(
> >>> 64             getTable().getRowType().getFieldList().size());
> >>>
> >>> ** CID 170821:  High impact security  (BAD_CERT_VERIFICATION)
> >>> /core/src/main/java/org/apache/calcite/runtime/SocketFactoryImpl.java:
> >> 135 in org.apache.calcite.runtime.SocketFactoryImpl.createSocket(
> java.net.InetAddress,
> >> int)()
> >>>
> >>>
> >>> ____________________________________________________________
> >> ____________________________________________
> >>> *** CID 170821:  High impact security  (BAD_CERT_VERIFICATION)
> >>> /core/src/main/java/org/apache/calcite/runtime/SocketFactoryImpl.java:
> >> 135 in org.apache.calcite.runtime.SocketFactoryImpl.createSocket(
> java.net.InetAddress,
> >> int)()
> >>> 129         return s;
> >>> 130       }
> >>> 131
> >>> 132       @Override public Socket createSocket(InetAddress host, int
> >> port)
> >>> 133           throws IOException {
> >>> 134         Socket s = createSocket();
> >>>>>>   CID 170821:  High impact security  (BAD_CERT_VERIFICATION)
> >>>>>>   "s" used without verifying the hostname of the SSLSession.
> >>> 135         s.connect(new InetSocketAddress(host, port),
> >> SO_CONNECT_TIMEOUT);
> >>> 136         return s;
> >>> 137       }
> >>> 138
> >>> 139       @Override public Socket createSocket(String host, int port,
> >> InetAddress local,
> >>> 140           int localPort) throws IOException {
> >>>
> >>> ** CID 170820:    (BAD_CERT_VERIFICATION)
> >>> /core/src/main/java/org/apache/calcite/runtime/SocketFactoryImpl.java:
> >> 150 in org.apache.calcite.runtime.SocketFactoryImpl.createSocket(
> java.net.InetAddress,
> >> int, java.net.InetAddress, int)()
> >>> /core/src/main/java/org/apache/calcite/runtime/SocketFactoryImpl.java:
> >> 151 in org.apache.calcite.runtime.SocketFactoryImpl.createSocket(
> java.net.InetAddress,
> >> int, java.net.InetAddress, int)()
> >>>
> >>>
> >>> ____________________________________________________________
> >> ____________________________________________
> >>> *** CID 170820:    (BAD_CERT_VERIFICATION)
> >>> /core/src/main/java/org/apache/calcite/runtime/SocketFactoryImpl.java:
> >> 150 in org.apache.calcite.runtime.SocketFactoryImpl.createSocket(
> java.net.InetAddress,
> >> int, java.net.InetAddress, int)()
> >>> 144         return s;
> >>> 145       }
> >>> 146
> >>> 147       @Override public Socket createSocket(InetAddress host, int
> >> port,
> >>> 148           InetAddress local, int localPort) throws IOException {
> >>> 149         Socket s  = createSocket();
> >>>>>>   CID 170820:    (BAD_CERT_VERIFICATION)
> >>>>>>   "s" used without verifying the hostname of the SSLSession.
> >>> 150         s.bind(new InetSocketAddress(local, localPort));
> >>> 151         s.connect(new InetSocketAddress(host, port),
> >> SO_CONNECT_TIMEOUT);
> >>> 152         return s;
> >>> 153       }
> >>> 154
> >>> 155       /**
> >>> /core/src/main/java/org/apache/calcite/runtime/SocketFactoryImpl.java:
> >> 151 in org.apache.calcite.runtime.SocketFactoryImpl.createSocket(
> java.net.InetAddress,
> >> int, java.net.InetAddress, int)()
> >>> 145       }
> >>> 146
> >>> 147       @Override public Socket createSocket(InetAddress host, int
> >> port,
> >>> 148           InetAddress local, int localPort) throws IOException {
> >>> 149         Socket s  = createSocket();
> >>> 150         s.bind(new InetSocketAddress(local, localPort));
> >>>>>>   CID 170820:    (BAD_CERT_VERIFICATION)
> >>>>>>   "s" used without verifying the hostname of the SSLSession.
> >>> 151         s.connect(new InetSocketAddress(host, port),
> >> SO_CONNECT_TIMEOUT);
> >>> 152         return s;
> >>> 153       }
> >>> 154
> >>> 155       /**
> >>> 156        * @see javax.net.SocketFactory#getDefault()
> >>>
> >>> ** CID 170819:    (BAD_CERT_VERIFICATION)
> >>> /core/src/main/java/org/apache/calcite/runtime/SocketFactoryImpl.java:
> >> 142 in org.apache.calcite.runtime.SocketFactoryImpl.
> createSocket(java.lang.String,
> >> int, java.net.InetAddress, int)()
> >>> /core/src/main/java/org/apache/calcite/runtime/SocketFactoryImpl.java:
> >> 143 in org.apache.calcite.runtime.SocketFactoryImpl.
> createSocket(java.lang.String,
> >> int, java.net.InetAddress, int)()
> >>>
> >>>
> >>> ____________________________________________________________
> >> ____________________________________________
> >>> *** CID 170819:    (BAD_CERT_VERIFICATION)
> >>> /core/src/main/java/org/apache/calcite/runtime/SocketFactoryImpl.java:
> >> 142 in org.apache.calcite.runtime.SocketFactoryImpl.
> createSocket(java.lang.String,
> >> int, java.net.InetAddress, int)()
> >>> 136         return s;
> >>> 137       }
> >>> 138
> >>> 139       @Override public Socket createSocket(String host, int port,
> >> InetAddress local,
> >>> 140           int localPort) throws IOException {
> >>> 141         Socket s  = createSocket();
> >>>>>>   CID 170819:    (BAD_CERT_VERIFICATION)
> >>>>>>   "s" used without verifying the hostname of the SSLSession.
> >>> 142         s.bind(new InetSocketAddress(local, localPort));
> >>> 143         s.connect(new InetSocketAddress(host, port),
> >> SO_CONNECT_TIMEOUT);
> >>> 144         return s;
> >>> 145       }
> >>> 146
> >>> 147       @Override public Socket createSocket(InetAddress host, int
> >> port,
> >>> /core/src/main/java/org/apache/calcite/runtime/SocketFactoryImpl.java:
> >> 143 in org.apache.calcite.runtime.SocketFactoryImpl.
> createSocket(java.lang.String,
> >> int, java.net.InetAddress, int)()
> >>> 137       }
> >>> 138
> >>> 139       @Override public Socket createSocket(String host, int port,
> >> InetAddress local,
> >>> 140           int localPort) throws IOException {
> >>> 141         Socket s  = createSocket();
> >>> 142         s.bind(new InetSocketAddress(local, localPort));
> >>>>>>   CID 170819:    (BAD_CERT_VERIFICATION)
> >>>>>>   "s" used without verifying the hostname of the SSLSession.
> >>> 143         s.connect(new InetSocketAddress(host, port),
> >> SO_CONNECT_TIMEOUT);
> >>> 144         return s;
> >>> 145       }
> >>> 146
> >>> 147       @Override public Socket createSocket(InetAddress host, int
> >> port,
> >>> 148           InetAddress local, int localPort) throws IOException {
> >>>
> >>> ** CID 170818:  Class hierarchy inconsistencies  (CALL_SUPER)
> >>> /core/src/main/java/org/apache/calcite/sql/validate/
> SqlValidatorUtil.java:
> >> 1007 in org.apache.calcite.sql.validate.SqlValidatorUtil$
> >> DeepCopier.visit(org.apache.calcite.sql.SqlLiteral)()
> >>>
> >>>
> >>> ____________________________________________________________
> >> ____________________________________________
> >>> *** CID 170818:  Class hierarchy inconsistencies  (CALL_SUPER)
> >>> /core/src/main/java/org/apache/calcite/sql/validate/
> SqlValidatorUtil.java:
> >> 1007 in org.apache.calcite.sql.validate.SqlValidatorUtil$
> >> DeepCopier.visit(org.apache.calcite.sql.SqlLiteral)()
> >>> 1001           ArgHandler<SqlNode> argHandler =
> >>> 1002               new CallCopyingArgHandler(call, true);
> >>> 1003           call.getOperator().acceptCall(this, call, false,
> >> argHandler);
> >>> 1004           return argHandler.result();
> >>> 1005         }
> >>> 1006
> >>>>>>   CID 170818:  Class hierarchy inconsistencies  (CALL_SUPER)
> >>>>>>   Missing call to "org.apache.calcite.sql.util.
> >> SqlShuttle.visit(org.apache.calcite.sql.SqlLiteral)" (as is done
> >> elsewhere 2 out of 3 times).
> >>> 1007         public SqlNode visit(SqlLiteral literal) {
> >>> 1008           return (SqlNode) literal.clone();
> >>> 1009         }
> >>> 1010
> >>> 1011         public SqlNode visit(SqlIdentifier id) {
> >>> 1012           // First check for builtin functions which don't have
> >> parentheses,
> >>>
> >>> ** CID 170804:    (NULL_RETURNS)
> >>> /druid/src/main/java/org/apache/calcite/adapter/druid/
> DruidDateTimeUtils.java:
> >> 219 in org.apache.calcite.adapter.druid.DruidDateTimeUtils.
> >> leafToRanges(org.apache.calcite.rex.RexCall, java.util.TimeZone,
> >> boolean)()
> >>> /druid/src/main/java/org/apache/calcite/adapter/druid/
> DruidDateTimeUtils.java:
> >> 214 in org.apache.calcite.adapter.druid.DruidDateTimeUtils.
> >> leafToRanges(org.apache.calcite.rex.RexCall, java.util.TimeZone,
> >> boolean)()
> >>>
> >>>
> >>> ____________________________________________________________
> >> ____________________________________________
> >>> *** CID 170804:    (NULL_RETURNS)
> >>> /druid/src/main/java/org/apache/calcite/adapter/druid/
> DruidDateTimeUtils.java:
> >> 219 in org.apache.calcite.adapter.druid.DruidDateTimeUtils.
> >> leafToRanges(org.apache.calcite.rex.RexCall, java.util.TimeZone,
> >> boolean)()
> >>> 213             value1 = literalValue(call.getOperands().get(2),
> >> timeZone);
> >>> 214             value2 = literalValue(call.getOperands().get(3),
> >> timeZone);
> >>> 215           } else {
> >>> 216             return null;
> >>> 217           }
> >>> 218
> >>>>>>   CID 170804:    (NULL_RETURNS)
> >>>>>>   Calling a method on null object "value1".
> >>> 219           boolean inverted = value1.compareTo(value2) > 0;
> >>> 220           if (!withNot) {
> >>> 221             return ImmutableList.of(
> >>> 222                 inverted ? Range.closed(value2, value1) :
> >> Range.closed(value1, value2));
> >>> 223           }
> >>> 224           return ImmutableList.of(Range.lessThan(inverted ? value2
> >> : value1),
> >>> /druid/src/main/java/org/apache/calcite/adapter/druid/
> DruidDateTimeUtils.java:
> >> 214 in org.apache.calcite.adapter.druid.DruidDateTimeUtils.
> >> leafToRanges(org.apache.calcite.rex.RexCall, java.util.TimeZone,
> >> boolean)()
> >>> 208         {
> >>> 209           final TimestampString value1;
> >>> 210           final TimestampString value2;
> >>> 211           if (literalValue(call.getOperands().get(2), timeZone) !=
> >> null
> >>> 212               && literalValue(call.getOperands().get(3), timeZone)
> >> != null) {
> >>> 213             value1 = literalValue(call.getOperands().get(2),
> >> timeZone);
> >>>>>>   CID 170804:    (NULL_RETURNS)
> >>>>>>   Assigning: "value2" = null return value from "literalValue".
> >>> 214             value2 = literalValue(call.getOperands().get(3),
> >> timeZone);
> >>> 215           } else {
> >>> 216             return null;
> >>> 217           }
> >>> 218
> >>> 219           boolean inverted = value1.compareTo(value2) > 0;
> >>>
> >>> ** CID 168769:  Integer handling issues  (BAD_SHIFT)
> >>> /core/src/main/java/org/apache/calcite/rel/rules/
> >> AggregateExpandDistinctAggregatesRule.java: 466 in
> >> org.apache.calcite.rel.rules.AggregateExpandDistinctAggrega
> >> tesRule.groupValue(org.apache.calcite.util.ImmutableBitSet,
> >> org.apache.calcite.util.ImmutableBitSet)()
> >>>
> >>>
> >>> ____________________________________________________________
> >> ____________________________________________
> >>> *** CID 168769:  Integer handling issues  (BAD_SHIFT)
> >>> /core/src/main/java/org/apache/calcite/rel/rules/
> >> AggregateExpandDistinctAggregatesRule.java: 466 in
> >> org.apache.calcite.rel.rules.AggregateExpandDistinctAggrega
> >> tesRule.groupValue(org.apache.calcite.util.ImmutableBitSet,
> >> org.apache.calcite.util.ImmutableBitSet)()
> >>> 460         call.transformTo(relBuilder.build());
> >>> 461       }
> >>> 462
> >>> 463       private static long groupValue(ImmutableBitSet fullGroupSet,
> >>> 464           ImmutableBitSet groupSet) {
> >>> 465         long v = 0;
> >>>>>>   CID 168769:  Integer handling issues  (BAD_SHIFT)
> >>>>>>   In expression "1L << fullGroupSet.cardinality() - 1", shifting by
> >> a negative amount implicitly performs a bit mask operation on the shift
> >> amount.  The shift amount, "fullGroupSet.cardinality() - 1", is -1.
> >>> 466         long x = 1L << (fullGroupSet.cardinality() - 1);
> >>> 467         assert fullGroupSet.contains(groupSet);
> >>> 468         for (int i : fullGroupSet) {
> >>> 469           if (!groupSet.get(i)) {
> >>> 470             v |= x;
> >>> 471           }
> >>>
> >>> ** CID 168768:  Concurrent data access violations
> (GUARDED_BY_VIOLATION)
> >>> /core/src/main/java/org/apache/calcite/adapter/jdbc/JdbcSchema.java:
> >> 168 in org.apache.calcite.adapter.jdbc.JdbcSchema.snapshot(org.
> >> apache.calcite.schema.SchemaVersion)()
> >>>
> >>>
> >>> ____________________________________________________________
> >> ____________________________________________
> >>> *** CID 168768:  Concurrent data access violations
> >> (GUARDED_BY_VIOLATION)
> >>> /core/src/main/java/org/apache/calcite/adapter/jdbc/JdbcSchema.java:
> >> 168 in org.apache.calcite.adapter.jdbc.JdbcSchema.snapshot(org.
> >> apache.calcite.schema.SchemaVersion)()
> >>> 162
> >>> 163       public boolean isMutable() {
> >>> 164         return false;
> >>> 165       }
> >>> 166
> >>> 167       public Schema snapshot(SchemaVersion version) {
> >>>>>>   CID 168768:  Concurrent data access violations
> >> (GUARDED_BY_VIOLATION)
> >>>>>>   Accessing "tableMap" without holding lock "JdbcSchema.this".
> >> Elsewhere, "org.apache.calcite.adapter.jdbc.JdbcSchema.tableMap" is
> >> accessed with "JdbcSchema.this" held 3 out of 4 times.
> >>> 168         return new JdbcSchema(dataSource, dialect, convention,
> >> catalog, schema,
> >>> 169             tableMap);
> >>> 170       }
> >>> 171
> >>> 172       // Used by generated code.
> >>> 173       public DataSource getDataSource() {
> >>>
> >>> ** CID 168767:  Null pointer dereferences  (NULL_RETURNS)
> >>> /elasticsearch2/src/main/java/org/apache/calcite/adapter/
> elasticsearch2/Elasticsearch2Schema.java:
> >> 97 in org.apache.calcite.adapter.elasticsearch2.Elasticsearch2Schema.
> >> getTableMap()()
> >>>
> >>>
> >>> ____________________________________________________________
> >> ____________________________________________
> >>> *** CID 168767:  Null pointer dereferences  (NULL_RETURNS)
> >>> /elasticsearch2/src/main/java/org/apache/calcite/adapter/
> elasticsearch2/Elasticsearch2Schema.java:
> >> 97 in org.apache.calcite.adapter.elasticsearch2.Elasticsearch2Schema.
> >> getTableMap()()
> >>> 91
> >>> 92         try {
> >>> 93           GetMappingsResponse response = client.admin().indices()
> >>> 94               .getMappings(new GetMappingsRequest().indices(index))
> >>> 95               .get();
> >>> 96           ImmutableOpenMap<String, MappingMetaData> mapping =
> >> response.getMappings().get(index);
> >>>>>>   CID 168767:  Null pointer dereferences  (NULL_RETURNS)
> >>>>>>   Calling a method on null object "mapping".
> >>> 97           for (ObjectObjectCursor<String, MappingMetaData> c:
> >> mapping) {
> >>> 98             builder.put(c.key, new Elasticsearch2Table(client,
> index,
> >> c.key));
> >>> 99           }
> >>> 100         } catch (RuntimeException e) {
> >>> 101           throw e;
> >>> 102         } catch (Exception e) {
> >>>
> >>> ** CID 163871:  Null pointer dereferences  (NULL_RETURNS)
> >>> /core/src/main/java/org/apache/calcite/sql/validate/
> SqlValidatorImpl.java:
> >> 5699 in org.apache.calcite.sql.validate.SqlValidatorImpl$
> >> ExtendedExpander.visit(org.apache.calcite.sql.SqlIdentifier)()
> >>>
> >>>
> >>> ____________________________________________________________
> >> ____________________________________________
> >>> *** CID 163871:  Null pointer dereferences  (NULL_RETURNS)
> >>> /core/src/main/java/org/apache/calcite/sql/validate/
> SqlValidatorImpl.java:
> >> 5699 in org.apache.calcite.sql.validate.SqlValidatorImpl$
> >> ExtendedExpander.visit(org.apache.calcite.sql.SqlIdentifier)()
> >>> 5693             }
> >>> 5694             if (havingExpr && validator.isAggregate(root)) {
> >>> 5695               return super.visit(id);
> >>> 5696             }
> >>> 5697             expr = stripAs(expr);
> >>> 5698             if (expr instanceof SqlIdentifier) {
> >>>>>>   CID 163871:  Null pointer dereferences  (NULL_RETURNS)
> >>>>>>   Calling a method on null object "getScope()".
> >>> 5699               expr = getScope().fullyQualify((SqlIdentifier)
> >> expr).identifier;
> >>> 5700             }
> >>> 5701             return expr;
> >>> 5702           }
> >>> 5703           return super.visit(id);
> >>> 5704         }
> >>>
> >>> ** CID 158939:  Resource leaks  (RESOURCE_LEAK)
> >>> /plus/src/main/java/org/apache/calcite/adapter/os/SqlShell.java: 145
> in
> >> org.apache.calcite.adapter.os.SqlShell.run()()
> >>>
> >>>
> >>> ____________________________________________________________
> >> ____________________________________________
> >>> *** CID 158939:  Resource leaks  (RESOURCE_LEAK)
> >>> /plus/src/main/java/org/apache/calcite/adapter/os/SqlShell.java: 145
> in
> >> org.apache.calcite.adapter.os.SqlShell.run()()
> >>> 139               } else {
> >>> 140                 throw new RuntimeException("missing format");
> >>> 141               }
> >>> 142             } else if (args.current().equals("-h")
> >>> 143                 || args.current().equals("--help")) {
> >>> 144               out.println(help);
> >>>>>>   CID 158939:  Resource leaks  (RESOURCE_LEAK)
> >>>>>>   Variable "args" going out of scope leaks the resource it refers
> to.
> >>> 145               return;
> >>> 146             } else {
> >>> 147               if (b.length() > 0) {
> >>> 148                 b.append(' ');
> >>> 149               }
> >>> 150               b.append(args.current());
> >>>
> >>> ** CID 158400:  Null pointer dereferences  (NULL_RETURNS)
> >>> /core/src/main/java/org/apache/calcite/schema/Schemas.java: 370 in
> >> org.apache.calcite.schema.Schemas.makeContext(org.apache.calcite.jdbc.
> CalciteConnection,
> >> org.apache.calcite.jdbc.CalciteSchema, java.util.List, java.util.List,
> >> com.google.common.collect.ImmutableMap)()
> >>>
> >>>
> >>> ____________________________________________________________
> >> ____________________________________________
> >>> *** CID 158400:  Null pointer dereferences  (NULL_RETURNS)
> >>> /core/src/main/java/org/apache/calcite/schema/Schemas.java: 370 in
> >> org.apache.calcite.schema.Schemas.makeContext(org.apache.calcite.jdbc.
> CalciteConnection,
> >> org.apache.calcite.jdbc.CalciteSchema, java.util.List, java.util.List,
> >> com.google.common.collect.ImmutableMap)()
> >>> 364       private static CalcitePrepare.Context makeContext(
> >>> 365           CalciteConnection connection, CalciteSchema schema,
> >>> 366           List<String> schemaPath, List<String> objectPath,
> >>> 367           final ImmutableMap<CalciteConnectionProperty, String>
> >> propValues) {
> >>> 368         if (connection == null) {
> >>> 369           final CalcitePrepare.Context context0 =
> >> CalcitePrepare.Dummy.peek();
> >>>>>>   CID 158400:  Null pointer dereferences  (NULL_RETURNS)
> >>>>>>   Calling a method on null object "context0".
> >>> 370           final CalciteConnectionConfig config =
> >>> 371               mutate(context0.config(), propValues);
> >>> 372           return makeContext(config, context0.getTypeFactory(),
> >>> 373               context0.getDataContext(), schema, schemaPath,
> >> objectPath);
> >>> 374         } else {
> >>> 375           final CalciteConnectionConfig config =
> >>>
> >>> ** CID 145626:  Null pointer dereferences  (NULL_RETURNS)
> >>> /core/src/main/java/org/apache/calcite/rel/rules/
> LoptOptimizeJoinRule.java:
> >> 1056 in org.apache.calcite.rel.rules.LoptOptimizeJoinRule.
> >> pushDownFactor(org.apache.calcite.rel.metadata.RelMetadataQuery,
> >> org.apache.calcite.tools.RelBuilder, org.apache.calcite.rel.rules.
> LoptMultiJoin,
> >> org.apache.calcite.rel.rules.LoptSemiJoinOptimizer,
> >> org.apache.calcite.rel.rules.LoptJoinTree, int, java.util.BitSet,
> >> java.util.List, boolean)()
> >>>
> >>>
> >>> ____________________________________________________________
> >> ____________________________________________
> >>> *** CID 145626:  Null pointer dereferences  (NULL_RETURNS)
> >>> /core/src/main/java/org/apache/calcite/rel/rules/
> LoptOptimizeJoinRule.java:
> >> 1056 in org.apache.calcite.rel.rules.LoptOptimizeJoinRule.
> >> pushDownFactor(org.apache.calcite.rel.metadata.RelMetadataQuery,
> >> org.apache.calcite.tools.RelBuilder, org.apache.calcite.rel.rules.
> LoptMultiJoin,
> >> org.apache.calcite.rel.rules.LoptSemiJoinOptimizer,
> >> org.apache.calcite.rel.rules.LoptJoinTree, int, java.util.BitSet,
> >> java.util.List, boolean)()
> >>> 1050         // If there are no constraints as to which side the factor
> >> must
> >>> 1051         // be pushed, arbitrarily push to the left.  In the case
> of
> >> a
> >>> 1052         // self-join, always push to the input that contains the
> >> other
> >>> 1053         // half of the self-join.
> >>> 1054         if (selfJoin) {
> >>> 1055           BitSet selfJoinFactor = new BitSet(multiJoin.
> >> getNumJoinFactors());
> >>>>>>   CID 145626:  Null pointer dereferences  (NULL_RETURNS)
> >>>>>>   Unboxing null object "multiJoin.getOtherSelfJoinFactor(
> >> factorToAdd)".
> >>> 1056           selfJoinFactor.set(multiJoin.getOtherSelfJoinFactor(
> >> factorToAdd));
> >>> 1057           if (multiJoin.hasAllFactors(left, selfJoinFactor)) {
> >>> 1058             childNo = 0;
> >>> 1059           } else {
> >>> 1060             assert multiJoin.hasAllFactors(right, selfJoinFactor);
> >>> 1061             childNo = 1;
> >>>
> >>> ** CID 145625:    (FORWARD_NULL)
> >>> /core/src/main/java/org/apache/calcite/rel/rules/
> LoptOptimizeJoinRule.java:
> >> 677 in org.apache.calcite.rel.rules.LoptOptimizeJoinRule.
> >> createOrdering(org.apache.calcite.rel.metadata.RelMetadataQuery,
> >> org.apache.calcite.tools.RelBuilder, org.apache.calcite.rel.rules.
> LoptMultiJoin,
> >> org.apache.calcite.rel.rules.LoptSemiJoinOptimizer, int)()
> >>> /core/src/main/java/org/apache/calcite/rel/rules/
> LoptOptimizeJoinRule.java:
> >> 677 in org.apache.calcite.rel.rules.LoptOptimizeJoinRule.
> >> createOrdering(org.apache.calcite.rel.metadata.RelMetadataQuery,
> >> org.apache.calcite.tools.RelBuilder, org.apache.calcite.rel.rules.
> LoptMultiJoin,
> >> org.apache.calcite.rel.rules.LoptSemiJoinOptimizer, int)()
> >>>
> >>>
> >>> ____________________________________________________________
> >> ____________________________________________
> >>> *** CID 145625:    (FORWARD_NULL)
> >>> /core/src/main/java/org/apache/calcite/rel/rules/
> LoptOptimizeJoinRule.java:
> >> 677 in org.apache.calcite.rel.rules.LoptOptimizeJoinRule.
> >> createOrdering(org.apache.calcite.rel.metadata.RelMetadataQuery,
> >> org.apache.calcite.tools.RelBuilder, org.apache.calcite.rel.rules.
> LoptMultiJoin,
> >> org.apache.calcite.rel.rules.LoptSemiJoinOptimizer, int)()
> >>> 671       private LoptJoinTree createOrdering(
> >>> 672           RelMetadataQuery mq,
> >>> 673           RelBuilder relBuilder,
> >>> 674           LoptMultiJoin multiJoin,
> >>> 675           LoptSemiJoinOptimizer semiJoinOpt,
> >>> 676           int firstFactor) {
> >>>>>>   CID 145625:    (FORWARD_NULL)
> >>>>>>   Assigning: "joinTree" = "null".
> >>> 677         LoptJoinTree joinTree = null;
> >>> 678         final int nJoinFactors = multiJoin.getNumJoinFactors();
> >>> 679         final BitSet factorsToAdd = BitSets.range(0, nJoinFactors);
> >>> 680         final BitSet factorsAdded = new BitSet(nJoinFactors);
> >>> 681         final List<RexNode> filtersToAdd =
> >>> 682             new ArrayList<>(multiJoin.getJoinFilters());
> >>> /core/src/main/java/org/apache/calcite/rel/rules/
> LoptOptimizeJoinRule.java:
> >> 677 in org.apache.calcite.rel.rules.LoptOptimizeJoinRule.
> >> createOrdering(org.apache.calcite.rel.metadata.RelMetadataQuery,
> >> org.apache.calcite.tools.RelBuilder, org.apache.calcite.rel.rules.
> LoptMultiJoin,
> >> org.apache.calcite.rel.rules.LoptSemiJoinOptimizer, int)()
> >>> 671       private LoptJoinTree createOrdering(
> >>> 672           RelMetadataQuery mq,
> >>> 673           RelBuilder relBuilder,
> >>> 674           LoptMultiJoin multiJoin,
> >>> 675           LoptSemiJoinOptimizer semiJoinOpt,
> >>> 676           int firstFactor) {
> >>>>>>   CID 145625:    (FORWARD_NULL)
> >>>>>>   Assigning: "joinTree" = "null".
> >>> 677         LoptJoinTree joinTree = null;
> >>> 678         final int nJoinFactors = multiJoin.getNumJoinFactors();
> >>> 679         final BitSet factorsToAdd = BitSets.range(0, nJoinFactors);
> >>> 680         final BitSet factorsAdded = new BitSet(nJoinFactors);
> >>> 681         final List<RexNode> filtersToAdd =
> >>> 682             new ArrayList<>(multiJoin.getJoinFilters());
> >>>
> >>> ** CID 142184:    (FORWARD_NULL)
> >>>
> >>>
> >>> ____________________________________________________________
> >> ____________________________________________
> >>> *** CID 142184:    (FORWARD_NULL)
> >>> /core/src/main/java/org/apache/calcite/rel/rel2sql/
> RelToSqlConverter.java:
> >> 391 in org.apache.calcite.rel.rel2sql.RelToSqlConverter.
> >> visit(org.apache.calcite.rel.core.Match)()
> >>> 385
> >>> 386         SqlNode tableRef = x.asQueryOrValues();
> >>> 387
> >>> 388         final List<SqlNode> partitionSqlList = new ArrayList<>();
> >>> 389         if (e.getPartitionKeys() != null) {
> >>> 390           for (RexNode rex : e.getPartitionKeys()) {
> >>>>>>   CID 142184:    (FORWARD_NULL)
> >>>>>>   Passing "null" to "toSql", which dereferences it. (The virtual
> >> call resolves to "org.apache.calcite.rel.rel2sql.SqlImplementor.
> >> Context.toSql".)
> >>> 391             SqlNode sqlNode = context.toSql(null, rex);
> >>> 392             partitionSqlList.add(sqlNode);
> >>> 393           }
> >>> 394         }
> >>> 395         final SqlNodeList partitionList = new
> >> SqlNodeList(partitionSqlList, POS);
> >>> 396
> >>> /core/src/main/java/org/apache/calcite/rel/rel2sql/
> RelToSqlConverter.java:
> >> 428 in org.apache.calcite.rel.rel2sql.RelToSqlConverter.
> >> visit(org.apache.calcite.rel.core.Match)()
> >>> 422           RexCall call = (RexCall) e.getAfter();
> >>> 423           String operand = RexLiteral.stringValue(call.
> >> getOperands().get(0));
> >>> 424           after = call.getOperator().createCall(POS, new
> >> SqlIdentifier(operand, POS));
> >>> 425         }
> >>> 426
> >>> 427         RexNode rexPattern = e.getPattern();
> >>>>>>   CID 142184:    (FORWARD_NULL)
> >>>>>>   Passing "null" to "toSql", which dereferences it. (The virtual
> >> call resolves to "org.apache.calcite.rel.rel2sql.SqlImplementor.
> >> Context.toSql".)
> >>> 428         final SqlNode pattern = context.toSql(null, rexPattern);
> >>> 429         final SqlLiteral strictStart = SqlLiteral.createBoolean(e.
> isStrictStart(),
> >> POS);
> >>> 430         final SqlLiteral strictEnd = SqlLiteral.createBoolean(e.
> isStrictEnd(),
> >> POS);
> >>> 431
> >>> 432         RexLiteral rexInterval = (RexLiteral) e.getInterval();
> >>> 433         SqlIntervalLiteral interval = null;
> >>> /core/src/main/java/org/apache/calcite/rel/rel2sql/
> RelToSqlConverter.java:
> >> 453 in org.apache.calcite.rel.rel2sql.RelToSqlConverter.
> >> visit(org.apache.calcite.rel.core.Match)()
> >>> 447                   new SqlNodeList(rhl, POS)));
> >>> 448         }
> >>> 449
> >>> 450         final SqlNodeList measureList = new SqlNodeList(POS);
> >>> 451         for (Map.Entry<String, RexNode> entry :
> >> e.getMeasures().entrySet()) {
> >>> 452           final String alias = entry.getKey();
> >>>>>>   CID 142184:    (FORWARD_NULL)
> >>>>>>   Passing "null" to "toSql", which dereferences it. (The virtual
> >> call resolves to "org.apache.calcite.rel.rel2sql.SqlImplementor.
> >> Context.toSql".)
> >>> 453           final SqlNode sqlNode = context.toSql(null,
> >> entry.getValue());
> >>> 454           measureList.add(as(sqlNode, alias));
> >>> 455         }
> >>> 456
> >>> 457         final SqlNodeList patternDefList = new SqlNodeList(POS);
> >>> 458         for (Map.Entry<String, RexNode> entry :
> >> e.getPatternDefinitions().entrySet()) {
> >>> /core/src/main/java/org/apache/calcite/rel/rel2sql/
> RelToSqlConverter.java:
> >> 460 in org.apache.calcite.rel.rel2sql.RelToSqlConverter.
> >> visit(org.apache.calcite.rel.core.Match)()
> >>> 454           measureList.add(as(sqlNode, alias));
> >>> 455         }
> >>> 456
> >>> 457         final SqlNodeList patternDefList = new SqlNodeList(POS);
> >>> 458         for (Map.Entry<String, RexNode> entry :
> >> e.getPatternDefinitions().entrySet()) {
> >>> 459           final String alias = entry.getKey();
> >>>>>>   CID 142184:    (FORWARD_NULL)
> >>>>>>   Passing "null" to "toSql", which dereferences it. (The virtual
> >> call resolves to "org.apache.calcite.rel.rel2sql.SqlImplementor.
> >> Context.toSql".)
> >>> 460           final SqlNode sqlNode = context.toSql(null,
> >> entry.getValue());
> >>> 461           patternDefList.add(as(sqlNode, alias));
> >>> 462         }
> >>> 463
> >>> 464         final SqlNode matchRecognize = new SqlMatchRecognize(POS,
> >> tableRef,
> >>> 465             pattern, strictStart, strictEnd, patternDefList,
> >> measureList, after,
> >>>
> >>> ** CID 141870:  Null pointer dereferences  (NULL_RETURNS)
> >>> /core/src/main/java/org/apache/calcite/rel/rules/DateRangeRules.java:
> >> 251 in org.apache.calcite.rel.rules.DateRangeRules$ExtractShuttle.
> visitList(java.util.List,
> >> boolean[])()
> >>>
> >>>
> >>> ____________________________________________________________
> >> ____________________________________________
> >>> *** CID 141870:  Null pointer dereferences  (NULL_RETURNS)
> >>> /core/src/main/java/org/apache/calcite/rel/rules/DateRangeRules.java:
> >> 251 in org.apache.calcite.rel.rules.DateRangeRules$ExtractShuttle.
> visitList(java.util.List,
> >> boolean[])()
> >>> 245
> >>> 246         @Override protected List<RexNode> visitList(List<? extends
> >> RexNode> exprs,
> >>> 247             boolean[] update) {
> >>> 248           if (exprs.isEmpty()) {
> >>> 249             return ImmutableList.of(); // a bit more efficient
> >>> 250           }
> >>>>>>   CID 141870:  Null pointer dereferences  (NULL_RETURNS)
> >>>>>>   Calling a method on null object "calls.peek()".
> >>> 251           switch (calls.peek().getKind()) {
> >>> 252           case AND:
> >>> 253             return super.visitList(exprs, update);
> >>> 254           default:
> >>> 255             final Map<String, RangeSet<Calendar>> save =
> >>> 256                 ImmutableMap.copyOf(operandRanges);
> >>>
> >>> ** CID 141868:  Null pointer dereferences  (NULL_RETURNS)
> >>> /file/src/main/java/org/apache/calcite/adapter/file/FileReader.java:
> 98
> >> in org.apache.calcite.adapter.file.FileReader.
> getSelectedTable(org.jsoup.nodes.Document,
> >> java.lang.String)()
> >>>
> >>>
> >>> ____________________________________________________________
> >> ____________________________________________
> >>> *** CID 141868:  Null pointer dereferences  (NULL_RETURNS)
> >>> /file/src/main/java/org/apache/calcite/adapter/file/FileReader.java:
> 98
> >> in org.apache.calcite.adapter.file.FileReader.
> getSelectedTable(org.jsoup.nodes.Document,
> >> java.lang.String)()
> >>> 92           el = list.first();
> >>> 93         } else {
> >>> 94           el = list.get(this.index);
> >>> 95         }
> >>> 96
> >>> 97         // verify element is a table
> >>>>>>   CID 141868:  Null pointer dereferences  (NULL_RETURNS)
> >>>>>>   Calling a method on null object "el".
> >>> 98         if (el.tag().getName().equals("table")) {
> >>> 99           return el;
> >>> 100         } else {
> >>> 101           throw new FileReaderException("selected (" + selector +
> ")
> >> element is a "
> >>> 102               + el.tag().getName() + ", not a table");
> >>> 103         }
> >>>
> >>> ** CID 140968:  Medium impact security  (RISKY_CRYPTO)
> >>> /core/src/main/java/org/apache/calcite/runtime/SocketFactoryImpl.java:
> >> 150 in org.apache.calcite.runtime.SocketFactoryImpl.createSocket(
> java.net.InetAddress,
> >> int, java.net.InetAddress, int)()
> >>>
> >>>
> >>> ____________________________________________________________
> >> ____________________________________________
> >>> *** CID 140968:  Medium impact security  (RISKY_CRYPTO)
> >>> /core/src/main/java/org/apache/calcite/runtime/SocketFactoryImpl.java:
> >> 150 in org.apache.calcite.runtime.SocketFactoryImpl.createSocket(
> java.net.InetAddress,
> >> int, java.net.InetAddress, int)()
> >>> 144         return s;
> >>> 145       }
> >>> 146
> >>> 147       @Override public Socket createSocket(InetAddress host, int
> >> port,
> >>> 148           InetAddress local, int localPort) throws IOException {
> >>> 149         Socket s  = createSocket();
> >>>>>>   CID 140968:  Medium impact security  (RISKY_CRYPTO)
> >>>>>>   Establishing an SSL connection using the default SSL protocols
> >> will enable SSLv3, which is known to be insecure. An attacker may be
> able
> >> to decrypt and extract sensitive data that is transmitted over the
> network.
> >>> 150         s.bind(new InetSocketAddress(local, localPort));
> >>> 151         s.connect(new InetSocketAddress(host, port),
> >> SO_CONNECT_TIMEOUT);
> >>> 152         return s;
> >>> 153       }
> >>> 154
> >>> 155       /**
> >>>
> >>> ** CID 140967:  Medium impact security  (RISKY_CRYPTO)
> >>> /core/src/main/java/org/apache/calcite/runtime/SocketFactoryImpl.java:
> >> 142 in org.apache.calcite.runtime.SocketFactoryImpl.
> createSocket(java.lang.String,
> >> int, java.net.InetAddress, int)()
> >>>
> >>>
> >>> ____________________________________________________________
> >> ____________________________________________
> >>> *** CID 140967:  Medium impact security  (RISKY_CRYPTO)
> >>> /core/src/main/java/org/apache/calcite/runtime/SocketFactoryImpl.java:
> >> 142 in org.apache.calcite.runtime.SocketFactoryImpl.
> createSocket(java.lang.String,
> >> int, java.net.InetAddress, int)()
> >>> 136         return s;
> >>> 137       }
> >>> 138
> >>> 139       @Override public Socket createSocket(String host, int port,
> >> InetAddress local,
> >>> 140           int localPort) throws IOException {
> >>> 141         Socket s  = createSocket();
> >>>>>>   CID 140967:  Medium impact security  (RISKY_CRYPTO)
> >>>>>>   Establishing an SSL connection using the default SSL protocols
> >> will enable SSLv3, which is known to be insecure. An attacker may be
> able
> >> to decrypt and extract sensitive data that is transmitted over the
> network.
> >>> 142         s.bind(new InetSocketAddress(local, localPort));
> >>> 143         s.connect(new InetSocketAddress(host, port),
> >> SO_CONNECT_TIMEOUT);
> >>> 144         return s;
> >>> 145       }
> >>> 146
> >>> 147       @Override public Socket createSocket(InetAddress host, int
> >> port,
> >>>
> >>>
> >>> ____________________________________________________________
> >> ____________________________________________
> >>> To view the defects in Coverity Scan visit,
> >> https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-
> >> 2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRan3op15YHpCm8RcaPivZ
> >> nSHnoLqw-2B7ufyYzK-2FxYZh70RsHioxilEcykXThc-2FHAC1vCuZqr481udaDNO-
> >> 2B26EkwN_imI2KYNsuEB01fwTN2GgVt7Zng1mYfKawcoWn3RVSCvef3fPyU-
> >> 2Fi0pV0DPPfm4SGJYexCZjnQThoTMj-2B1lY4Ew4Mlfambj37PzDaTQBnEOoL
> >> CTuARKZ88KKnstjXmpziSkivAmmTx5wbAznnKDKFe2tqamNSZLseGUXmhXcr
> >> sTPo5fgFIyZwefMU7qtttO8qJUu2i80WbtA0ctnTRJYvRg-3D-3D
> >>>
> >>> To manage Coverity Scan email notifications for "[email protected]",
> >> click https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-
> >> 2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRbVDbis712qZDP-
> >> 2FA8y06Nq4BoCAgQyGZbR5Ka-2BtqPkbMIRa0EKakQx2V3qCI3AQ17q
> >> Sid0ChoOurTSf7RECs1gZeliKSiqSYFeQV5NHgws1sYYu5KfGgq-2FqD0AylqtLo7E-3D_
> >> imI2KYNsuEB01fwTN2GgVt7Zng1mYfKawcoWn3RVSCvef3fPyU-
> 2Fi0pV0DPPfm4SG-2Bljg-
> >> 2FHVngtY7oHFBd2XIh-2B5dC8ZsSD3P1gqoWGwRkKH8Aw5vcYciYWgHBtvA-
> >> 2BKIIIiEp3rwg3NZulLl4KauwqElJdWMUxV5T4DqoXUkBrACt4ogc4tKlb92
> SEtIXIuH44ov-
> >> 2BxIp08g5KVzRSZXXvwg-3D-3D
> >>>
> >>
> >>
>
>

Reply via email to