Unexpected frame structure in pyspark window function - sql

I am trying to understand how a frame is constructed when using a window function and seeing some unexpected behavior. This is the code (can be run as is):
from pyspark.sql import SparkSession
from pyspark.sql.types import StructField, StructType, FloatType, StringType, IntegerType
spark = SparkSession.builder.getOrCreate()
schema = StructType([StructField('product', StringType(), True),
StructField('category', StringType(), True),
StructField('revenue', IntegerType(), True)])
spark.createDataFrame(
[
("Thin", "Cell Phone", 6000),
("Normal", "Tablet", 1500),
("Mini", "Tablet", 5500),
("Ultra thin", "Cell Phone", 5000),
("Very thin", "Cell Phone", 6000),
("Big", "Tablet", 2500),
("Bendable", "Cell Phone", 3000),
("Foldable", "Cell Phone", 3000),
("Pro", "Tablet", 4500),
("Pro2", "Tablet", 6500),
] ,schema=schema ).createOrReplaceTempView("revenues")
# using collect list to print the contents of the current frame
# using min to show the unexpected behavior
spark.sql("""
select product,
category,
revenue,
collect_list((product, revenue)) over (partition by category order by revenue desc) frame,
min(revenue) over (partition by category order by revenue desc) as min
from revenues
""").show(truncate=False)
And this is the output:
+----------+----------+-------+-----------------------------------------------------------------------------------------+----+
|product |category |revenue|frame |min |
+----------+----------+-------+-----------------------------------------------------------------------------------------+----+
|Pro2 |Tablet |6500 |[[Pro2, 6500]] |6500|
|Mini |Tablet |5500 |[[Pro2, 6500], [Mini, 5500]] |5500|
|Pro |Tablet |4500 |[[Pro2, 6500], [Mini, 5500], [Pro, 4500]] |4500|
|Big |Tablet |2500 |[[Pro2, 6500], [Mini, 5500], [Pro, 4500], [Big, 2500]] |2500|
|Normal |Tablet |1500 |[[Pro2, 6500], [Mini, 5500], [Pro, 4500], [Big, 2500], [Normal, 1500]] |1500|
|Thin |Cell Phone|6000 |[[Thin, 6000], [Very thin, 6000]] |6000|
|Very thin |Cell Phone|6000 |[[Thin, 6000], [Very thin, 6000]] |6000|
|Ultra thin|Cell Phone|5000 |[[Thin, 6000], [Very thin, 6000], [Ultra thin, 5000]] |5000|
|Bendable |Cell Phone|3000 |[[Thin, 6000], [Very thin, 6000], [Ultra thin, 5000], [Bendable, 3000], [Foldable, 3000]]|3000|
|Foldable |Cell Phone|3000 |[[Thin, 6000], [Very thin, 6000], [Ultra thin, 5000], [Bendable, 3000], [Foldable, 3000]]|3000|
+----------+----------+-------+-----------------------------------------------------------------------------------------+----+
Now the question:
In this case, the window function does not specify any restrictions on the frame. I would expect the frame to be similar in all rows (and correspond to the full group of values).
In practice, I see that the frame expands (not sure according to what criteria).
This causes an incorrect value to be returned by the 'min' functions- 6500 for 'Tablet' category instead of 1500.
If I remove the order by clause in the window spec, I see the expected behavior:
collect_list((product, revenue)) over (partition by category) frame,
min(revenue) over (partition by category) as min
Yields:
+----------+----------+-------+-----------------------------------------------------------------------------------------+----+
|product |category |revenue|frame |min |
+----------+----------+-------+-----------------------------------------------------------------------------------------+----+
|Normal |Tablet |1500 |[[Normal, 1500], [Mini, 5500], [Big, 2500], [Pro, 4500], [Pro2, 6500]] |1500|
|Mini |Tablet |5500 |[[Normal, 1500], [Mini, 5500], [Big, 2500], [Pro, 4500], [Pro2, 6500]] |1500|
|Big |Tablet |2500 |[[Normal, 1500], [Mini, 5500], [Big, 2500], [Pro, 4500], [Pro2, 6500]] |1500|
|Pro |Tablet |4500 |[[Normal, 1500], [Mini, 5500], [Big, 2500], [Pro, 4500], [Pro2, 6500]] |1500|
|Pro2 |Tablet |6500 |[[Normal, 1500], [Mini, 5500], [Big, 2500], [Pro, 4500], [Pro2, 6500]] |1500|
|Thin |Cell Phone|6000 |[[Thin, 6000], [Ultra thin, 5000], [Very thin, 6000], [Bendable, 3000], [Foldable, 3000]]|3000|
|Ultra thin|Cell Phone|5000 |[[Thin, 6000], [Ultra thin, 5000], [Very thin, 6000], [Bendable, 3000], [Foldable, 3000]]|3000|
|Very thin |Cell Phone|6000 |[[Thin, 6000], [Ultra thin, 5000], [Very thin, 6000], [Bendable, 3000], [Foldable, 3000]]|3000|
|Bendable |Cell Phone|3000 |[[Thin, 6000], [Ultra thin, 5000], [Very thin, 6000], [Bendable, 3000], [Foldable, 3000]]|3000|
|Foldable |Cell Phone|3000 |[[Thin, 6000], [Ultra thin, 5000], [Very thin, 6000], [Bendable, 3000], [Foldable, 3000]]|3000|
+----------+----------+-------+-----------------------------------------------------------------------------------------+----+
Are my assumptions incorrect?
If so - What are the mechanics of frame construction in both cases?
Tested on Spark 3.0.1

This is the expected behaviour: the documentation states:
When ordering is not defined, an unbounded window frame (rowFrame, unboundedPreceding, unboundedFollowing) is used by default. When ordering is defined, a growing window frame (rangeFrame, unboundedPreceding, currentRow) is used by default.

Related

pandas read csv does not separating columns, too many columns?

I have tried many ways, but it still did not work
below is the data of the first row, how can I seperate them? is it because the number of column exceeds the limit?
1, Car, 48.85, 9.770344, 37.977391, 23.737688, 4.9178, 0.0518, -0.0299, 0.000000, 37.977391, 23.737688, 4.9207, -0.0124, -0.0354, 0.040000, 37.977391, 23.737688, 4.9160, -0.0519, -0.0413, 0.080000, 37.977390, 23.737688, 4.9057, -0.0914, -0.0478, 0.120000, 37.977390, 23.737689, 4.8871, -0.1679, -0.0550, 0.160000, 37.977389, 23.737689, 4.8547, -0.2815, -0.0628, 0.200000, 37.977389, 23.737689, 4.8033, -0.4320, -0.0713, 0.240000, 37.977388, 23.737690, 4.7318, -0.5617, -0.0804, 0.280000, 37.977388, 23.737690, 4.6442, -0.6543, -0.0905, 0.320000, 37.977388, 23.737690, 4.5437, -0.7413, -0.1017, 0.360000, 37.977387, 23.737690, 4.4311, -0.8227, -0.1143, 0.400000, 37.977387, 23.737691, 4.3046, -0.9354, -0.1285, 0.440000, 37.977386, 23.737691, 4.1600, -1.0729, -0.1439, 0.480000, 37.977386, 23.737691, 4.4411, -0.5617, -0.0949, 0.520000, 37.977385, 23.737692, 4.3561, -0.6183, -0.1044, 0.560000, 37.977385, 23.737692, 4.2639, -0.6621, -0.1133, 0.600000, 37.977384, 23.737692, 4.1654, -0.7059, -0.1219, 0.640000, 37.977384, 23.737692, 4.0595, -0.7660, -0.1298, 0.680000, 37.977384, 23.737693, 3.9439, -0.8388, -0.1369, 0.720000, 37.977383, 23.737693, 3.8183, -0.9065, -0.1430, 0.760000, 37.977383, 23.737693, 3.6842, -0.9561, -0.1484, 0.800000, 37.977383, 23.737693, 3.5447, -0.9812, -0.1530, 0.840000, 37.977382, 23.737694, 3.4018, -1.0035, -0.1567, 0.880000, 37.977382, 23.737694, 3.2559, -1.0228, -0.1593, 0.920000, 37.977382, 23.737694, 3.1076, -1.0370, -0.1610, 0.960000, 37.977381, 23.737694, 2.9576, -1.0458, -0.1618, 1.000000, 37.977381, 23.737695, 2.8081, -1.0303, -0.1618, 1.040000, 37.977381, 23.737695, 2.6611, -1.0118, -0.1604, 1.080000, 37.977381, 23.737695, 2.5170, -0.9904, -0.1573, 1.120000, 37.977381, 23.737695, 2.3763, -0.9638, -0.1525, 1.160000, 37.977380, 23.737695, 2.2398, -0.9320, -0.1460, 1.200000, 37.977380, 23.737695, 2.1096, -0.8757, -0.1377, 1.240000, 37.977380, 23.737695, 1.9883, -0.8090, -0.1276, 1.280000, 37.977380, 23.737696, 1.8768, -0.7394, -0.1154, 1.320000, 37.977380, 23.737696, 1.7751, -0.6739, -0.1014, 1.360000, 37.977380, 23.737696, 1.6823, -0.6145, -0.0855, 1.400000, 37.977380, 23.737696, 1.5988, -0.5450, -0.0675, 1.440000, 37.977380, 23.737696, 1.5264, -0.4611, -0.0477, 1.480000, 37.977380, 23.737696, 1.4666, -0.3696, -0.0283, 1.520000, 37.977380, 23.737696, 1.4197, -0.2816, -0.0099, 1.560000, 37.977379, 23.737696, 1.3844, -0.2080, 0.0065, 1.600000, 37.977379, 23.737696, 1.3586, -0.1507, 0.0209, 1.640000, 37.977379, 23.737696, 1.3406, -0.0995, 0.0337, 1.680000, 37.977379, 23.737696, 1.3298, -0.0502, 0.0457, 1.720000, 37.977379, 23.737697, 1.3266, 0.0054, 0.0567, 1.760000, 37.977379, 23.737697, 1.3316, 0.0637, 0.0666, 1.800000, 37.977379, 23.737697, 1.3438, 0.1067, 0.0751, 1.840000, 37.977379, 23.737697, 1.3615, 0.1384, 0.0826, 1.880000, 37.977379, 23.737697, 1.3829, 0.1588, 0.0891, 1.920000, 37.977379, 23.737697, 1.4077, 0.1854, 0.0946, 1.960000, 37.977379, 23.737697, 1.4367, 0.2183, 0.0989, 2.000000, 37.977378, 23.737697, 1.4694, 0.2359, 0.1020, 2.040000, 37.977378, 23.737697, 1.5038, 0.2422, 0.1042, 2.080000, 37.977378, 23.737697, 1.5384, 0.2371, 0.1055, 2.120000, 37.977378, 23.737698, 1.5726, 0.2383, 0.1053, 2.160000, 37.977378, 23.737698, 1.6074, 0.2457, 0.1033, 2.200000, 37.977378, 23.737698, 1.6422, 0.2379, 0.0995, 2.240000, 37.977378, 23.737698, 1.6752, 0.2193, 0.0940, 2.280000, 37.977377, 23.737698, 1.7046, 0.1895, 0.0867, 2.320000, 37.977377, 23.737698, 1.7296, 0.1574, 0.0773, 2.360000, 37.977377, 23.737698, 1.7503, 0.1307, 0.0657, 2.400000, 37.977377, 23.737698, 1.7669, 0.0993, 0.0521, 2.440000, 37.977377, 23.737698, 1.7787, 0.0652, 0.0367, 2.480000, 37.977377, 23.737699, 1.7857, 0.0317, 0.0203, 2.520000, 37.977376, 23.737699, 1.7876, -0.0060, 0.0035, 2.560000, 37.977376, 23.737699, 1.7842, -0.0411, -0.0115, 2.600000, 37.977376, 23.737699, 1.7765, -0.0660, -0.0241, 2.640000, 37.977376, 23.737699, 1.7656, -0.0855, -0.0344, 2.680000, 37.977376, 23.737699, 1.7524, -0.0975, -0.0423, 2.720000, 37.977376, 23.737699, 1.7377, -0.1062, -0.0481, 2.760000, 37.977375, 23.737699, 1.7217, -0.1158, -0.0525, 2.800000, 37.977375, 23.737699, 1.7049, -0.1182, -0.0557, 2.840000, 37.977375, 23.737700, 1.6876, -0.1215, -0.0576, 2.880000, 37.977375, 23.737700, 1.6698, -0.1257, -0.0582, 2.920000, 37.977375, 23.737700, 1.6517, -0.1266, -0.0577, 2.960000, 37.977375, 23.737700, 1.6336, -0.1243, -0.0561, 3.000000, 37.977375, 23.737700, 1.6164, -0.1147, -0.0534, 3.040000, 37.977374, 23.737700, 1.6005, -0.1061, -0.0498, 3.080000, 37.977374, 23.737700, 1.5858, -0.0983, -0.0453, 3.120000, 37.977374, 23.737700, 1.5724, -0.0873, -0.0402, 3.160000, 37.977374, 23.737700, 1.5609, -0.0730, -0.0342, 3.200000, 37.977374, 23.737700, 1.5519, -0.0515, -0.0275, 3.240000, 37.977374, 23.737701, 1.5460, -0.0307, -0.0199, 3.280000, 37.977374, 23.737701, 1.5430, -0.0108, -0.0118, 3.320000, 37.977374, 23.737701, 1.5430, 0.0115, -0.0031, 3.360000, 37.977373, 23.737701, 1.5465, 0.0368, 0.0062, 3.400000, 37.977373, 23.737701, 1.5542, 0.0698, 0.0164, 3.440000, 37.977373, 23.737701, 1.5670, 0.1081, 0.0272, 3.480000, 37.977373, 23.737701, 1.5853, 0.1467, 0.0382, 3.520000, 37.977373, 23.737701, 1.6091, 0.1830, 0.0491, 3.560000, 37.977373, 23.737701, 1.6377, 0.2140, 0.0593, 3.600000, 37.977373, 23.737701, 1.6704, 0.2403, 0.0685, 3.640000, 37.977373, 23.737702, 1.7071, 0.2695, 0.0768, 3.680000, 37.977373, 23.737702, 1.7480, 0.2993, 0.0843, 3.720000, 37.977372, 23.737702, 1.7930, 0.3255, 0.0908, 3.760000, 37.977372, 23.737702, 1.8414, 0.3460, 0.0960, 3.800000, 37.977372, 23.737702, 1.8918, 0.3548, 0.1000, 3.840000, 37.977372, 23.737702, 1.9435, 0.3634, 0.1029, 3.880000, 37.977372, 23.737702, 1.9964, 0.3717, 0.1045, 3.920000, 37.977372, 23.737702, 2.0503, 0.3764, 0.1050, 3.960000, 37.977371, 23.737702, 2.1046, 0.3775, 0.1043, 4.000000, 37.977371, 23.737703, 2.1582, 0.3670, 0.1026, 4.040000, 37.977371, 23.737703, 2.2102, 0.3562, 0.0999, 4.080000, 37.977371, 23.737703, 2.2607, 0.3451, 0.0960, 4.120000, 37.977371, 23.737703, 2.3094, 0.3304, 0.0911, 4.160000, 37.977370, 23.737703, 2.3556, 0.3122, 0.0853, 4.200000, 37.977370, 23.737703, 2.3984, 0.2823, 0.0788, 4.240000, 37.977370, 23.737703, 2.4369, 0.2516, 0.0714, 4.280000, 37.977370, 23.737704, 2.4709, 0.2206, 0.0630, 4.320000, 37.977369, 23.737704, 2.5002, 0.1866, 0.0537, 4.360000, 37.977369, 23.737704, 2.5244, 0.1498, 0.0434, 4.400000, 37.977369, 23.737704, 2.5426, 0.1025, 0.0323, 4.440000, 37.977369, 23.737704, 2.5534, 0.0477, 0.0204, 4.480000, 37.977368, 23.737704, 2.5563, -0.0077, 0.0082, 4.520000, 37.977368, 23.737704, 2.5513, -0.0607, -0.0041, 4.560000, 37.977368, 23.737705, 2.5393, -0.1061, -0.0160, 4.600000, 37.977368, 23.737705, 2.5213, -0.1438, -0.0275, 4.640000, 37.977367, 23.737705, 2.4977, -0.1844, -0.0385, 4.680000, 37.977367, 23.737705, 2.4683, -0.2247, -0.0487, 4.720000, 37.977367, 23.737705, 2.4333, -0.2605, -0.0579, 4.760000, 37.977367, 23.737705, 2.3937, -0.2895, -0.0663, 4.800000, 37.977366, 23.737705, 2.3511, -0.3025, -0.0740, 4.840000, 37.977366, 23.737705, 2.3066, -0.3149, -0.0807, 4.880000, 37.977366, 23.737706, 2.2605, -0.3264, -0.0864, 4.920000, 37.977366, 23.737706, 2.2129, -0.3335, -0.0911, 4.960000, 37.977365, 23.737706, 2.1647, -0.3360, -0.0949, 5.000000, 37.977365, 23.737706, 2.1173, -0.3228, -0.0978, 5.040000, 37.977365, 23.737706, 2.0718, -0.3087, -0.0998, 5.080000, 37.977365, 23.737706, 2.0285, -0.2939, -0.1008, 5.120000, 37.977365, 23.737706, 1.9875, -0.2746, -0.1008, 5.160000, 37.977365, 23.737706, 1.9497, -0.2507, -0.0999, 5.200000, 37.977364, 23.737707, 1.9165, -0.2110, -0.0981, 5.240000, 37.977364, 23.737707, 1.8890, -0.1702, -0.0953, 5.280000, 37.977364, 23.737707, 1.8675, -0.1287, -0.0916, 5.320000, 37.977364, 23.737707, 1.8523, -0.0826, -0.0870, 5.360000, 37.977364, 23.737707, 1.8440, -0.0325, -0.0815, 5.400000, 37.977364, 23.737707, 1.8440, 0.0321, -0.0750, 5.440000, 37.977364, 23.737707, 1.8540, 0.1068, -0.0675, 5.480000, 37.977364, 23.737707, 1.8747, 0.1818, -0.0593, 5.520000, 37.977363, 23.737707, 1.9061, 0.2537, -0.0507, 5.560000, 37.977363, 23.737707, 1.9471, 0.3157, -0.0421, 5.600000, 37.977363, 23.737708, 1.9963, 0.3671, -0.0334, 5.640000, 37.977363, 23.737708, 2.0531, 0.4226, -0.0247, 5.680000, 37.977363, 23.737708, 2.1179, 0.4776, -0.0159, 5.720000, 37.977363, 23.737708, 2.1902, 0.5257, -0.0071, 5.760000, 37.977363, 23.737708, 2.2686, 0.5640, 0.0011, 5.800000, 37.977362, 23.737708, 2.3510, 0.5805, 0.0088, 5.840000, 37.977362, 23.737708, 2.4358, 0.5965, 0.0161, 5.880000, 37.977362, 23.737709, 2.5228, 0.6120, 0.0230, 5.920000, 37.977362, 23.737709, 2.6115, 0.6206, 0.0295, 5.960000, 37.977362, 23.737709, 2.7010, 0.6224, 0.0353, 6.000000, 37.977361, 23.737709, 2.7892, 0.6024, 0.0404, 6.040000, 37.977361, 23.737709, 2.8745, 0.5818, 0.0450, 6.080000, 37.977361, 23.737710, 2.9568, 0.5608, 0.0490, 6.120000, 37.977361, 23.737710, 3.0355, 0.5330, 0.0525, 6.160000, 37.977360, 23.737710, 3.1098, 0.4984, 0.0553, 6.200000, 37.977360, 23.737710, 3.1775, 0.4419, 0.0576, 6.240000, 37.977360, 23.737711, 3.2362, 0.3740, 0.0594, 6.280000, 37.977360, 23.737711, 3.2851, 0.3056, 0.0606, 6.320000, 37.977359, 23.737711, 3.3249, 0.2465, 0.0612, 6.360000, 37.977359, 23.737711, 3.3568, 0.1970, 0.0613, 6.400000, 37.977359, 23.737712, 3.3813, 0.1427, 0.0610, 6.440000, 37.977358, 23.737712, 3.3969, 0.0741, 0.0602, 6.480000, 37.977358, 23.737712, 3.4018, -0.0054, 0.0590, 6.520000, 37.977358, 23.737712, 3.3956, -0.0805, 0.0576, 6.560000, 37.977357, 23.737713, 3.3797, -0.1413, 0.0563, 6.600000, 37.977357, 23.737713, 3.3560, -0.1875, 0.0552, 6.640000, 37.977357, 23.737713, 3.3264, -0.2242, 0.0542, 6.680000, 37.977356, 23.737713, 3.2915, -0.2605, 0.0533, 6.720000, 37.977356, 23.737714, 3.2503, -0.3108, 0.0524, 6.760000, 37.977356, 23.737714, 3.2013, -0.3705, 0.0516, 6.800000, 37.977355, 23.737714, 3.1442, -0.4228, 0.0508, 6.840000, 37.977355, 23.737714, 3.0807, -0.4586, 0.0501, 6.880000, 37.977355, 23.737714, 3.0133, -0.4780, 0.0495, 6.920000, 37.977355, 23.737715, 2.9420, -0.5114, 0.0489, 6.960000, 37.977354, 23.737715, 2.8650, -0.5589, 0.0483, 7.000000, 37.977354, 23.737715, 2.7816, -0.5990, 0.0476, 7.040000, 37.977354, 23.737715, 2.6937, -0.6226, 0.0468, 7.080000, 37.977354, 23.737715, 2.6035, -0.6297, 0.0460, 7.120000, 37.977354, 23.737715, 2.5113, -0.6507, 0.0450, 7.160000, 37.977353, 23.737716, 2.4151, -0.6858, 0.0439, 7.200000, 37.977353, 23.737716, 2.3144, -0.7134, 0.0426, 7.240000, 37.977353, 23.737716, 2.2103, -0.7313, 0.0413, 7.280000, 37.977353, 23.737716, 2.1049, -0.7327, 0.0398, 7.320000, 37.977353, 23.737716, 1.9998, -0.7272, 0.0383, 7.360000, 37.977352, 23.737716, 1.8952, -0.7258, 0.0367, 7.400000, 37.977352, 23.737716, 1.7908, -0.7236, 0.0351, 7.440000, 37.977352, 23.737717, 1.6872, -0.7160, 0.0333, 7.480000, 37.977352, 23.737717, 1.5833, -0.7270, 0.0316, 7.520000, 37.977352, 23.737717, 1.4829, -0.6960, 0.0299, 7.560000, 37.977352, 23.737717, 1.3868, -0.6678, 0.0281, 7.600000, 37.977351, 23.737717, 1.2944, -0.6444, 0.0264, 7.640000, 37.977351, 23.737717, 1.2049, -0.6281, 0.0246, 7.680000, 37.977351, 23.737717, 1.1169, -0.6234, 0.0229, 7.720000, 37.977351, 23.737717, 1.0293, -0.6153, 0.0213, 7.760000, 37.977351, 23.737717, 0.9429, -0.6068, 0.0196, 7.800000, 37.977351, 23.737717, 0.8581, -0.5930, 0.0180, 7.840000, 37.977351, 23.737717, 0.7757, -0.5742, 0.0166, 7.880000, 37.977351, 23.737717, 0.6964, -0.5501, 0.0158, 7.920000, 37.977351, 23.737717, 0.6204, -0.5286, 0.0143, 7.960000, 37.977351, 23.737717, 0.5473, -0.5110, 0.0131, 8.000000, 37.977351, 23.737717, 0.4773, -0.4863, 0.0117, 8.040000, 37.977351, 23.737717, 0.4112, -0.4562, 0.0103, 8.080000, 37.977351, 23.737717, 0.3498, -0.4208, 0.0090, 8.120000, 37.977351, 23.737717, 0.2933, -0.3892, 0.0077, 8.160000, 37.977351, 23.737717, 0.2405, -0.3690, 0.0077, 8.200000, 37.977351, 23.737717, 0.1925, -0.3337, 0.0069, 8.240000, 37.977351, 23.737717, 0.1496, -0.2968, 0.0060, 8.280000, 37.977351, 23.737717, 0.1127, -0.2527, 0.0053, 8.320000, 37.977351, 23.737717, 0.0826, -0.2006, 0.0048, 8.360000, 37.977351, 23.737717, 0.0594, -0.1573, 0.0041, 8.400000, 37.977351, 23.737717, 0.0424, -0.0710, 0.0030, 8.440000, 37.977351, 23.737717, 0.0360, -0.0097, 0.0026, 8.480000, 37.977351, 23.737717, 0.0389, 0.0577, 0.0024, 8.520000, 37.977351, 23.737717, 0.0510, 0.1194, 0.0023, 8.560000, 37.977351, 23.737717, 0.0734, 0.1993, 0.0023, 8.600000, 37.977351, 23.737717, 0.1028, 0.2464, 0.0023, 8.640000, 37.977351, 23.737717, 0.1399, 0.3060, 0.0023, 8.680000, 37.977351, 23.737717, 0.1852, 0.3597, 0.0023, 8.720000, 37.977351, 23.737717, 0.2373, 0.4008, 0.0023, 8.760000, 37.977351, 23.737717, 0.2947, 0.4341, 0.0022, 8.800000, 37.977351, 23.737717, 0.3561, 0.4491, 0.0019, 8.840000, 37.977351, 23.737717, 0.4206, 0.4769, 0.0019, 8.880000, 37.977351, 23.737717, 0.4896, 0.5122, 0.0018, 8.920000, 37.977351, 23.737717, 0.5629, 0.5368, 0.0016, 8.960000, 37.977351, 23.737717, 0.6390, 0.5503, 0.0008, 9.000000, 37.977351, 23.737717, 0.7161, 0.5517, 0.0007, 9.040000, 37.977351, 23.737717, 0.7938, 0.5608, 0.0003, 9.080000, 37.977351, 23.737717, 0.8733, 0.5756, 0.0001, 9.120000, 37.977351, 23.737718, 0.9541, 0.5795, -0.0000, 9.160000, 37.977351, 23.737718, 1.0347, 0.5724, -0.0001, 9.200000, 37.977350, 23.737718, 1.1134, 0.5543, -0.0002, 9.240000, 37.977350, 23.737718, 1.1900, 0.5425, -0.0013, 9.280000, 37.977350, 23.737718, 1.2640, 0.5284, -0.0016, 9.320000, 37.977350, 23.737718, 1.3363, 0.5205, -0.0016, 9.360000, 37.977350, 23.737718, 1.4076, 0.5132, -0.0017, 9.400000, 37.977350, 23.737718, 1.4776, 0.5033, -0.0017, 9.440000, 37.977350, 23.737718, 1.5462, 0.4938, -0.0016, 9.480000, 37.977349, 23.737718, 1.6131, 0.4350, -0.0009, 9.520000, 37.977349, 23.737719, 1.6735, 0.4043, -0.0008, 9.560000, 37.977349, 23.737719, 1.7293, 0.3705, -0.0008, 9.600000, 37.977349, 23.737719, 1.7805, 0.3406, -0.0008, 9.640000, 37.977349, 23.737719, 1.8274, 0.3099, -0.0008, 9.680000, 37.977349, 23.737719, 1.8692, 0.2709, -0.0008, 9.720000, 37.977348, 23.737719, 1.9046, 0.2208, -0.0008, 9.760000, 37.977348, 23.737719, 1.9327, 0.1694, -0.0007, 9.800000, 37.977348, 23.737720, 1.9539, 0.1255, -0.0007, 9.840000, 37.977348, 23.737720, 1.9698, 0.0950, -0.0006, 9.880000, 37.977348, 23.737720, 1.9822, 0.0781, -0.0006, 9.920000, 37.977348, 23.737720, 1.9915, 0.0501, -0.0005, 9.960000, 37.977347, 23.737720, 1.9959, 0.0110, -0.0004, 10.000000, 37.977347, 23.737720, 1.9952, -0.0206, -0.0003, 10.040000, 37.977347, 23.737720, 1.9909, -0.0385, -0.0001, 10.080000, 37.977347, 23.737721, 1.9851, -0.0429, 0.0000, 10.120000, 37.977347, 23.737721, 1.9778, -0.0584, 0.0002, 10.160000, 37.977347, 23.737721, 1.9675, -0.0849, 0.0004, 10.200000, 37.977346, 23.737721, 1.9539, -0.1040, 0.0006, 10.240000, 37.977346, 23.737721, 1.9387, -0.1072, 0.0009, 10.280000, 37.977346, 23.737721, 1.9240, -0.0969, 0.0011, 10.320000, 37.977346, 23.737721, 1.9103, -0.0922, 0.0013, 10.360000, 37.977346, 23.737721, 1.8964, -0.1019, 0.0016, 10.400000, 37.977346, 23.737722, 1.8803, -0.1213, 0.0018, 10.440000, 37.977345, 23.737722, 1.8612, -0.1447, 0.0021, 10.480000, 37.977345, 23.737722, 1.8388, -0.1657, 0.0023, 10.520000, 37.977345, 23.737722, 1.8140, -0.1794, 0.0025, 10.560000, 37.977345, 23.737722, 1.7874, -0.1890, 0.0026, 10.600000, 37.977345, 23.737722, 1.7592, -0.2036, 0.0027, 10.640000, 37.977345, 23.737722, 1.7277, -0.2328, 0.0028, 10.680000, 37.977344, 23.737723, 1.6915, -0.2709, 0.0029, 10.720000, 37.977344, 23.737723, 1.6503, -0.3008, 0.0029, 10.760000, 37.977344, 23.737723, 1.6060, -0.3149, 0.0029, 10.800000, 37.977344, 23.737723, 1.5607, -0.3147, 0.0028, 10.840000, 37.977344, 23.737723, 1.5151, -0.3181, 0.0027, 10.880000, 37.977344, 23.737723, 1.4688, -0.3250, 0.0026, 10.920000, 37.977344, 23.737723, 1.4221, -0.3235, 0.0026, 10.960000, 37.977343, 23.737723, 1.3762, -0.3137, 0.0026, 11.000000, 37.977343, 23.737723, 1.3328, -0.2895, 0.0027, 11.040000, 37.977343, 23.737724, 1.2926, -0.2687, 0.0027, 11.080000, 37.977343, 23.737724, 1.2551, -0.2515, 0.0024, 11.120000, 37.977343, 23.737724, 1.2208, -0.2260, 0.0017, 11.160000, 37.977343, 23.737724, 1.1907, -0.1923, 0.0008, 11.200000, 37.977343, 23.737724, 1.1664, -0.1442, -0.0004, 11.240000, 37.977343, 23.737724, 1.1503, -0.0800, -0.0017, 11.280000, 37.977343, 23.737724, 1.1431, -0.0193, -0.0029, 11.320000, 37.977343, 23.737724, 1.1430, 0.0180, -0.0041, 11.360000, 37.977343, 23.737724, 1.1468, 0.0342, -0.0053, 11.400000, 37.977343, 23.737724, 1.1521, 0.0390, -0.0064, 11.440000, 37.977342, 23.737724, 1.1589, 0.0557, -0.0074, 11.480000, 37.977342, 23.737724, 1.1695, 0.0920, -0.0079, 11.520000, 37.977342, 23.737724, 1.1850, 0.1227, -0.0077, 11.560000, 37.977342, 23.737724, 1.2040, 0.1415, -0.0067, 11.600000, 37.977342, 23.737724, 1.2250, 0.1508, -0.0048, 11.640000, 37.977342, 23.737724, 1.2459, 0.1390, -0.0022, 11.680000, 37.977342, 23.737725, 1.2652, 0.1296, 0.0003, 11.720000, 37.977342, 23.737725, 1.2857, 0.1552, 0.0024, 11.760000, 37.977342, 23.737725, 1.3121, 0.2104, 0.0041, 11.800000, 37.977342, 23.737725, 1.3476, 0.2829, 0.0055, 11.840000, 37.977342, 23.737725, 1.3914, 0.3259, 0.0065, 11.880000, 37.977341, 23.737725, 1.4393, 0.3395, 0.0077, 11.920000, 37.977341, 23.737725, 1.4917, 0.3883, 0.0090, 11.960000, 37.977341, 23.737725, 1.5537, 0.4724, 0.0105, 12.000000, 37.977341, 23.737725, 1.6290, 0.5738, 0.0123, 12.040000, 37.977341, 23.737726, 1.7168, 0.6457, 0.0143, 12.080000, 37.977341, 23.737726, 1.8129, 0.6881, 0.0163, 12.120000, 37.977340, 23.737726, 1.9175, 0.7656, 0.0183, 12.160000, 37.977340, 23.737726, 2.0359, 0.8783, 0.0206, 12.200000, 37.977340, 23.737726, 2.1717, 1.0083, 0.0234, 12.240000, 37.977340, 23.737726, 2.3253, 1.1252, 0.0265, 12.280000, 37.977340, 23.737726, 2.4937, 1.2128, 0.0298, 12.320000, 37.977340, 23.737726, 2.6740, 1.2915, 0.0333, 12.360000, 37.977340, 23.737726, 2.8664, 1.3810, 0.0368, 12.400000, 37.977339, 23.737727, 3.0733, 1.4927, 0.0403, 12.440000, 37.977339, 23.737727, 3.2985, 1.6354, 0.0438, 12.480000, 37.977339, 23.737727, 3.5455, 1.7943, 0.0474, 12.520000, 37.977339, 23.737727, 3.8136, 1.9298, 0.0510, 12.560000, 37.977339, 23.737727, 4.0990, 2.0343, 0.0542, 12.600000, 37.977338, 23.737727, 4.3987, 2.1273, 0.0569, 12.640000, 37.977338, 23.737728, 4.7125, 2.2311, 0.0589, 12.680000, 37.977338, 23.737728, 5.0426, 2.3545, 0.0602, 12.720000, 37.977337, 23.737728, 5.3915, 2.4910, 0.0610, 12.760000, 37.977337, 23.737729, 5.7593, 2.6173, 0.0621, 12.800000, 37.977336, 23.737729, 6.1429, 2.7103, 0.0637, 12.840000, 37.977336, 23.737729, 6.5381, 2.7789, 0.0659, 12.880000, 37.977335, 23.737730, 6.9415, 2.8231, 0.0687, 12.920000, 37.977335, 23.737730, 7.3521, 2.8807, 0.0720, 12.960000, 37.977334, 23.737731, 7.7721, 2.9515, 0.0755, 13.000000, 37.977333, 23.737731, 8.1998, 2.9889, 0.0790, 13.040000, 37.977333, 23.737732, 8.6311, 3.0019, 0.0825, 13.080000, 37.977332, 23.737732, 9.0626, 2.9903, 0.0859, 13.120000, 37.977331, 23.737733, 9.4933, 2.9921, 0.0893, 13.160000, 37.977330, 23.737734, 9.9252, 3.0071, 0.0928, 13.200000, 37.977329, 23.737734, 10.3569, 2.9887, 0.0966, 13.240000, 37.977328, 23.737735, 10.7843, 2.9473, 0.1007, 13.280000, 37.977327, 23.737736, 11.2040, 2.8814, 0.1049, 13.320000, 37.977326, 23.737736, 11.6138, 2.8106, 0.1094, 13.360000, 37.977325, 23.737737, 12.0143, 2.7511, 0.1142, 13.400000, 37.977324, 23.737738, 12.4053, 2.6806, 0.1192, 13.440000, 37.977323, 23.737739, 12.7858, 2.6042, 0.1246, 13.480000, 37.977322, 23.737739, 13.1554, 2.5290, 0.1307, 13.520000, 37.977321, 23.737740, 13.5136, 2.4450, 0.1376, 13.560000, 37.977319, 23.737741, 13.8600, 2.3670, 0.1452, 13.600000, 37.977318, 23.737742, 14.1969, 2.3112, 0.1537, 13.640000, 37.977317, 23.737743, 14.5265, 2.2667, 0.1628, 13.680000, 37.977316, 23.737744, 14.8508, 2.2384, 0.1726, 13.720000, 37.977314, 23.737745, 15.1716, 2.2175, 0.1831, 13.760000, 37.977313, 23.737746, 15.4894, 2.1953, 0.1941, 13.800000, 37.977311, 23.737747, 15.8051, 2.1896, 0.2058, 13.840000, 37.977310, 23.737748, 16.1198, 2.1820, 0.2181, 13.880000, 37.977309, 23.737749, 16.4333, 2.1724, 0.2310, 13.920000, 37.977307, 23.737750, 16.7460, 2.1703, 0.2444, 13.960000, 37.977306, 23.737751, 17.0589, 2.1757, 0.2584, 14.000000, 37.977304, 23.737752, 17.3738, 2.1975, 0.2728, 14.040000, 37.977303, 23.737753, 17.6917, 2.2174, 0.2878, 14.080000, 37.977301, 23.737754, 18.0123, 2.2352, 0.3032, 14.120000, 37.977299, 23.737755, 18.3360, 2.2606, 0.3190, 14.160000, 37.977298, 23.737756, 18.6638, 2.2934, 0.3352, 14.200000, 37.977296, 23.737757, 18.9976, 2.3427, 0.3518, 14.240000, 37.977294, 23.737758, 19.3387, 2.3946, 0.3687, 14.280000, 37.977293, 23.737759, 19.6871, 2.4445, 0.3861, 14.320000, 37.977291, 23.737760, 20.0427, 2.4937, 0.4039, 14.360000, 37.977289, 23.737761, 20.4053, 2.5436, 0.4219, 14.400000, 37.977287, 23.737763, 20.7760, 2.6051, 0.4403, 14.440000, 37.977286, 23.737764, 21.1565, 2.6788, 0.4594, 14.480000, 37.977284, 23.737765, 21.5479, 2.7572, 0.4807, 14.520000, 37.977282, 23.737766, 21.9502, 2.8305, 0.5045, 14.560000, 37.977280, 23.737767, 22.3622, 2.8916, 0.5304, 14.600000, 37.977278, 23.737769, 22.7822, 2.9416, 0.5584, 14.640000, 37.977276, 23.737770, 23.2094, 2.9924, 0.5883, 14.680000, 37.977274, 23.737771, 23.6440, 3.0444, 0.6201, 14.720000, 37.977272, 23.737772, 24.0863, 3.0975, 0.6537, 14.760000, 37.977269, 23.737774, 24.5358, 3.1466, 0.6893, 14.800000, 37.977267, 23.737775, 24.9912, 3.1783, 0.7267, 14.840000, 37.977265, 23.737776, 25.4507, 3.2031, 0.7660, 14.880000, 37.977263, 23.737777, 25.9132, 3.2211, 0.8070, 14.920000, 37.977260, 23.737779, 26.3784, 3.2401, 0.8497, 14.960000, 37.977258, 23.737780, 26.8464, 3.2601, 0.8943, 15.000000, 37.977255, 23.737782, 27.3160, 3.2626, 0.9405, 15.040000, 37.977253, 23.737783, 27.7855, 3.2582, 0.9883, 15.080000, 37.977250, 23.737784, 28.2539, 3.2471, 1.0372, 15.120000, 37.977247, 23.737786, 28.7207, 3.2369, 1.0874, 15.160000, 37.977245, 23.737787, 29.1862, 3.2279, 1.1388, 15.200000, 37.977242, 23.737789, 29.6491, 3.2014, 1.1918, 15.240000, 37.977239, 23.737790, 30.1062, 3.1476, 1.2463, 15.280000, 37.977236, 23.737791, 30.5550, 3.0869, 1.3021, 15.320000, 37.977233, 23.737793, 30.9971, 3.0534, 1.3589, 15.360000, 37.977230, 23.737794, 31.4367, 3.0516, 1.4167, 15.400000, 37.977228, 23.737796, 31.8774, 3.0698, 1.4756, 15.440000, 37.977224, 23.737797, 32.3202, 3.0809, 1.5351, 15.480000, 37.977221, 23.737798, 32.7632, 3.0716, 1.5937, 15.520000, 37.977218, 23.737800, 33.2048, 3.0616, 1.6506, 15.560000, 37.977215, 23.737801, 33.6454, 3.0587, 1.7042, 15.600000, 37.977212, 23.737803, 34.0865, 3.0674, 1.7542, 15.640000, 37.977209, 23.737804, 34.5311, 3.1079, 1.8006, 15.680000, 37.977205, 23.737805, 34.9819, 3.1528, 1.8437, 15.720000, 37.977202, 23.737807, 35.4362, 3.1571, 1.8837, 15.760000, 37.977198, 23.737808, 35.8881, 3.1199, 1.9206, 15.800000, 37.977195, 23.737809, 36.3325, 3.0527, 1.9544, 15.840000, 37.977192, 23.737810, 36.7695, 3.0162, 1.9852, 15.880000, 37.977188, 23.737812, 37.2034, 3.0104, 2.0131, 15.920000, 37.977184, 23.737813, 37.6335, 2.9638, 2.0383, 15.960000, 37.977181, 23.737814, 38.0540, 2.8764, 2.0606, 16.000000, 37.977177, 23.737815, 38.4597, 2.7589, 2.0798, 16.040000, 37.977173, 23.737816, 38.8508, 2.6721, 2.0959, 16.080000, 37.977170, 23.737817, 39.2315, 2.6160, 2.1092, 16.120000, 37.977166, 23.737818, 39.6012, 2.5192, 2.1201, 16.160000, 37.977162, 23.737819, 39.9541, 2.3816, 2.1291, 16.200000, 37.977158, 23.737820, 40.2850, 2.2140, 2.1359, 16.240000, 37.977154, 23.737821, 40.5922, 2.0531, 2.1404, 16.280000, 37.977150, 23.737822, 40.8785, 1.9230, 2.1428, 16.320000, 37.977145, 23.737823, 41.1471, 1.8082, 2.1429, 16.360000, 37.977141, 23.737824, 41.3989, 1.6884, 2.1412, 16.400000, 37.977137, 23.737825, 41.6316, 1.5436, 2.1376, 16.440000, 37.977133, 23.737826, 41.8405, 1.3583, 2.1319, 16.480000, 37.977128, 23.737827, 42.0210, 1.1492, 2.1224, 16.520000, 37.977124, 23.737827, 42.1734, 0.9672, 2.1091, 16.560000, 37.977120, 23.737828, 42.3025, 0.8258, 2.0933, 16.600000, 37.977115, 23.737829, 42.4127, 0.7044, 2.0756, 16.640000, 37.977111, 23.737830, 42.5051, 0.5780, 2.0558, 16.680000, 37.977107, 23.737830, 42.5777, 0.4312, 2.0339, 16.720000, 37.977102, 23.737831, 42.6276, 0.2612, 2.0098, 16.760000, 37.977098, 23.737831, 42.6533, 0.0952, 1.9835, 16.800000, 37.977094, 23.737832, 42.6577, -0.0332, 1.9549, 16.840000, 37.977090, 23.737832, 42.6463, -0.1258, 1.9240, 16.880000, 37.977085, 23.737833, 42.6241, -0.1828, 1.8905, 16.920000, 37.977081, 23.737833, 42.5920, -0.2630, 1.8541, 16.960000, 37.977077, 23.737833, 42.5467, -0.3663, 1.8147, 17.000000, 37.977073, 23.737834, 42.4892, -0.4320, 1.7724, 17.040000, 37.977068, 23.737834, 42.4249, -0.4619, 1.7273, 17.080000, 37.977064, 23.737834, 42.3588, -0.4561, 1.6795, 17.120000, 37.977060, 23.737834, 42.2919, -0.4734, 1.6290, 17.160000, 37.977056, 23.737835, 42.2208, -0.5139, 1.5757, 17.200000, 37.977052, 23.737835, 42.1466, -0.5168, 1.5193, 17.240000, 37.977047, 23.737835, 42.0746, -0.4827, 1.4597, 17.280000, 37.977043, 23.737835, 42.0102, -0.4129, 1.3970, 17.320000, 37.977039, 23.737835, 41.9557, -0.3443, 1.3310, 17.360000, 37.977035, 23.737835, 41.9092, -0.3009, 1.2618, 17.400000, 37.977031, 23.737835, 41.8690, -0.2574, 1.1892, 17.440000, 37.977027, 23.737835, 41.8352, -0.2126, 1.1132, 17.480000, 37.977022, 23.737835, 41.8091, -0.1735, 1.0771, 17.520000, 37.977018, 23.737835, 41.7893, -0.1137, 1.0388, 17.560000, 37.977014, 23.737835, 41.7779, -0.0496, 0.9996, 17.600000, 37.977010, 23.737835, 41.7737, -0.0084, 0.9602, 17.640000, 37.977006, 23.737835, 41.7735, 0.0067, 0.9204, 17.680000, 37.977002, 23.737834, 41.7734, -0.0081, 0.8803, 17.720000, 37.976997, 23.737834, 41.7710, -0.0233, 0.8400, 17.760000, 37.976993, 23.737834, 41.7678, -0.0170, 0.7993, 17.800000, 37.976989, 23.737834, 41.7653, -0.0118, 0.7583, 17.840000, 37.976985, 23.737834, 41.7633, -0.0078, 0.7168, 17.880000, 37.976981, 23.737834, 41.7616, -0.0053, 0.6745, 17.920000, 37.976976, 23.737834, 41.7603, -0.0011, 0.6313, 17.960000, 37.976972, 23.737833, 41.7595, 0.0052, 0.5878, 18.000000,
Your input file contains a space after each comma.
To omit them gracefully while reading, pass skipinitialspace=True
to read_csv.
Another hint: If the row that you provided in your post is really
the first row of your file (it contains just data, not column names),
then your file has no row with column names.
To inform read_csv about it, pass either header=None
or names with the proper list of column names.
And the last detail: Probably the first column of your source should be
the index. If this is the case, pass index_col=[0].

tornado-maven-osgi-project template for IntelliJ does not work [duplicate]

I am using the Kotlin getting started guide to setup Kotlin for the first time on IntelliJ IDEA with the following configuration:
IntelliJ IDEA 2017.2.5
Build #IC-172.4343.14, built on September 26, 2017
JRE: 1.8.0_152-release-915-b12 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.11.6
I created an App.kt file in a new Kotlin project with the following code:
fun main(args: Array<String>) {
println("hello")
}
On running the code through the IDE, I get the following error:
Error:Internal error: (java.lang.VerifyError) Uninitialized object exists on backward branch 90
Exception Details:
Location:
org/jetbrains/kotlin/jps/build/KotlinBuilder.createCompileEnvironment(Ljava/util/Map;Lorg/jetbrains/kotlin/incremental/components/LookupTracker;Lorg/jetbrains/jps/incremental/CompileContext;Lorg/jetbrains/kotlin/jps/build/KotlinBuilder$MessageCollectorAdapter;)Lorg/jetbrains/kotlin/compilerRunner/JpsCompilerEnvironment; #171: goto
Reason:
Error exists in the bytecode
Bytecode:
0000000: bb03 fe59 b703 ff3a 0619 063a 0719 0713
0000010: 02d7 2cb6 0403 5719 0713 0405 bb04 0759
0000020: 2b3a 083a 093a 0a3a 0b3a 0c19 083a 0dbb
0000030: 0409 5919 08b9 040a 0100 b804 10b7 0411
0000040: c002 893a 0e19 0db9 028c 0100 c000 b03a
0000050: 0f19 0fb9 00b9 0100 3a10 1910 b900 be01
0000060: 0099 004d 1910 b900 c201 003a 1119 0e19
0000070: 11c0 028e 3a12 3a13 1912 b902 9101 00c0
0000080: 00c4 b804 173a 1419 1319 1419 11c0 028e
0000090: 3a15 3a16 3a17 1915 b902 9401 003a 1819
00000a0: 1719 1619 18b9 041b 0300 57a7 ffaf 190e
00000b0: 0000 3a13 190c 190b 190a 1909 1913 b704
00000c0: 1eb6 0403 5719 0713 0420 bb04 2259 2c2b
00000d0: 2db7 0425 b604 0357 1907 b604 283a 052a
00000e0: b704 2c3a 0619 06c6 0010 1906 b904 3101
00000f0: 00b6 013c 9a00 1319 04b2 0216 1304 3301
0000100: 0701 b801 fa01 b0bb 0262 5919 0619 05b2
0000110: 002e b604 3719 04c0 01c7 bb04 3959 b704
0000120: 3ab7 043d b0
Stackmap Table:
full_frame(#90,{Object[#2],Object[#649],Object[#727],Object[#98],Object[#428],Top,Object[#1022],Object[#1022],Object[#649],Uninitialized[#28],Uninitialized[#28],Object[#1005],Object[#1022],Object[#649],Object[#649],Object[#176],Object[#187]},{})
same_frame_extended(#174)
full_frame(#247,{Object[#2],Object[#649],Object[#727],Object[#98],Object[#428],Object[#1102],Object[#1070],Object[#1022],Object[#649],Object[#1031],Object[#1031],Object[#1005],Object[#1022],Object[#649],Object[#649],Object[#176],Object[#187],Top,Top,Object[#649]},{})
same_frame(#263)
java.lang.VerifyError: Uninitialized object exists on backward branch 90
Exception Details:
Location:
org/jetbrains/kotlin/jps/build/KotlinBuilder.createCompileEnvironment(Ljava/util/Map;Lorg/jetbrains/kotlin/incremental/components/LookupTracker;Lorg/jetbrains/jps/incremental/CompileContext;Lorg/jetbrains/kotlin/jps/build/KotlinBuilder$MessageCollectorAdapter;)Lorg/jetbrains/kotlin/compilerRunner/JpsCompilerEnvironment; #171: goto
Reason:
Error exists in the bytecode
Bytecode:
0000000: bb03 fe59 b703 ff3a 0619 063a 0719 0713
0000010: 02d7 2cb6 0403 5719 0713 0405 bb04 0759
0000020: 2b3a 083a 093a 0a3a 0b3a 0c19 083a 0dbb
0000030: 0409 5919 08b9 040a 0100 b804 10b7 0411
0000040: c002 893a 0e19 0db9 028c 0100 c000 b03a
0000050: 0f19 0fb9 00b9 0100 3a10 1910 b900 be01
0000060: 0099 004d 1910 b900 c201 003a 1119 0e19
0000070: 11c0 028e 3a12 3a13 1912 b902 9101 00c0
0000080: 00c4 b804 173a 1419 1319 1419 11c0 028e
0000090: 3a15 3a16 3a17 1915 b902 9401 003a 1819
00000a0: 1719 1619 18b9 041b 0300 57a7 ffaf 190e
00000b0: 0000 3a13 190c 190b 190a 1909 1913 b704
00000c0: 1eb6 0403 5719 0713 0420 bb04 2259 2c2b
00000d0: 2db7 0425 b604 0357 1907 b604 283a 052a
00000e0: b704 2c3a 0619 06c6 0010 1906 b904 3101
00000f0: 00b6 013c 9a00 1319 04b2 0216 1304 3301
0000100: 0701 b801 fa01 b0bb 0262 5919 0619 05b2
0000110: 002e b604 3719 04c0 01c7 bb04 3959 b704
0000120: 3ab7 043d b0
Stackmap Table:
full_frame(#90,{Object[#2],Object[#649],Object[#727],Object[#98],Object[#428],Top,Object[#1022],Object[#1022],Object[#649],Uninitialized[#28],Uninitialized[#28],Object[#1005],Object[#1022],Object[#649],Object[#649],Object[#176],Object[#187]},{})
same_frame_extended(#174)
full_frame(#247,{Object[#2],Object[#649],Object[#727],Object[#98],Object[#428],Object[#1102],Object[#1070],Object[#1022],Object[#649],Object[#1031],Object[#1031],Object[#1005],Object[#1022],Object[#649],Object[#649],Object[#176],Object[#187],Top,Top,Object[#649]},{})
same_frame(#263)
at org.jetbrains.kotlin.jps.build.KotlinBuilderService.createModuleLevelBuilders(KotlinBuilderService.java:30)
at org.jetbrains.jps.incremental.BuilderRegistry.<init>(BuilderRegistry.java:54)
at org.jetbrains.jps.incremental.BuilderRegistry.<init>(BuilderRegistry.java:33)
at org.jetbrains.jps.incremental.BuilderRegistry$Holder.<clinit>(BuilderRegistry.java:36)
at org.jetbrains.jps.incremental.BuilderRegistry.getInstance(BuilderRegistry.java:43)
at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:133)
at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:295)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:125)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:236)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler$$Lambda$3/1147174008.run(Unknown Source)
at org.jetbrains.jps.service.impl.SharedThreadPoolImpl.lambda$executeOnPooledThread$0(SharedThreadPoolImpl.java:42)
at org.jetbrains.jps.service.impl.SharedThreadPoolImpl$$Lambda$1/684874119.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
This is due to a bug in earlier JDK 8 versions. Open up the project structure for your project and change your project SDK to a more recent version.
Upgrading from JDK 1.8.0_11 to 1.80_72 solved the problem for me.
Just check "Use embedded JDK" in File>Project Structure>SDK Location> JDK Location

AWK - how to find unique vaulues and print first and last occurance [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I have a large text file which has multiple lines of data relating to one item, an item can have upto 15 different lines but all linked by a field called "itemId" i.e. itemId=<12560317> each line has a timestamp at the beginning i.e. 170209 035711 0792.
170209 035711 0638 DE(N) ItemHandler.ItemLog event=<DESTINATION_REPLY>, *********************, itemId=<12560284>, globalId=<12560284>, cmcIndex=<728>, sorter=<0: MS01>, state=<CSC: WaitForDestination>, ccReason=<SCANNER_DATA_ADDED>,
170209 035711 0638 DE(N) ItemHandler.ItemLog event=<REDIRECT_ITEM>, *************************, itemId=<12560284>, globalId=<12560284>, cmcIndex=<728>, sorter=<0: MS01>, state=<CSC: WaitForDestination>, PendingchuteGroup=<[3000]: Parked0>, Pendingstrategy=<notSpecified>, CscdestinationId=<-1: UnDef>, CmcdestinationId=<4099: All Scanners>, position=<sorter#0.scanner#4000: SCAN01>, itemRevisionNumber=<7> ##[
170209 035711 0715 DE(N) ItemHandler.ItemLog event=<SCANNER_RESULT>, ************************, itemId=<12560311>, globalId=<12560311>, cmcIndex=<755>, sorter=<0: MS01>, state=<CSC: WaitForData>, barcodeCount=<4>
170209 035711 0715 DE(N) ItemHandler.ItemLog event=<DESTINATION_REQUEST>, *******************, itemId=<12560311>, globalId=<12560311>, cmcIndex=<755>, sorter=<0: MS01>, state=<CSC: WaitForData>, barcodes=<[ProxyWrapperBarcode(barcode=<JJD014600001372909310>,
170209 035711 0717 DE(N) ItemHandler.ItemLog event=<DISCHARGE_ATTEMPTED>, *******************, itemId=<12560209>, globalId=<12560209>, cmcIndex=<653>, sorter=<0: MS01>, state=<CSC: ProjectHeadingForChute>, CscdestinationId=<19: CHU208>, chuteGroup=<[17, 19, 21]: [CHU207, CHU208, CHU209]>, CmcdestinationId=<19: CHU208>, position=<sorter#0: MS01>, itemRevisionNumber=<16> ##[
170209 035711 0719 DE(N) ItemHandler.ItemLog event=<DESTINATION_REPLY>, *********************, itemId=<12560311>, globalId=<12560311>, cmcIndex=<755>, sorter=<0: MS01>, state=<CSC: WaitForDestination>, ccReason=<SCANNER_DATA_ADDED>, PendingccResult=<OK>, Pendingstrategy=<notSpecified>,
170209 035711 0719 DE(N) ItemHandler.ItemLog event=<REDIRECT_ITEM>, *************************, itemId=<12560311>, globalId=<12560311>, cmcIndex=<755>, sorter=<0: MS01>, state=<CSC: WaitForDestination>, PendingchuteGroup=<[3000]: Parked0>, Pendingstrategy=<notSpecified>, CscdestinationId=<-1: UnDef>, CmcdestinationId=<-1: UnDef>, position=<sorter#0.scanner#4001: IU04-SCAN02>, itemRevisionNumber=<4> ##[
170209 035711 0792 DE(N) ItemHandler.ItemLog event=<ITEM_AT_INDUCTION>, *********************, itemId=<12560317>, globalId=<12560317>, cmcIndex=<761>, sorter=<0: MS01>, state=<CSC: ProjectIdle>, inductionId=<3: IU04>, position=<sorter#0.induction#3: IU04>, itemRevisionNumber=<0> ##[
170209 035711 0792 DE(N) ItemHandler.ItemLog event=<SET_ITEM_ID>, ***************************, itemId=<12560317>, globalId=<12560317>, cmcIndex=<761>, sorter=<0: MS01>, state=<CSC: ProjectIdle>, itemRevisionNumber=<0> ##[
170209 035711 0794 DE(N) ItemHandler.ItemLog event=<REDIRECT_ITEM_REPLY>, *******************, itemId=<12560284>, globalId=<12560284>, cmcIndex=<728>, sorter=<0: MS01>, state=<CSC: WaitForDestination>, CscdestinationId=<3000: Parked0>, chuteGroup=<[3000]: Parked0>, CmcdestinationId=<3000: Parked0>, position=<sorter#0.scanner#4000: SCAN01>, chuteListStartPoint=<-1>, itemRevisionNumber=<9> ##[
170209 035711 0795 DE(N) ItemHandler.ItemLog event=<RECONVERT>, *****************************, itemId=<12560284>, globalId=<12560284>, cmcIndex=<728>, sorter=<0: MS01>, state=<CSC: WaitForData>, CscdestinationId=<3000: Parked0>, chuteGroup=<[3000]: Parked0>, CmcdestinationId=<3000: Parked0>, position=<sorter#0.scanner#4000: SCAN01>, chuteListStartPoint=<-1>, itemRevisionNumber=<10> ##[
170209 035711 0795 DE(N) ItemHandler.ItemLog event=<DESTINATION_REQUEST>, *******************, itemId=<12560284>, globalId=<12560284>, cmcIndex=<728>, sorter=<0: MS01>, state=<CSC: WaitForData>, barcodes=<[ProxyWrapperBarcode(barcode=<JJD014600004019604475>, type=<C0>, result=<OK>, ccType=<>),
170209 035711 0797 DE(N) ItemHandler.ItemLog event=<REDIRECT_ITEM_REPLY>, *******************, itemId=<12560311>, globalId=<12560311>, cmcIndex=<755>, sorter=<0: MS01>, state=<CSC: WaitForDestination>, CscdestinationId=<3000: Parked0>, chuteGroup=<[3000]: Parked0>, CmcdestinationId=<3000: Parked0>,
170209 035711 0798 DE(N) ItemHandler.ItemLog event=<ITEM_INDUCTED>, *************************, itemId=<12560311>, globalId=<12560311>, cmcIndex=<755>, sorter=<0: MS01>, state=<CSC: WaitForData>, inductionId=<3: IU04>, inductionMode=<SCANNER>, inductStatus=<NORMAL_ITEM>, carrierId=<469>, carrierCount=<1>, CmcdestinationId=<3000: Parked0>, position=<sorter#0: MS01>, itemRevisionNumber=<7> ##[
Objective :
What I want to do is using gawk in Windows is find the first occurance of ITEMID and grab the date and time and the last time occurance it was seen and grab the data and time. and put these onto one line such as
ITEMID 170209 035711 170209 035932
Is there a way I can do this using GREP or AWK or a combination
Thanks
I would write:
awk '
!first[$8] {first[$8] = $0}
{last[$8] = $0}
END {for (id in first) {print first[id]; print last[id]}}
' file
Do you need the output sorted by date or by id or ...? Do you want to just lookup a single id at a time?
The oneliner is:
gawk '{ a = gensub(/([0-9]{6} [0-9]{6} [0-9]{4}).*itemId=<([0-9]+)>.*/, "\\2 \\1", "g", $0); b = split(a, c, " "); if (c[1] in result) result[c[1]] = gensub(/(.+),(.+)/, "\\1," c[2] " " c[3] " " c[4], "g", result[c[1]]); else result[c[1]] = c[2] " " c[3] " " c[4] "," c[2] " " c[3] " " c[4]} END { for (i in result) print i ": " result[i]}' test.txt
Let me evaluate:
var a contains the itemId and date from a line
we split a using spaces, a[1] contains itemId, a[2],a[3],a[4] parts of the date
if the itemId doesn't yet exist in array "result", we put the date twice(!) in the array "result" with index itemId,
if the itemId already exists, we replace the second date by the newly found date.
This leaves us with assoc array with itemId as key and as value the first and the last date, separated by a comma.
gawk '{
a = gensub(/([0-9]{6} [0-9]{6} [0-9]{4}).*itemId=<([0-9]+)>.*/, "\\2 \\1", "g", $0);
b = split(a, c, " ");
if (c[1] in result)
result[c[1]] = gensub(/(.+),(.+)/, "\\1" "," c[2] " " c[3] " " c[4], "g", result[c[1]]);
else result[c[1]] = c[2] " " c[3] " " c[4] "," c[2] " " c[3] " " c[4]
} END { for (i in result) print i ": " result[i]}' test.txt
And the result is:
12560311: 170209 035711 0715,170209 035711 0798
12560209: 170209 035711 0717,170209 035711 0717
12560284: 170209 035711 0638,170209 035711 0795
12560317: 170209 035711 0792,170209 035711 0792
EDIT:
Running this on windows didn't work correctly. Simplified the answer to:
awk "
!first[$8] {first[$8] = $1 FS $2 FS $3}
{last[$8] = $1 FS $2 FS $3 }
END {
for (id in first) {
print gensub(/itemId=<([^>]+)>,/, \"\\1\", \"g\", id) FS first[id] FS last[id]}
}" Item.log
Thx to #glennjackman for inspiration. ;-) Note the escaping of quotes for running this on windows.

GAWK - Finding a corresponding Action

I have a large file of sequentiually added lines of data that relate to parcels going through a system, this file is added to as each action takes place and builds throughout the day. What I need to do it check the file say every minute and check for items that have not yet made it to there chute i.e. do not have an "DISCHARGE_VERIFIED". The example below is one complete record but this could be spread throughout the file as thousands of items are processed at the same time.
170209 043314 0887 DE(N) ItemHandler.ItemLog event=<ITEM_AT_INDUCTION>, *********************, itemId=<12562305>, globalId=<12562305>, cmcIndex=<750>, sorter=<0: MS01>, state=<CSC: ProjectIdle>, inductionId=<3: IU04>, position=<sorter#0.induction#3: IU04>, itemRevisionNumber=<0> ##[
170209 043314 0888 DE(N) ItemHandler.ItemLog event=<SET_ITEM_ID>, ***************************, itemId=<12562305>, globalId=<12562305>, cmcIndex=<750>, sorter=<0: MS01>, state=<CSC: ProjectIdle>, itemRevisionNumber=<0> ##[
170209 043317 0314 DE(N) ItemHandler.ItemLog event=<SCANNER_RESULT>, ************************, itemId=<12562305>, globalId=<12562305>, cmcIndex=<750>, sorter=<0: MS01>, state=<CSC: WaitForData>, barcodeCount=<3>, barcodes=<[ProxyWrapperBarcode(barcode=<JJD014600004054211864>, type=<C0>, result=<OK>, ccType=<>), ProxyWrapperBarcode(barcode=<1910456693>, type=<A0>, result=<OK>, ccType=<>), ProxyWrapperBarcode(barcode=<2LAU2000+52000000>, type=<C0>, result=<OK>, ccType=<>)]>, codeSource=<ohscan>, scannerId=<4001: IU04-SCAN02>, scannerStatus=<0>, position=<sorter#0.scanner#4001: IU04-SCAN02>, itemRevisionNumber=<2> ##[
170209 043317 0315 DE(N) ItemHandler.ItemLog event=<DESTINATION_REQUEST>, *******************, itemId=<12562305>, globalId=<12562305>, cmcIndex=<750>, sorter=<0: MS01>, state=<CSC: WaitForData>, barcodes=<[ProxyWrapperBarcode(barcode=<JJD014600004054211864>, type=<C0>, result=<OK>, ccType=<>), ProxyWrapperBarcode(barcode=<1910456693>, type=<A0>, result=<OK>, ccType=<>), ProxyWrapperBarcode(barcode=<2LAU2000+52000000>, type=<C0>, result=<OK>, ccType=<>)]>, ccReason=<SCANNER_DATA_ADDED>, PreviousccResult=<>, sortSchemeId=<-1>, sortSchemeName=<>, logicalDestination=<>, BatchCountItem=<true>, collectionId=<-1>, goodsId=<>, position=<sorter#0.scanner#4001: IU04-SCAN02>, dynamicDataCount=<0>, dynamicData=<{}>, carrierId=<159>, carrierCount=<-1>, itemRevisionNumber=<2> ##[
170209 043317 0322 DE(N) ItemHandler.ItemLog event=<DESTINATION_REPLY>, *********************, itemId=<12562305>, globalId=<12562305>, cmcIndex=<750>, sorter=<0: MS01>, state=<CSC: WaitForDestination>, ccReason=<SCANNER_DATA_ADDED>, PendingccResult=<OK>, Pendingstrategy=<notSpecified>, PendingchuteGroup=<[3000]: Parked0>, PendingNotChutedestinationId=<-1>, PendingsortSchemeId=<-1>, PendingsortSchemeName=<>, PendinglogicalDestination=<>, PendinggoodsId=<>, PendingBatchCountItem=<true>, PendingcollectionId=<-1>, position=<sorter#0.scanner#4001: IU04-SCAN02>, dynamicDataCount=<0>, dynamicData=<{}>, itemRevisionNumber=<4> ##[
170209 043317 0322 DE(N) ItemHandler.ItemLog event=<REDIRECT_ITEM>, *************************, itemId=<12562305>, globalId=<12562305>, cmcIndex=<750>, sorter=<0: MS01>, state=<CSC: WaitForDestination>, PendingchuteGroup=<[3000]: Parked0>, Pendingstrategy=<notSpecified>, CscdestinationId=<-1: UnDef>, CmcdestinationId=<-1: UnDef>, position=<sorter#0.scanner#4001: IU04-SCAN02>, itemRevisionNumber=<4> ##[
170209 043317 0484 DE(N) ItemHandler.ItemLog event=<REDIRECT_ITEM_REPLY>, *******************, itemId=<12562305>, globalId=<12562305>, cmcIndex=<750>, sorter=<0: MS01>, state=<CSC: WaitForDestination>, CscdestinationId=<3000: Parked0>, chuteGroup=<[3000]: Parked0>, CmcdestinationId=<3000: Parked0>, position=<sorter#0.scanner#4001: IU04-SCAN02>, chuteListStartPoint=<-1>, itemRevisionNumber=<6> ##[
170209 043317 0486 DE(N) ItemHandler.ItemLog event=<RECONVERT>, *****************************, itemId=<12562305>, globalId=<12562305>, cmcIndex=<750>, sorter=<0: MS01>, state=<CSC: WaitForData>, CscdestinationId=<3000: Parked0>, chuteGroup=<[3000]: Parked0>, CmcdestinationId=<3000: Parked0>, position=<sorter#0.scanner#4001: IU04-SCAN02>, chuteListStartPoint=<-1>, itemRevisionNumber=<7> ##[
170209 043317 0486 DE(N) ItemHandler.ItemLog event=<DESTINATION_REQUEST>, *******************, itemId=<12562305>, globalId=<12562305>, cmcIndex=<750>, sorter=<0: MS01>, state=<CSC: WaitForData>, barcodes=<[ProxyWrapperBarcode(barcode=<JJD014600004054211864>, type=<C0>, result=<OK>, ccType=<>), ProxyWrapperBarcode(barcode=<1910456693>, type=<A0>, result=<OK>, ccType=<>), ProxyWrapperBarcode(barcode=<2LAU2000+52000000>, type=<C0>, result=<OK>, ccType=<>)]>, ccReason=<SCANNER_DATA_ADDED>, PreviousccResult=<OK>, sortSchemeId=<-1>, sortSchemeName=<>, logicalDestination=<>, BatchCountItem=<true>, collectionId=<-1>, goodsId=<>, position=<sorter#0.scanner#4001: IU04-SCAN02>, dynamicDataCount=<0>, dynamicData=<{}>, carrierId=<159>, carrierCount=<-1>, itemRevisionNumber=<7> ##[
170209 043317 0492 DE(N) ItemHandler.ItemLog event=<DESTINATION_REPLY>, *********************, itemId=<12562305>, globalId=<12562305>, cmcIndex=<750>, sorter=<0: MS01>, state=<CSC: WaitForDestination>, ccReason=<SCANNER_DATA_ADDED>, PendingccResult=<OK>, Pendingstrategy=<priority>, PendingchuteGroup=<[121]: FLY425>, PendingNotChutedestinationId=<-1>, PendingsortSchemeId=<-1>, PendingsortSchemeName=<>, PendinglogicalDestination=<FLY425>, PendinggoodsId=<>, PendingBatchCountItem=<true>, PendingcollectionId=<-1>, position=<sorter#0.scanner#4001: IU04-SCAN02>, dynamicDataCount=<0>, dynamicData=<{}>, itemRevisionNumber=<9> ##[
170209 043317 0492 DE(N) ItemHandler.ItemLog event=<REDIRECT_ITEM>, *************************, itemId=<12562305>, globalId=<12562305>, cmcIndex=<750>, sorter=<0: MS01>, state=<CSC: WaitForDestination>, PendingchuteGroup=<[121]: FLY425>, Pendingstrategy=<priority>, CscdestinationId=<3000: Parked0>, CmcdestinationId=<3000: Parked0>, position=<sorter#0.scanner#4001: IU04-SCAN02>, itemRevisionNumber=<9> ##[
170209 043317 0666 DE(N) ItemHandler.ItemLog event=<REDIRECT_ITEM_REPLY>, *******************, itemId=<12562305>, globalId=<12562305>, cmcIndex=<750>, sorter=<0: MS01>, state=<CSC: WaitForDestination>, CscdestinationId=<121: FLY425>, chuteGroup=<[121]: FLY425>, CmcdestinationId=<121: FLY425>, position=<sorter#0.scanner#4001: IU04-SCAN02>, chuteListStartPoint=<121>, itemRevisionNumber=<11> ##[
170209 043317 0667 DE(N) ItemHandler.ItemLog event=<ITEM_INDUCTED>, *************************, itemId=<12562305>, globalId=<12562305>, cmcIndex=<750>, sorter=<0: MS01>, state=<CSC: ProjectHeadingForChute>, inductionId=<3: IU04>, inductionMode=<SCANNER>, inductStatus=<NORMAL_ITEM>, carrierId=<159>, carrierCount=<1>, CmcdestinationId=<121: FLY425>, position=<sorter#0: MS01>, itemRevisionNumber=<12> ##[
170209 043327 0379 DE(N) ItemHandler.ItemLog event=<ITEM_DISCHARGED>, ***********************, itemId=<12562305>, globalId=<12562305>, cmcIndex=<750>, sorter=<0: MS01>, state=<CSC: ProjectHeadingForChute>, CscdestinationId=<121: FLY425>, chuteGroup=<[121]: FLY425>, CmcdestinationId=<121: FLY425>, ccResult=<OK>, sortSchemeId=<-1>, logicalDestination=<FLY425>, goodsId=<>, carrierId=<159>, length=<-1 mm>, width=<-1 mm>, height=<-1 mm>, volume=<-1 mm3>, position=<sorter#0.chute#121: FLY425>, itemRevisionNumber=<13> ##[
170209 043339 0765 DE(N) ItemHandler.ItemLog event=<DISCHARGE_VERIFIED>, ********************, itemId=<12562305>, globalId=<12562305>, cmcIndex=<750>, sorter=<0: MS01>, state=<CSC: ProjectWaitForVerification>, CscdestinationId=<121: FLY425>, chuteGroup=<[121]: FLY425>, CmcdestinationId=<121: FLY425>, position=<sorter#0.chute#121: FLY425>, itemRevisionNumber=<14> ##[
Once an item has made it to it's chute it is denoted as "DISCHARGE_VERIFIED" so I need to be able to pull out of the log file, the lines the that have an "itemId" but with no corresponding "DISCHARGE_VERIFIED" at that point in time and display the chute it is heading for which is held in the line "ITEM_INDUCTED", in the element "CmcdestinationId=<121: FLY425>" see below
170209 043317 0667 DE(N) ItemHandler.ItemLog event=<ITEM_INDUCTED>, *************************, itemId=<12562305>, globalId=<12562305>, cmcIndex=<750>, sorter=<0: MS01>, state=<CSC: ProjectHeadingForChute>, inductionId=<3: IU04>, inductionMode=<SCANNER>, inductStatus=<NORMAL_ITEM>, carrierId=<159>, carrierCount=<1>, CmcdestinationId=<121: FLY425>, position=<sorter#0: MS01>, itemRevisionNumber=<12> ##[
I'm doing this on a windows machine using gawk so have all the usual quotation issues.
Any help would be appreciated
Thanks
Phil
I think I have a working script. Save it as inducted.awk for example, so you skip all the windows quotation issues you describe.
inducted.awk:
/ITEM_INDUCTED/ {
match($0, /itemId=<([^>]+)>/, ary1)
match($0, /CmcdestinationId=<([^>]+)>/, ary2)
dest[ary1[1]] = ary2[1]
}
/DISCHARGE_VERIFIED/ {
match($0, /itemId=<([^>]+)>/, ary1)
delete dest[ary1[1]]
}
END {
for (id in dest) {
print id " -- " dest[id]
}
}
So basically, when a line with ITEM_INDUCTED is found, it adds the itemid and destination to an array.
And when a line has DISCHARGED_VERIFIED, that information is deleted from the array.
At the end of the script, remaining inducted but not discharged ids are printed with their destinations.
To execute it:
gawk -f .\inducted.awk large_log_file
if the awk file is not in the same folder as large_log_file, specify the full path for it.

How to load a vector from memory with up-sample in Neon with C API

i'm new about Neon. I try find some instructions to do following operation:
int a[8] = {1,2,3,4,5,6,7,8};
int b[4] = {1,2,3,4};
int c[8] = {0};
for (int =0; i<8; i++)
c[i] = a[i] - b[i/2];
How can i Do that with arm neon, actually how can I load the array with upsample to Neon like {b[0],b[0],b[1],b[1],b[2],b[2],b[3],b[3]}
you can do this by extending b[] vector:
vld1.32 {q10, q11}, [ptrB]!
vld1.32 {q12, q13}, [ptrA]!
vld1.32 {q14, q15}, [ptrA]!
vshll.s32 q8, d20, #32
vshll.s32 q9, d21, #32
vshll.s32 q10, d22, #32
vshll.s32 q11, d23, #32
vsra.u64 q8, q8, #32
vsra.u64 q9, q9, #32
vsra.u64 q10, q10, #32
vsra.u64 q11, q11, #32
vsub.s32 q12, q12, q8
vsub.s32 q13, q13, q9
vsub.s32 q14, q14, q10
vsub.s32 q15, q15, q11
vst1.32 {q12, q13}, [ptrC]!
vst1.32 {q14, q15}, [ptrC]!
However, it's so much efficient when done with vld2 and vst2 when loading/storing a[] vector:
vld1.32 {q10, q11}, [ptrB]!
vld2.32 {q12, q13}, [ptrA]!
vld2.32 {q14, q15}, [ptrA]!
vsub.s32 q12, q12, q10
vsub.s32 q13, q13, q10
vsub.s32 q14, q14, q11
vsub.s32 q15, q15, q11
vst2.32 {q12, q13}, [ptrC]!
vst2.32 {q14, q15}, [ptrC]!