> On March 27, 2018, 12:53 p.m., Peter Vary wrote: > > jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java > > Line 712 (original), 712 (patched) > > <https://reviews.apache.org/r/66290/diff/1/?file=1988690#file1988690line712> > > > > Is it possible to behave differently, when we have information about > > the number of rows, and when we do not know anything? The returned number > > will be 0 in this case, which might cause interesting behavior I guess :)
This is called only when resultSet is not present (like in insert queries). If it returns zero, it will display No rows affected, which is like the current behavior. > On March 27, 2018, 12:53 p.m., Peter Vary wrote: > > ql/src/java/org/apache/hadoop/hive/ql/Driver.java > > Lines 2213 (patched) > > <https://reviews.apache.org/r/66290/diff/1/?file=1988691#file1988691line2213> > > > > I think this information is only available when the execution engine is > > MR. Do we have information available when using Spark as an execution > > enginge? Currently in this JIRA, I am focussing on updating the count for MR as execution engine. I will create follow-up JIRA to have this working in Spark as well, once I have this fix in place. > On March 27, 2018, 12:53 p.m., Peter Vary wrote: > > service/src/java/org/apache/hive/service/cli/operation/Operation.java > > Line 186 (original), 186 (patched) > > <https://reviews.apache.org/r/66290/diff/1/?file=1988706#file1988706line186> > > > > I am not really confortable leaking the QueryState object here. It > > contains other sensitve informations too. It might be better to have a > > method to return the number of rows instead. What do you think? That is right, changing this to return only the numRows so we can avoid exposing entire queryState object. - Bharathkrishna ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/66290/#review200042 ----------------------------------------------------------- On March 26, 2018, 9:35 p.m., Bharathkrishna Guruvayoor Murali wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/66290/ > ----------------------------------------------------------- > > (Updated March 26, 2018, 9:35 p.m.) > > > Review request for hive, Sahil Takiar and Vihang Karajgaonkar. > > > Bugs: HIVE-14388 > https://issues.apache.org/jira/browse/HIVE-14388 > > > Repository: hive-git > > > Description > ------- > > Currently, when you run insert command on beeline, it returns a message > saying "No rows affected .." > A better and more intuitive msg would be "xxx rows inserted (26.068 seconds)" > > Added the numRows parameter as part of QueryState. > Adding the numRows to the response as well to display in beeline. > > Getting the count in FileSinkOperator and setting it in statsMap, when it > operates only on table specific rows for the particular operation. (so that > we can get only the insert to table count and avoid counting non-table > specific file-sink operations happening during query execution). > > > Diffs > ----- > > jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java > 06542cee02e5dc4696f2621bb45cc4f24c67dfda > ql/src/java/org/apache/hadoop/hive/ql/Driver.java > 75f928b69d3d7b206564216d24be450848a1fe8a > ql/src/java/org/apache/hadoop/hive/ql/MapRedStats.java > cf9c2273159c0d779ea90ad029613678fb0967a6 > ql/src/java/org/apache/hadoop/hive/ql/QueryState.java > 706c9ffa48b9c3b4a6fdaae78bab1d39c3d0efda > ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java > c084fa054cb771bfdb033d244935713e3c7eb874 > ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java > c28ef99621e67a5b16bf02a1112df2ec993c4f79 > ql/src/java/org/apache/hadoop/hive/ql/exec/mr/HadoopJobExecHelper.java > eb3a11a8815e35dee825edb7d3246c8ecef6b0a7 > service-rpc/if/TCLIService.thrift 30f8af7f3e6e0598b410498782900ac27971aef0 > service-rpc/src/gen/thrift/gen-cpp/TCLIService_types.h > 4321ad6d3c966d30f7a69552f91804cf2f1ba6c4 > service-rpc/src/gen/thrift/gen-cpp/TCLIService_types.cpp > b2b62c71492b844f4439367364c5c81aa62f3908 > > service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetOperationStatusResp.java > 15e8220eb3eb12b72c7b64029410dced33bc0d72 > service-rpc/src/gen/thrift/gen-php/Types.php > abb7c1ff3a2c8b72dc97689758266b675880e32b > service-rpc/src/gen/thrift/gen-py/TCLIService/ttypes.py > 0f8fd0745be0f4ed9e96b7bbe0f092d03649bcdf > service-rpc/src/gen/thrift/gen-rb/t_c_l_i_service_types.rb > 60183dae9e9927bd09a9676e49eeb4aea2401737 > service/src/java/org/apache/hive/service/cli/CLIService.java > c9914ba9bf8653cbcbca7d6612e98a64058c0fcc > service/src/java/org/apache/hive/service/cli/OperationStatus.java > 52cc3ae4f26b990b3e4edb52d9de85b3cc25f269 > service/src/java/org/apache/hive/service/cli/operation/Operation.java > 3706c72abc77ac8bd77947cc1c5d084ddf965e9f > service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java > c64c99120ad21ee98af81ec6659a2722e3e1d1c7 > > > Diff: https://reviews.apache.org/r/66290/diff/1/ > > > Testing > ------- > > > Thanks, > > Bharathkrishna Guruvayoor Murali > >