blob: 5b3cafd7ce2b86a6f339f33749d37b17ac214935 [file] [log] [blame]
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title> </title>
<meta name="generator" content="VuePress 1.8.2">
<link rel="icon" href="/favicon.ico">
<meta name="description" content=" ">
<meta name="Description" content="Apache IoTDB: Time Series Database for IoT">
<meta name="Keywords" content="TSDB, time series, time series database, IoTDB, IoT database, IoT data management,时序数据库, 时间序列管理, IoTDB, 物联网数据库, 实时数据库, 物联网数据管理, 物联网数据">
<meta name="baidu-site-verification" content="wfKETzB3OT">
<meta name="google-site-verification" content="mZWAoRY0yj_HAr-s47zHCGHzx5Ju-RVm5wDbPnwQYFo">
<link rel="preload" href="/assets/css/0.styles.ccadf850.css" as="style"><link rel="preload" href="/assets/js/app.fe44b663.js" as="script"><link rel="preload" href="/assets/js/3.5626571b.js" as="script"><link rel="preload" href="/assets/js/31.b5e715ce.js" as="script"><link rel="prefetch" href="/assets/js/10.77e7d27b.js"><link rel="prefetch" href="/assets/js/100.5392026f.js"><link rel="prefetch" href="/assets/js/101.4d24dbb3.js"><link rel="prefetch" href="/assets/js/102.4db55384.js"><link rel="prefetch" href="/assets/js/103.28a00d56.js"><link rel="prefetch" href="/assets/js/104.c1cad722.js"><link rel="prefetch" href="/assets/js/105.2dbc18e7.js"><link rel="prefetch" href="/assets/js/106.03cb3598.js"><link rel="prefetch" href="/assets/js/107.1aa2e9d5.js"><link rel="prefetch" href="/assets/js/108.c8e15789.js"><link rel="prefetch" href="/assets/js/109.4e029678.js"><link rel="prefetch" href="/assets/js/11.242ea813.js"><link rel="prefetch" href="/assets/js/110.2673e754.js"><link rel="prefetch" href="/assets/js/111.99869946.js"><link rel="prefetch" href="/assets/js/112.6931e30d.js"><link rel="prefetch" href="/assets/js/113.30edd688.js"><link rel="prefetch" href="/assets/js/114.cba21417.js"><link rel="prefetch" href="/assets/js/115.36ed9d85.js"><link rel="prefetch" href="/assets/js/116.b6f26e1b.js"><link rel="prefetch" href="/assets/js/117.b7ead194.js"><link rel="prefetch" href="/assets/js/118.0489f137.js"><link rel="prefetch" href="/assets/js/119.f4531020.js"><link rel="prefetch" href="/assets/js/12.4c48405a.js"><link rel="prefetch" href="/assets/js/120.d1bc4a0d.js"><link rel="prefetch" href="/assets/js/121.c4dac7da.js"><link rel="prefetch" href="/assets/js/122.37b6650b.js"><link rel="prefetch" href="/assets/js/123.6802c679.js"><link rel="prefetch" href="/assets/js/124.3a1dcf58.js"><link rel="prefetch" href="/assets/js/125.0c3e885a.js"><link rel="prefetch" href="/assets/js/126.fbfa46eb.js"><link rel="prefetch" href="/assets/js/127.110bc389.js"><link rel="prefetch" href="/assets/js/128.fd2a9b78.js"><link rel="prefetch" href="/assets/js/129.b0669c7b.js"><link rel="prefetch" href="/assets/js/13.16ded47d.js"><link rel="prefetch" href="/assets/js/130.830f695a.js"><link rel="prefetch" href="/assets/js/131.f74784eb.js"><link rel="prefetch" href="/assets/js/132.5bd44b31.js"><link rel="prefetch" href="/assets/js/133.4871f071.js"><link rel="prefetch" href="/assets/js/134.c1ebfd44.js"><link rel="prefetch" href="/assets/js/135.06b43884.js"><link rel="prefetch" href="/assets/js/136.4125fe2d.js"><link rel="prefetch" href="/assets/js/137.f79fb732.js"><link rel="prefetch" href="/assets/js/138.925cc589.js"><link rel="prefetch" href="/assets/js/139.269b4122.js"><link rel="prefetch" href="/assets/js/14.66eebc6d.js"><link rel="prefetch" href="/assets/js/140.8acac491.js"><link rel="prefetch" href="/assets/js/141.5739ba5c.js"><link rel="prefetch" href="/assets/js/142.0a0bb60d.js"><link rel="prefetch" href="/assets/js/143.a85602a6.js"><link rel="prefetch" href="/assets/js/144.af08976e.js"><link rel="prefetch" href="/assets/js/145.54dd8613.js"><link rel="prefetch" href="/assets/js/146.d6942192.js"><link rel="prefetch" href="/assets/js/147.58b089c2.js"><link rel="prefetch" href="/assets/js/148.f3061126.js"><link rel="prefetch" href="/assets/js/149.bed18caa.js"><link rel="prefetch" href="/assets/js/15.843fe861.js"><link rel="prefetch" href="/assets/js/150.857bbcb9.js"><link rel="prefetch" href="/assets/js/151.8df8eaff.js"><link rel="prefetch" href="/assets/js/152.7fbfa55b.js"><link rel="prefetch" href="/assets/js/153.88e78e8e.js"><link rel="prefetch" href="/assets/js/154.4c0105cf.js"><link rel="prefetch" href="/assets/js/155.56c02f22.js"><link rel="prefetch" href="/assets/js/156.3610ca5b.js"><link rel="prefetch" href="/assets/js/157.a82e8d14.js"><link rel="prefetch" href="/assets/js/158.cd306550.js"><link rel="prefetch" href="/assets/js/159.7c3f6836.js"><link rel="prefetch" href="/assets/js/16.17c1f643.js"><link rel="prefetch" href="/assets/js/160.d9e7ebc3.js"><link rel="prefetch" href="/assets/js/161.f69489a3.js"><link rel="prefetch" href="/assets/js/162.260f8f8c.js"><link rel="prefetch" href="/assets/js/163.6f4c436f.js"><link rel="prefetch" href="/assets/js/164.48a2358e.js"><link rel="prefetch" href="/assets/js/165.beba59fe.js"><link rel="prefetch" href="/assets/js/166.2534a588.js"><link rel="prefetch" href="/assets/js/167.daba1492.js"><link rel="prefetch" href="/assets/js/168.66d50e2f.js"><link rel="prefetch" href="/assets/js/169.4a288ab4.js"><link rel="prefetch" href="/assets/js/17.9b8df773.js"><link rel="prefetch" href="/assets/js/170.f0555c86.js"><link rel="prefetch" href="/assets/js/171.bbe4ba1a.js"><link rel="prefetch" href="/assets/js/172.712c6bac.js"><link rel="prefetch" href="/assets/js/173.c3917d0d.js"><link rel="prefetch" href="/assets/js/174.9d843f6f.js"><link rel="prefetch" href="/assets/js/175.ca25b135.js"><link rel="prefetch" href="/assets/js/176.35f2d232.js"><link rel="prefetch" href="/assets/js/177.e8e6286d.js"><link rel="prefetch" href="/assets/js/178.c37c5efd.js"><link rel="prefetch" href="/assets/js/179.84f3bdd6.js"><link rel="prefetch" href="/assets/js/18.122d5826.js"><link rel="prefetch" href="/assets/js/180.32503609.js"><link rel="prefetch" href="/assets/js/181.219cb189.js"><link rel="prefetch" href="/assets/js/182.e90074d5.js"><link rel="prefetch" href="/assets/js/183.87f069d1.js"><link rel="prefetch" href="/assets/js/184.6b62bd9f.js"><link rel="prefetch" href="/assets/js/185.4e6b021e.js"><link rel="prefetch" href="/assets/js/186.3679d30d.js"><link rel="prefetch" href="/assets/js/187.aeba6c58.js"><link rel="prefetch" href="/assets/js/188.cc1022eb.js"><link rel="prefetch" href="/assets/js/189.5ac3b4a4.js"><link rel="prefetch" href="/assets/js/19.9187dec1.js"><link rel="prefetch" href="/assets/js/190.ff15e49f.js"><link rel="prefetch" href="/assets/js/191.369829d5.js"><link rel="prefetch" href="/assets/js/192.1d1eb36e.js"><link rel="prefetch" href="/assets/js/193.fc0fb393.js"><link rel="prefetch" href="/assets/js/194.b47fbc4c.js"><link rel="prefetch" href="/assets/js/195.9e36d668.js"><link rel="prefetch" href="/assets/js/196.2d1223f7.js"><link rel="prefetch" href="/assets/js/197.55863e11.js"><link rel="prefetch" href="/assets/js/198.a48cc095.js"><link rel="prefetch" href="/assets/js/199.3a9c2528.js"><link rel="prefetch" href="/assets/js/20.cf088c3b.js"><link rel="prefetch" href="/assets/js/200.195ff96b.js"><link rel="prefetch" href="/assets/js/201.4d6c6e24.js"><link rel="prefetch" href="/assets/js/202.c32388f7.js"><link rel="prefetch" href="/assets/js/203.080586a5.js"><link rel="prefetch" href="/assets/js/204.a3b3ce92.js"><link rel="prefetch" href="/assets/js/205.9af51d77.js"><link rel="prefetch" href="/assets/js/206.ea246089.js"><link rel="prefetch" href="/assets/js/207.1c222b6c.js"><link rel="prefetch" href="/assets/js/208.fa41b6db.js"><link rel="prefetch" href="/assets/js/209.206e9cfe.js"><link rel="prefetch" href="/assets/js/21.fd51f269.js"><link rel="prefetch" href="/assets/js/210.e4599d5b.js"><link rel="prefetch" href="/assets/js/211.b4f21019.js"><link rel="prefetch" href="/assets/js/212.552b3f7c.js"><link rel="prefetch" href="/assets/js/213.e7924e39.js"><link rel="prefetch" href="/assets/js/214.4889616d.js"><link rel="prefetch" href="/assets/js/215.8bc1d1bf.js"><link rel="prefetch" href="/assets/js/216.aeaaff79.js"><link rel="prefetch" href="/assets/js/217.51dbbd91.js"><link rel="prefetch" href="/assets/js/218.477c1e20.js"><link rel="prefetch" href="/assets/js/219.fd6ed6fa.js"><link rel="prefetch" href="/assets/js/22.f9d73f8a.js"><link rel="prefetch" href="/assets/js/220.84349773.js"><link rel="prefetch" href="/assets/js/221.4b98b09e.js"><link rel="prefetch" href="/assets/js/222.57476182.js"><link rel="prefetch" href="/assets/js/223.1c0323f8.js"><link rel="prefetch" href="/assets/js/224.61e78712.js"><link rel="prefetch" href="/assets/js/225.9b6f0752.js"><link rel="prefetch" href="/assets/js/226.4868d0a5.js"><link rel="prefetch" href="/assets/js/227.6ba50795.js"><link rel="prefetch" href="/assets/js/228.1d3cd90f.js"><link rel="prefetch" href="/assets/js/229.6ca83068.js"><link rel="prefetch" href="/assets/js/23.6c7d7eea.js"><link rel="prefetch" href="/assets/js/230.5e6f7ed2.js"><link rel="prefetch" href="/assets/js/231.a8ecd36e.js"><link rel="prefetch" href="/assets/js/232.a18567c5.js"><link rel="prefetch" href="/assets/js/233.f79fadcf.js"><link rel="prefetch" href="/assets/js/234.d9207163.js"><link rel="prefetch" href="/assets/js/235.e81b51ae.js"><link rel="prefetch" href="/assets/js/236.b9c32f41.js"><link rel="prefetch" href="/assets/js/237.d795e1ce.js"><link rel="prefetch" href="/assets/js/238.49757612.js"><link rel="prefetch" href="/assets/js/239.aeda84ea.js"><link rel="prefetch" href="/assets/js/24.a553bb19.js"><link rel="prefetch" href="/assets/js/240.07479801.js"><link rel="prefetch" href="/assets/js/241.ba1379fe.js"><link rel="prefetch" href="/assets/js/242.ce1b153f.js"><link rel="prefetch" href="/assets/js/243.18fd3c66.js"><link rel="prefetch" href="/assets/js/244.2b98e85b.js"><link rel="prefetch" href="/assets/js/245.bf64d7c9.js"><link rel="prefetch" href="/assets/js/246.d0a5b73c.js"><link rel="prefetch" href="/assets/js/247.b9bc9104.js"><link rel="prefetch" href="/assets/js/248.714df448.js"><link rel="prefetch" href="/assets/js/249.e0039e9d.js"><link rel="prefetch" href="/assets/js/25.1e42b275.js"><link rel="prefetch" href="/assets/js/250.ca664993.js"><link rel="prefetch" href="/assets/js/251.b47f298a.js"><link rel="prefetch" href="/assets/js/252.71392152.js"><link rel="prefetch" href="/assets/js/253.e0f23ec8.js"><link rel="prefetch" href="/assets/js/254.6d43bbe7.js"><link rel="prefetch" href="/assets/js/255.c1779bd2.js"><link rel="prefetch" href="/assets/js/256.6a8a06f3.js"><link rel="prefetch" href="/assets/js/257.4e74c883.js"><link rel="prefetch" href="/assets/js/258.f4b72fd8.js"><link rel="prefetch" href="/assets/js/259.f9b80571.js"><link rel="prefetch" href="/assets/js/26.0057d37b.js"><link rel="prefetch" href="/assets/js/260.10e21bfc.js"><link rel="prefetch" href="/assets/js/261.402db160.js"><link rel="prefetch" href="/assets/js/262.02c5372b.js"><link rel="prefetch" href="/assets/js/263.3454f741.js"><link rel="prefetch" href="/assets/js/264.dfc588bd.js"><link rel="prefetch" href="/assets/js/265.f1fee64b.js"><link rel="prefetch" href="/assets/js/266.baac44a1.js"><link rel="prefetch" href="/assets/js/267.b6f584a5.js"><link rel="prefetch" href="/assets/js/268.013f92f7.js"><link rel="prefetch" href="/assets/js/269.706a27e5.js"><link rel="prefetch" href="/assets/js/27.9e25f953.js"><link rel="prefetch" href="/assets/js/270.397dc6f7.js"><link rel="prefetch" href="/assets/js/271.5f063e14.js"><link rel="prefetch" href="/assets/js/272.b88b9e6e.js"><link rel="prefetch" href="/assets/js/273.f7eeeb80.js"><link rel="prefetch" href="/assets/js/274.8d7d8c2a.js"><link rel="prefetch" href="/assets/js/275.167633d2.js"><link rel="prefetch" href="/assets/js/276.bf42d85f.js"><link rel="prefetch" href="/assets/js/277.195beb55.js"><link rel="prefetch" href="/assets/js/278.852d1996.js"><link rel="prefetch" href="/assets/js/279.a3fb5857.js"><link rel="prefetch" href="/assets/js/28.0a801078.js"><link rel="prefetch" href="/assets/js/280.de229c1d.js"><link rel="prefetch" href="/assets/js/281.47d676fa.js"><link rel="prefetch" href="/assets/js/282.1db3920a.js"><link rel="prefetch" href="/assets/js/283.0ed31a9c.js"><link rel="prefetch" href="/assets/js/284.d2f802aa.js"><link rel="prefetch" href="/assets/js/285.0a18923e.js"><link rel="prefetch" href="/assets/js/286.60438a30.js"><link rel="prefetch" href="/assets/js/287.6fa63573.js"><link rel="prefetch" href="/assets/js/288.4432c980.js"><link rel="prefetch" href="/assets/js/289.789f44e7.js"><link rel="prefetch" href="/assets/js/29.a31435b1.js"><link rel="prefetch" href="/assets/js/290.3c1f2e4c.js"><link rel="prefetch" href="/assets/js/291.a340398b.js"><link rel="prefetch" href="/assets/js/292.8568adc1.js"><link rel="prefetch" href="/assets/js/293.42107ac0.js"><link rel="prefetch" href="/assets/js/294.5fae363a.js"><link rel="prefetch" href="/assets/js/295.eb955643.js"><link rel="prefetch" href="/assets/js/296.77ae03d2.js"><link rel="prefetch" href="/assets/js/297.e548ba7e.js"><link rel="prefetch" href="/assets/js/298.d08bd092.js"><link rel="prefetch" href="/assets/js/299.a9495179.js"><link rel="prefetch" href="/assets/js/30.60649b66.js"><link rel="prefetch" href="/assets/js/300.1f1c6539.js"><link rel="prefetch" href="/assets/js/301.45e54d01.js"><link rel="prefetch" href="/assets/js/302.41fa5b16.js"><link rel="prefetch" href="/assets/js/303.50302303.js"><link rel="prefetch" href="/assets/js/304.45ec5f49.js"><link rel="prefetch" href="/assets/js/305.4667a075.js"><link rel="prefetch" href="/assets/js/306.9adbbd88.js"><link rel="prefetch" href="/assets/js/307.01fbd282.js"><link rel="prefetch" href="/assets/js/308.ee661372.js"><link rel="prefetch" href="/assets/js/309.71fd6514.js"><link rel="prefetch" href="/assets/js/310.2c1b5f58.js"><link rel="prefetch" href="/assets/js/311.bf369b6f.js"><link rel="prefetch" href="/assets/js/312.ee6deb53.js"><link rel="prefetch" href="/assets/js/313.b173305e.js"><link rel="prefetch" href="/assets/js/314.9bf7681c.js"><link rel="prefetch" href="/assets/js/315.9dced4c4.js"><link rel="prefetch" href="/assets/js/316.d1625f8e.js"><link rel="prefetch" href="/assets/js/317.ff874148.js"><link rel="prefetch" href="/assets/js/318.bc83f98a.js"><link rel="prefetch" href="/assets/js/319.eb7b75c1.js"><link rel="prefetch" href="/assets/js/32.e5e702b0.js"><link rel="prefetch" href="/assets/js/320.017cca1c.js"><link rel="prefetch" href="/assets/js/321.e34387cb.js"><link rel="prefetch" href="/assets/js/322.5aae6989.js"><link rel="prefetch" href="/assets/js/323.e4fd51b3.js"><link rel="prefetch" href="/assets/js/324.1ba3ee32.js"><link rel="prefetch" href="/assets/js/325.21254638.js"><link rel="prefetch" href="/assets/js/326.377d3f46.js"><link rel="prefetch" href="/assets/js/327.7734ba1d.js"><link rel="prefetch" href="/assets/js/328.e9791163.js"><link rel="prefetch" href="/assets/js/329.8acd00bc.js"><link rel="prefetch" href="/assets/js/33.b678d537.js"><link rel="prefetch" href="/assets/js/330.6cff02ec.js"><link rel="prefetch" href="/assets/js/331.98ebbe7d.js"><link rel="prefetch" href="/assets/js/332.1d9d1a04.js"><link rel="prefetch" href="/assets/js/333.e8be9a85.js"><link rel="prefetch" href="/assets/js/334.677f7d89.js"><link rel="prefetch" href="/assets/js/335.9bca2b37.js"><link rel="prefetch" href="/assets/js/336.b2a7394a.js"><link rel="prefetch" href="/assets/js/337.0231a5b2.js"><link rel="prefetch" href="/assets/js/338.1979cb4d.js"><link rel="prefetch" href="/assets/js/339.4bb8f0a9.js"><link rel="prefetch" href="/assets/js/34.f1aa3803.js"><link rel="prefetch" href="/assets/js/340.f0fa3c52.js"><link rel="prefetch" href="/assets/js/341.f8178251.js"><link rel="prefetch" href="/assets/js/342.7dd47706.js"><link rel="prefetch" href="/assets/js/343.363f2cae.js"><link rel="prefetch" href="/assets/js/344.2b4d1572.js"><link rel="prefetch" href="/assets/js/345.54e08f16.js"><link rel="prefetch" href="/assets/js/346.541ef94e.js"><link rel="prefetch" href="/assets/js/347.1f8a56e7.js"><link rel="prefetch" href="/assets/js/348.ff08d1b4.js"><link rel="prefetch" href="/assets/js/349.97e1160f.js"><link rel="prefetch" href="/assets/js/35.5612ab6a.js"><link rel="prefetch" href="/assets/js/350.1fa64f48.js"><link rel="prefetch" href="/assets/js/351.0cdcbb68.js"><link rel="prefetch" href="/assets/js/352.04f35660.js"><link rel="prefetch" href="/assets/js/353.c63abb11.js"><link rel="prefetch" href="/assets/js/354.f07fe232.js"><link rel="prefetch" href="/assets/js/355.9db8e984.js"><link rel="prefetch" href="/assets/js/356.7e54a7f7.js"><link rel="prefetch" href="/assets/js/357.b8b2c19a.js"><link rel="prefetch" href="/assets/js/358.ec88593c.js"><link rel="prefetch" href="/assets/js/359.57a348e6.js"><link rel="prefetch" href="/assets/js/36.4e36f97e.js"><link rel="prefetch" href="/assets/js/360.f91d4985.js"><link rel="prefetch" href="/assets/js/361.fd0b896b.js"><link rel="prefetch" href="/assets/js/362.3078bc4c.js"><link rel="prefetch" href="/assets/js/363.970af9b1.js"><link rel="prefetch" href="/assets/js/364.ce305e49.js"><link rel="prefetch" href="/assets/js/365.228a2005.js"><link rel="prefetch" href="/assets/js/366.3e0ce2e8.js"><link rel="prefetch" href="/assets/js/367.dfba61c0.js"><link rel="prefetch" href="/assets/js/368.d4307f98.js"><link rel="prefetch" href="/assets/js/369.730e7097.js"><link rel="prefetch" href="/assets/js/37.13b65e5d.js"><link rel="prefetch" href="/assets/js/370.e7a52728.js"><link rel="prefetch" href="/assets/js/371.99346247.js"><link rel="prefetch" href="/assets/js/372.09676253.js"><link rel="prefetch" href="/assets/js/373.2a7b274a.js"><link rel="prefetch" href="/assets/js/374.e347ead4.js"><link rel="prefetch" href="/assets/js/375.f70bcedd.js"><link rel="prefetch" href="/assets/js/376.c776b0ed.js"><link rel="prefetch" href="/assets/js/377.3d81f722.js"><link rel="prefetch" href="/assets/js/378.a7f10c5f.js"><link rel="prefetch" href="/assets/js/379.b18f1c51.js"><link rel="prefetch" href="/assets/js/38.c6f83038.js"><link rel="prefetch" href="/assets/js/380.a84e788a.js"><link rel="prefetch" href="/assets/js/381.521f1a2b.js"><link rel="prefetch" href="/assets/js/382.10ebffdc.js"><link rel="prefetch" href="/assets/js/383.fa0c4858.js"><link rel="prefetch" href="/assets/js/384.4d3a1d3e.js"><link rel="prefetch" href="/assets/js/385.edbe545d.js"><link rel="prefetch" href="/assets/js/386.aa0e0479.js"><link rel="prefetch" href="/assets/js/387.d08b9da1.js"><link rel="prefetch" href="/assets/js/388.3cafa76f.js"><link rel="prefetch" href="/assets/js/389.1c150739.js"><link rel="prefetch" href="/assets/js/39.41707d32.js"><link rel="prefetch" href="/assets/js/390.e3c6dc5b.js"><link rel="prefetch" href="/assets/js/391.097ce5d5.js"><link rel="prefetch" href="/assets/js/392.b1450deb.js"><link rel="prefetch" href="/assets/js/393.a9be5042.js"><link rel="prefetch" href="/assets/js/394.0f496e89.js"><link rel="prefetch" href="/assets/js/395.d66b20d2.js"><link rel="prefetch" href="/assets/js/396.a238eb17.js"><link rel="prefetch" href="/assets/js/397.c76a0b8d.js"><link rel="prefetch" href="/assets/js/398.3812b640.js"><link rel="prefetch" href="/assets/js/399.e6940f90.js"><link rel="prefetch" href="/assets/js/4.9c4b1c6d.js"><link rel="prefetch" href="/assets/js/40.f82f0187.js"><link rel="prefetch" href="/assets/js/400.5e0cfb93.js"><link rel="prefetch" href="/assets/js/401.f613f2ba.js"><link rel="prefetch" href="/assets/js/402.be1f5783.js"><link rel="prefetch" href="/assets/js/403.33c1396d.js"><link rel="prefetch" href="/assets/js/404.562089b0.js"><link rel="prefetch" href="/assets/js/405.93f42baf.js"><link rel="prefetch" href="/assets/js/406.ba8d00d1.js"><link rel="prefetch" href="/assets/js/407.0150b19f.js"><link rel="prefetch" href="/assets/js/408.728a1d15.js"><link rel="prefetch" href="/assets/js/409.ef560ed7.js"><link rel="prefetch" href="/assets/js/41.b6799c44.js"><link rel="prefetch" href="/assets/js/410.d3f65621.js"><link rel="prefetch" href="/assets/js/411.07ef2c9f.js"><link rel="prefetch" href="/assets/js/412.4a1d8057.js"><link rel="prefetch" href="/assets/js/413.ebf9aafc.js"><link rel="prefetch" href="/assets/js/414.a5433120.js"><link rel="prefetch" href="/assets/js/415.4dcc07c7.js"><link rel="prefetch" href="/assets/js/416.11747f6b.js"><link rel="prefetch" href="/assets/js/417.5270e086.js"><link rel="prefetch" href="/assets/js/418.d5fc9d05.js"><link rel="prefetch" href="/assets/js/419.540dcd2a.js"><link rel="prefetch" href="/assets/js/42.e6b0aae2.js"><link rel="prefetch" href="/assets/js/420.28641617.js"><link rel="prefetch" href="/assets/js/421.a6c3c8af.js"><link rel="prefetch" href="/assets/js/422.52ab97a6.js"><link rel="prefetch" href="/assets/js/423.7c5da32e.js"><link rel="prefetch" href="/assets/js/424.d39b15e0.js"><link rel="prefetch" href="/assets/js/425.2c8fbc5a.js"><link rel="prefetch" href="/assets/js/426.b6957825.js"><link rel="prefetch" href="/assets/js/427.b96cf924.js"><link rel="prefetch" href="/assets/js/428.6440b235.js"><link rel="prefetch" href="/assets/js/429.57902fe0.js"><link rel="prefetch" href="/assets/js/43.3fff5a4c.js"><link rel="prefetch" href="/assets/js/430.04255b2f.js"><link rel="prefetch" href="/assets/js/431.321286eb.js"><link rel="prefetch" href="/assets/js/432.72fdf31f.js"><link rel="prefetch" href="/assets/js/433.52676bc7.js"><link rel="prefetch" href="/assets/js/434.7bc3fee7.js"><link rel="prefetch" href="/assets/js/435.deac35a6.js"><link rel="prefetch" href="/assets/js/436.46f753f4.js"><link rel="prefetch" href="/assets/js/437.6a675a68.js"><link rel="prefetch" href="/assets/js/438.e8c8ae5b.js"><link rel="prefetch" href="/assets/js/439.ba3f2700.js"><link rel="prefetch" href="/assets/js/44.fee39d6b.js"><link rel="prefetch" href="/assets/js/440.98a7bff0.js"><link rel="prefetch" href="/assets/js/441.e12292fb.js"><link rel="prefetch" href="/assets/js/442.08f60114.js"><link rel="prefetch" href="/assets/js/443.d5d255b9.js"><link rel="prefetch" href="/assets/js/444.01c13452.js"><link rel="prefetch" href="/assets/js/445.954c3b0b.js"><link rel="prefetch" href="/assets/js/446.81521199.js"><link rel="prefetch" href="/assets/js/447.0cf2269e.js"><link rel="prefetch" href="/assets/js/448.fb62b763.js"><link rel="prefetch" href="/assets/js/449.2fd7ec4e.js"><link rel="prefetch" href="/assets/js/45.244b7680.js"><link rel="prefetch" href="/assets/js/450.3ff3ce7b.js"><link rel="prefetch" href="/assets/js/451.4b455f4a.js"><link rel="prefetch" href="/assets/js/452.51fbf6e4.js"><link rel="prefetch" href="/assets/js/453.4d5d4319.js"><link rel="prefetch" href="/assets/js/454.99948bc3.js"><link rel="prefetch" href="/assets/js/455.d1380266.js"><link rel="prefetch" href="/assets/js/456.22423caf.js"><link rel="prefetch" href="/assets/js/457.05a6e43b.js"><link rel="prefetch" href="/assets/js/458.2a93e9bc.js"><link rel="prefetch" href="/assets/js/459.dfc3d492.js"><link rel="prefetch" href="/assets/js/46.539f062d.js"><link rel="prefetch" href="/assets/js/460.2a50d5c4.js"><link rel="prefetch" href="/assets/js/461.07548ac3.js"><link rel="prefetch" href="/assets/js/462.214e91ce.js"><link rel="prefetch" href="/assets/js/463.414bc138.js"><link rel="prefetch" href="/assets/js/464.779a26ec.js"><link rel="prefetch" href="/assets/js/465.c61d57fa.js"><link rel="prefetch" href="/assets/js/466.ab4c1900.js"><link rel="prefetch" href="/assets/js/467.6398c8fc.js"><link rel="prefetch" href="/assets/js/468.f013763e.js"><link rel="prefetch" href="/assets/js/469.40bcf372.js"><link rel="prefetch" href="/assets/js/47.a8742825.js"><link rel="prefetch" href="/assets/js/470.ba1d5a08.js"><link rel="prefetch" href="/assets/js/471.9842c3d9.js"><link rel="prefetch" href="/assets/js/472.887667b1.js"><link rel="prefetch" href="/assets/js/473.ac9f4dc8.js"><link rel="prefetch" href="/assets/js/474.c950558a.js"><link rel="prefetch" href="/assets/js/475.ec6929d7.js"><link rel="prefetch" href="/assets/js/476.d351ffef.js"><link rel="prefetch" href="/assets/js/477.cbb436f4.js"><link rel="prefetch" href="/assets/js/478.10a8af05.js"><link rel="prefetch" href="/assets/js/479.3e21eec2.js"><link rel="prefetch" href="/assets/js/48.656f2900.js"><link rel="prefetch" href="/assets/js/480.2889f790.js"><link rel="prefetch" href="/assets/js/481.6504abc3.js"><link rel="prefetch" href="/assets/js/482.25c23f5a.js"><link rel="prefetch" href="/assets/js/483.11c430e0.js"><link rel="prefetch" href="/assets/js/484.4fb1d507.js"><link rel="prefetch" href="/assets/js/485.1ecbb4e0.js"><link rel="prefetch" href="/assets/js/486.a15cc699.js"><link rel="prefetch" href="/assets/js/487.b4a9526d.js"><link rel="prefetch" href="/assets/js/488.85d13879.js"><link rel="prefetch" href="/assets/js/489.3a566e3d.js"><link rel="prefetch" href="/assets/js/49.f271ac34.js"><link rel="prefetch" href="/assets/js/490.347d23af.js"><link rel="prefetch" href="/assets/js/491.558b7aa9.js"><link rel="prefetch" href="/assets/js/492.af9c4c53.js"><link rel="prefetch" href="/assets/js/493.f89bdb3c.js"><link rel="prefetch" href="/assets/js/494.a0142c98.js"><link rel="prefetch" href="/assets/js/495.d3de8850.js"><link rel="prefetch" href="/assets/js/496.d48c6630.js"><link rel="prefetch" href="/assets/js/497.3b9635e2.js"><link rel="prefetch" href="/assets/js/498.f587a80e.js"><link rel="prefetch" href="/assets/js/499.22f6be18.js"><link rel="prefetch" href="/assets/js/5.2a4451ec.js"><link rel="prefetch" href="/assets/js/50.7d8944cd.js"><link rel="prefetch" href="/assets/js/500.d054de5c.js"><link rel="prefetch" href="/assets/js/501.954e1b5c.js"><link rel="prefetch" href="/assets/js/502.4b184e51.js"><link rel="prefetch" href="/assets/js/503.10334ca5.js"><link rel="prefetch" href="/assets/js/504.0e074cd3.js"><link rel="prefetch" href="/assets/js/505.4993e90d.js"><link rel="prefetch" href="/assets/js/506.6f94a2f8.js"><link rel="prefetch" href="/assets/js/507.b255fcfd.js"><link rel="prefetch" href="/assets/js/508.95c9551e.js"><link rel="prefetch" href="/assets/js/509.1d2ab0fb.js"><link rel="prefetch" href="/assets/js/51.fd01b1a1.js"><link rel="prefetch" href="/assets/js/510.36c66e50.js"><link rel="prefetch" href="/assets/js/511.caf2e589.js"><link rel="prefetch" href="/assets/js/512.133bca04.js"><link rel="prefetch" href="/assets/js/513.e3f62ca2.js"><link rel="prefetch" href="/assets/js/514.f17c4a44.js"><link rel="prefetch" href="/assets/js/515.f637b155.js"><link rel="prefetch" href="/assets/js/516.3cccca96.js"><link rel="prefetch" href="/assets/js/517.80c43b59.js"><link rel="prefetch" href="/assets/js/518.f3438412.js"><link rel="prefetch" href="/assets/js/519.5a0ef98b.js"><link rel="prefetch" href="/assets/js/52.10d8a15b.js"><link rel="prefetch" href="/assets/js/520.d83038f1.js"><link rel="prefetch" href="/assets/js/521.4726d233.js"><link rel="prefetch" href="/assets/js/522.045aff30.js"><link rel="prefetch" href="/assets/js/523.9d9b45b5.js"><link rel="prefetch" href="/assets/js/524.86a7c6cf.js"><link rel="prefetch" href="/assets/js/525.1d6e7b79.js"><link rel="prefetch" href="/assets/js/526.c365bd67.js"><link rel="prefetch" href="/assets/js/527.555f8b61.js"><link rel="prefetch" href="/assets/js/528.690272cc.js"><link rel="prefetch" href="/assets/js/529.7f05b847.js"><link rel="prefetch" href="/assets/js/53.79f66cea.js"><link rel="prefetch" href="/assets/js/530.3fb31398.js"><link rel="prefetch" href="/assets/js/531.54b0ee66.js"><link rel="prefetch" href="/assets/js/532.42a967ca.js"><link rel="prefetch" href="/assets/js/54.1ec48dc5.js"><link rel="prefetch" href="/assets/js/55.9d4b8667.js"><link rel="prefetch" href="/assets/js/56.aa94202c.js"><link rel="prefetch" href="/assets/js/57.dd80489d.js"><link rel="prefetch" href="/assets/js/58.9af3c40d.js"><link rel="prefetch" href="/assets/js/59.70e0291b.js"><link rel="prefetch" href="/assets/js/6.3450075a.js"><link rel="prefetch" href="/assets/js/60.53b7d88b.js"><link rel="prefetch" href="/assets/js/61.b70ccd57.js"><link rel="prefetch" href="/assets/js/62.eef65e9b.js"><link rel="prefetch" href="/assets/js/63.3a66528e.js"><link rel="prefetch" href="/assets/js/64.ed6b77b6.js"><link rel="prefetch" href="/assets/js/65.5573ce3d.js"><link rel="prefetch" href="/assets/js/66.aa4ead2c.js"><link rel="prefetch" href="/assets/js/67.29edf638.js"><link rel="prefetch" href="/assets/js/68.38ac76fc.js"><link rel="prefetch" href="/assets/js/69.7f8c7118.js"><link rel="prefetch" href="/assets/js/7.c5c54fb4.js"><link rel="prefetch" href="/assets/js/70.368e2128.js"><link rel="prefetch" href="/assets/js/71.cf483d39.js"><link rel="prefetch" href="/assets/js/72.b095c9c5.js"><link rel="prefetch" href="/assets/js/73.7f2ffe57.js"><link rel="prefetch" href="/assets/js/74.d67c3927.js"><link rel="prefetch" href="/assets/js/75.d4945299.js"><link rel="prefetch" href="/assets/js/76.f01b8b07.js"><link rel="prefetch" href="/assets/js/77.3c1e294c.js"><link rel="prefetch" href="/assets/js/78.cfcd53d4.js"><link rel="prefetch" href="/assets/js/79.a50c96bd.js"><link rel="prefetch" href="/assets/js/8.68d2fe5c.js"><link rel="prefetch" href="/assets/js/80.8358bd99.js"><link rel="prefetch" href="/assets/js/81.754e7cd2.js"><link rel="prefetch" href="/assets/js/82.e42aff88.js"><link rel="prefetch" href="/assets/js/83.152a1582.js"><link rel="prefetch" href="/assets/js/84.4867883c.js"><link rel="prefetch" href="/assets/js/85.6b2afa69.js"><link rel="prefetch" href="/assets/js/86.3e058a7a.js"><link rel="prefetch" href="/assets/js/87.cf9a4fcf.js"><link rel="prefetch" href="/assets/js/88.dc32204f.js"><link rel="prefetch" href="/assets/js/89.fb10ca17.js"><link rel="prefetch" href="/assets/js/9.e4a451d3.js"><link rel="prefetch" href="/assets/js/90.7f184d9a.js"><link rel="prefetch" href="/assets/js/91.35f464f6.js"><link rel="prefetch" href="/assets/js/92.e45a3d68.js"><link rel="prefetch" href="/assets/js/93.0d192890.js"><link rel="prefetch" href="/assets/js/94.13f91cee.js"><link rel="prefetch" href="/assets/js/95.732898b6.js"><link rel="prefetch" href="/assets/js/96.10bfabc4.js"><link rel="prefetch" href="/assets/js/97.20f5d113.js"><link rel="prefetch" href="/assets/js/98.49efa8b4.js"><link rel="prefetch" href="/assets/js/99.9abce7a4.js"><link rel="prefetch" href="/assets/js/vendors~docsearch.eff714eb.js">
<link rel="stylesheet" href="/assets/css/0.styles.ccadf850.css">
</head>
<body>
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" class="home-link router-link-active"><img src="/img/logo.png" alt=" " class="logo"></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">Document</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/UserGuide/Master/Get Started/QuickStart.html" class="nav-link">In progress</a></li><li class="dropdown-item"><!----> <a href="/UserGuide/V0.11.x/Get Started/QuickStart.html" class="nav-link">V0.11.x</a></li><li class="dropdown-item"><!----> <a href="/UserGuide/V0.10.x/Get Started/QuickStart.html" class="nav-link">V0.10.x</a></li><li class="dropdown-item"><!----> <a href="/UserGuide/V0.9.x/0-Get Started/1-QuickStart.html" class="nav-link">V0.9.x</a></li><li class="dropdown-item"><!----> <a href="/UserGuide/V0.8.x/0-Get Started/1-QuickStart.html" class="nav-link">V0.8.x</a></li></ul></div></div><div class="nav-item"><a href="/SystemDesign/Architecture/Architecture.html" class="nav-link">System design</a></div><div class="nav-item"><a href="/Download/" class="nav-link">Download</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">Community</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://cwiki.apache.org/confluence/display/iotdb" class="nav-link external">
Wiki
<!----></a></li><li class="dropdown-item"><!----> <a href="/Community/Community-Project Committers.html" class="nav-link">People</a></li><li class="dropdown-item"><!----> <a href="/Community/Community-Powered By.html" class="nav-link">Powered By</a></li><li class="dropdown-item"><!----> <a href="/Community/Materials.html" class="nav-link">Resources</a></li><li class="dropdown-item"><!----> <a href="/Community/Feedback.html" class="nav-link">Feedback</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">Development</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/Development/VoteRelease.html" class="nav-link">How to vote</a></li><li class="dropdown-item"><!----> <a href="/Development/HowToCommit.html" class="nav-link">How to Commit</a></li><li class="dropdown-item"><!----> <a href="/Development/Committer.html" class="nav-link">Become a Committer</a></li><li class="dropdown-item"><!----> <a href="/Development/ContributeGuide.html" class="nav-link">ContributeGuide</a></li><li class="dropdown-item"><!----> <a href="/Development/format-changelist.html" class="nav-link">Changelist of TsFile</a></li><li class="dropdown-item"><!----> <a href="/Development/rpc-changelist.html" class="nav-link">Changelist of RPC</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">Blog</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/Blog/Index.html" class="nav-link">Overview</a></li><li class="dropdown-item"><!----> <a href="/Blog/Release0_93.html" class="nav-link">Some Notes on Release 0.9.3 and upcoming 0.10.0</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">ASF</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="http://www.apache.org/" class="nav-link external">
Foundation
<!----></a></li><li class="dropdown-item"><!----> <a href="http://www.apache.org/licenses/" class="nav-link external">
License
<!----></a></li><li class="dropdown-item"><!----> <a href="http://www.apache.org/security/" class="nav-link external">
Security
<!----></a></li><li class="dropdown-item"><!----> <a href="http://www.apache.org/foundation/sponsorship.html" class="nav-link external">
Sponsorship
<!----></a></li><li class="dropdown-item"><!----> <a href="http://www.apache.org/foundation/thanks.html" class="nav-link external">
Thanks
<!----></a></li><li class="dropdown-item"><!----> <a href="http://www.apache.org/events/current-event" class="nav-link external">
Current Events
<!----></a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">Languages</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/SystemDesign/DataQuery/AlignByDeviceQuery.html" aria-current="page" class="nav-link router-link-exact-active router-link-active">English</a></li><li class="dropdown-item"><!----> <a href="/zh/SystemDesign/DataQuery/AlignByDeviceQuery.html" class="nav-link">简体中文</a></li></ul></div></div> <a href="https://github.com/apache/iotdb.git" target="_blank" rel="noopener noreferrer" class="repo-link">
gitHub
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">Document</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/UserGuide/Master/Get Started/QuickStart.html" class="nav-link">In progress</a></li><li class="dropdown-item"><!----> <a href="/UserGuide/V0.11.x/Get Started/QuickStart.html" class="nav-link">V0.11.x</a></li><li class="dropdown-item"><!----> <a href="/UserGuide/V0.10.x/Get Started/QuickStart.html" class="nav-link">V0.10.x</a></li><li class="dropdown-item"><!----> <a href="/UserGuide/V0.9.x/0-Get Started/1-QuickStart.html" class="nav-link">V0.9.x</a></li><li class="dropdown-item"><!----> <a href="/UserGuide/V0.8.x/0-Get Started/1-QuickStart.html" class="nav-link">V0.8.x</a></li></ul></div></div><div class="nav-item"><a href="/SystemDesign/Architecture/Architecture.html" class="nav-link">System design</a></div><div class="nav-item"><a href="/Download/" class="nav-link">Download</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">Community</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://cwiki.apache.org/confluence/display/iotdb" class="nav-link external">
Wiki
<!----></a></li><li class="dropdown-item"><!----> <a href="/Community/Community-Project Committers.html" class="nav-link">People</a></li><li class="dropdown-item"><!----> <a href="/Community/Community-Powered By.html" class="nav-link">Powered By</a></li><li class="dropdown-item"><!----> <a href="/Community/Materials.html" class="nav-link">Resources</a></li><li class="dropdown-item"><!----> <a href="/Community/Feedback.html" class="nav-link">Feedback</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">Development</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/Development/VoteRelease.html" class="nav-link">How to vote</a></li><li class="dropdown-item"><!----> <a href="/Development/HowToCommit.html" class="nav-link">How to Commit</a></li><li class="dropdown-item"><!----> <a href="/Development/Committer.html" class="nav-link">Become a Committer</a></li><li class="dropdown-item"><!----> <a href="/Development/ContributeGuide.html" class="nav-link">ContributeGuide</a></li><li class="dropdown-item"><!----> <a href="/Development/format-changelist.html" class="nav-link">Changelist of TsFile</a></li><li class="dropdown-item"><!----> <a href="/Development/rpc-changelist.html" class="nav-link">Changelist of RPC</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">Blog</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/Blog/Index.html" class="nav-link">Overview</a></li><li class="dropdown-item"><!----> <a href="/Blog/Release0_93.html" class="nav-link">Some Notes on Release 0.9.3 and upcoming 0.10.0</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">ASF</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="http://www.apache.org/" class="nav-link external">
Foundation
<!----></a></li><li class="dropdown-item"><!----> <a href="http://www.apache.org/licenses/" class="nav-link external">
License
<!----></a></li><li class="dropdown-item"><!----> <a href="http://www.apache.org/security/" class="nav-link external">
Security
<!----></a></li><li class="dropdown-item"><!----> <a href="http://www.apache.org/foundation/sponsorship.html" class="nav-link external">
Sponsorship
<!----></a></li><li class="dropdown-item"><!----> <a href="http://www.apache.org/foundation/thanks.html" class="nav-link external">
Thanks
<!----></a></li><li class="dropdown-item"><!----> <a href="http://www.apache.org/events/current-event" class="nav-link external">
Current Events
<!----></a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">Languages</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/SystemDesign/DataQuery/AlignByDeviceQuery.html" aria-current="page" class="nav-link router-link-exact-active router-link-active">English</a></li><li class="dropdown-item"><!----> <a href="/zh/SystemDesign/DataQuery/AlignByDeviceQuery.html" class="nav-link">简体中文</a></li></ul></div></div> <a href="https://github.com/apache/iotdb.git" target="_blank" rel="noopener noreferrer" class="repo-link">
gitHub
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></nav> <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading"><span>System design</span> <!----></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>Architecture</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>TsFile</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>QueryEngine</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>SchemaManager</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>StorageEngine</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading open"><span>DataQuery</span> <span class="arrow down"></span></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/SystemDesign/DataQuery/DataQuery.html" class="sidebar-link">DataQuery</a></li><li><a href="/SystemDesign/DataQuery/QueryFundamentals.html" class="sidebar-link">QueryFundamentals</a></li><li><a href="/SystemDesign/DataQuery/SeriesReader.html" class="sidebar-link">SeriesReader</a></li><li><a href="/SystemDesign/DataQuery/RawDataQuery.html" class="sidebar-link">RawDataQuery</a></li><li><a href="/SystemDesign/DataQuery/AggregationQuery.html" class="sidebar-link">AggregationQuery</a></li><li><a href="/SystemDesign/DataQuery/GroupByQuery.html" class="sidebar-link">GroupByQuery</a></li><li><a href="/SystemDesign/DataQuery/LastQuery.html" class="sidebar-link">LastQuery</a></li><li><a href="/SystemDesign/DataQuery/AlignByDeviceQuery.html" aria-current="page" class="active sidebar-link">AlignByDeviceQuery</a></li><li><a href="/SystemDesign/DataQuery/FillFunction.html" class="sidebar-link">FillFunction</a></li><li><a href="/SystemDesign/DataQuery/GroupByFillQuery.html" class="sidebar-link">GroupByFillQuery</a></li></ul></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>Tools</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>Connector</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>Client</span> <span class="arrow right"></span></p> <!----></section></li></ul> </aside> <main class="page"> <div class="content content__default"><h1 id="query-by-device-alignment"><a href="#query-by-device-alignment" class="header-anchor">#</a> Query by device alignment</h1> <p>The table structure of AlignByDevice Query is:</p> <table><thead><tr><th>time</th> <th>device</th> <th>sensor1</th> <th>sensor2</th> <th>sensor3</th> <th>...</th></tr></thead> <tbody><tr><td></td> <td></td> <td></td> <td></td> <td></td> <td></td></tr></tbody></table> <h2 id="design-principle"><a href="#design-principle" class="header-anchor">#</a> Design principle</h2> <p>The implementation principle of the device-by-device query is mainly to calculate the measurement points and filter conditions corresponding to each device in the query, and then the query is performed separately for each device, and the result set is assembled and returned.</p> <h3 id="meaning-of-important-fields-in-alignbydeviceplan"><a href="#meaning-of-important-fields-in-alignbydeviceplan" class="header-anchor">#</a> Meaning of important fields in AlignByDevicePlan</h3> <p>First explain the meaning of some important fields in AlignByDevicePlan:</p> <ul><li><code>List&lt;String&gt; measurements</code>:The list of measurements that appear in the query.</li> <li><code>List&lt;String&gt; devices</code>: The list of devices got from prefix paths.</li> <li><code>Map&lt;String, IExpression&gt; deviceToFilterMap</code>: This field is used to store the filter conditions corresponding to the device.</li> <li><code>Map&lt;String, TSDataType&gt; measurementDataTypeMap</code>:This field is used to record the actual data type of the time series for the actual query, and its key value does not contain the aggregate functions.</li> <li><code>Map&lt;String, TSDataType&gt; columnDataTypeMap</code>:This field is used to record the data type of each column in the result set. It's aim is to construct the header and output the result set, whose key value can contain aggregation functions.</li> <li><code>enum MeasurementType</code>:Three measurement types are recorded. Measurements that do not exist in any device are of type <code>NonExist</code>; measurements with single or double quotes are of type<code>Constant</code>; measurements that exist are of type <code>Exist</code>.</li> <li><code>Map&lt;String, MeasurementType&gt; measurementTypeMap</code>: This field is used to record all measurement types in the query.</li> <li>groupByTimePlan, fillQueryPlan, aggregationPlan:To avoid redundancy, these three execution plans are set as subclasses of RawDataQueryPlan and set as variables in AlignByDevicePlan. If the query plan belongs to one of these three plans, the field is assigned and saved.</li></ul> <p>Before explaining the specific implementation process, a relatively complete example is given first, and the following explanation will be used in conjunction with this example.</p> <div class="language-sql line-numbers-mode"><pre class="language-sql"><code><span class="token keyword">SELECT</span> s1<span class="token punctuation">,</span> <span class="token string">'1'</span><span class="token punctuation">,</span> <span class="token operator">*</span><span class="token punctuation">,</span> s2<span class="token punctuation">,</span> s5 <span class="token keyword">FROM</span> root<span class="token punctuation">.</span>sg<span class="token punctuation">.</span>d1<span class="token punctuation">,</span> root<span class="token punctuation">.</span>sg<span class="token punctuation">.</span><span class="token operator">*</span> <span class="token keyword">WHERE</span> <span class="token keyword">time</span> <span class="token operator">=</span> <span class="token number">1</span> <span class="token operator">AND</span> s1 <span class="token operator">&lt;</span> <span class="token number">25</span> ALIGN <span class="token keyword">BY</span> DEVICE
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p>Among them, the time series in the system is:</p> <ul><li>root.sg.d1.s1</li> <li>root.sg.d1.s2</li> <li>root.sg.d2.s1</li></ul> <p>The storage group <code>root.sg</code> contains two devices d1 and d2, where d1 has two sensors s1 and s2, d2 has only sensor s1, and the same sensor s1 has the same data type.</p> <p>The following will be explained according to the specific process:</p> <h3 id="logical-plan-generation"><a href="#logical-plan-generation" class="header-anchor">#</a> Logical plan generation</h3> <ul><li>org.apache.iotdb.db.qp.Planner</li></ul> <p>Unlike the original data query, the alignment by device query does not concatenate the suffix paths in the SELECT statement and the WHERE statement at this stage, but when the physical plan is subsequently generated, the mapping value and filter conditions corresponding to each device are calculated.</p> <p>Therefore, the work done at this stage by device alignment only includes optimization of filter conditions in WHERE statements.</p> <p>The optimization of the filtering conditions mainly includes three parts: removing the negation, transforming the disjunction paradigm, and merging the same path filtering conditions. The corresponding optimizers are: RemoveNotOptimizer, DnfFilterOptimizer, MergeSingleFilterOptimizer. This part of the logic can refer to:<a href="/SystemDesign/QueryEngine/Planner.html">Planner</a>.</p> <h3 id="physical-plan-generation"><a href="#physical-plan-generation" class="header-anchor">#</a> Physical plan generation</h3> <ul><li>org.apache.iotdb.db.qp.strategy.PhysicalGenerator</li></ul> <p>After the logical plan is generated, the <code>transformToPhysicalPlan ()</code> method in the PhysicalGenerator class is called to convert the logical plan into a physical plan. For device-aligned queries, the main logic of this method is implemented in the transformQuery () method.</p> <p><strong>The main work done at this stage is to generate the corresponding</strong> <code>AlignByDevicePlan</code><strong>Fill in the variable information。</strong></p> <p>It splices the suffix paths obtained in the SELECT statement with the prefix paths in the FROM clause to calculate the measurements of the query including its type and data type. The calculation process is as follows:</p> <div class="language-java line-numbers-mode"><pre class="language-java"><code> <span class="token comment">// Traversal suffix path</span>
<span class="token keyword">for</span> <span class="token punctuation">(</span><span class="token keyword">int</span> i <span class="token operator">=</span> <span class="token number">0</span><span class="token punctuation">;</span> i <span class="token operator">&lt;</span> suffixPaths<span class="token punctuation">.</span><span class="token function">size</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span> i<span class="token operator">++</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
<span class="token class-name">Path</span> suffixPath <span class="token operator">=</span> suffixPaths<span class="token punctuation">.</span><span class="token function">get</span><span class="token punctuation">(</span>i<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">// Used to record the measurements corresponding to a suffix path.</span>
<span class="token comment">// See the following for an example</span>
<span class="token class-name">Set</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">String</span><span class="token punctuation">&gt;</span></span> measurementSetOfGivenSuffix <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">LinkedHashSet</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token punctuation">&gt;</span></span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">// If a constant. Recording, continue to the next suffix path</span>
<span class="token keyword">if</span> <span class="token punctuation">(</span>suffixPath<span class="token punctuation">.</span><span class="token function">startWith</span><span class="token punctuation">(</span><span class="token string">&quot;'&quot;</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
<span class="token keyword">continue</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token comment">// If not constant, it will be spliced with each device to get a complete path</span>
<span class="token keyword">for</span> <span class="token punctuation">(</span><span class="token class-name">String</span> device <span class="token operator">:</span> devices<span class="token punctuation">)</span> <span class="token punctuation">{</span>
<span class="token class-name">Path</span> fullPath <span class="token operator">=</span> <span class="token class-name">Path</span><span class="token punctuation">.</span><span class="token function">addPrefixPath</span><span class="token punctuation">(</span>suffixPath<span class="token punctuation">,</span> device<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">try</span> <span class="token punctuation">{</span>
<span class="token comment">// Wildcard has been removed from the device list, but suffix paths may still contain it</span>
<span class="token comment">// Get the actual time series paths by removing wildcards</span>
<span class="token class-name">List</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">String</span><span class="token punctuation">&gt;</span></span> actualPaths <span class="token operator">=</span> <span class="token function">getMatchedTimeseries</span><span class="token punctuation">(</span>fullPath<span class="token punctuation">.</span><span class="token function">getFullPath</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">// If the path after splicing does not exist, it will be recognized as `NonExist` temporarily</span>
<span class="token comment">// If the measurement exists in next devices, then override `NonExist` to `Exist`</span>
<span class="token keyword">if</span> <span class="token punctuation">(</span>actualPaths<span class="token punctuation">.</span><span class="token function">isEmpty</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">&amp;&amp;</span> originAggregations<span class="token punctuation">.</span><span class="token function">isEmpty</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
<span class="token punctuation">}</span>
<span class="token comment">// Get data types with and without aggregate functions (actual time series) respectively</span>
<span class="token comment">// Data type with aggregation function `columnDataTypes` is used for:</span>
<span class="token comment">// 1. Data type consistency check 2. Header calculation, output result set</span>
<span class="token comment">// The actual data type of the time series `measurementDataTypes` is used for</span>
<span class="token comment">// the actual query in the AlignByDeviceDataSet</span>
<span class="token class-name">String</span> aggregation <span class="token operator">=</span>
originAggregations <span class="token operator">!=</span> <span class="token keyword">null</span> <span class="token operator">&amp;&amp;</span> <span class="token operator">!</span>originAggregations<span class="token punctuation">.</span><span class="token function">isEmpty</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
<span class="token operator">?</span> originAggregations<span class="token punctuation">.</span><span class="token function">get</span><span class="token punctuation">(</span>i<span class="token punctuation">)</span> <span class="token operator">:</span> <span class="token keyword">null</span><span class="token punctuation">;</span>
<span class="token class-name">Pair</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">List</span><span class="token punctuation">&lt;</span><span class="token class-name">TSDataType</span><span class="token punctuation">&gt;</span><span class="token punctuation">,</span> <span class="token class-name">List</span><span class="token punctuation">&lt;</span><span class="token class-name">TSDataType</span><span class="token punctuation">&gt;</span><span class="token punctuation">&gt;</span></span> pair <span class="token operator">=</span> <span class="token function">getSeriesTypes</span><span class="token punctuation">(</span>actualPaths<span class="token punctuation">,</span>
aggregation<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token class-name">List</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">TSDataType</span><span class="token punctuation">&gt;</span></span> columnDataTypes <span class="token operator">=</span> pair<span class="token punctuation">.</span>left<span class="token punctuation">;</span>
<span class="token class-name">List</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">TSDataType</span><span class="token punctuation">&gt;</span></span> measurementDataTypes <span class="token operator">=</span> pair<span class="token punctuation">.</span>right<span class="token punctuation">;</span>
<span class="token keyword">for</span> <span class="token punctuation">(</span><span class="token keyword">int</span> pathIdx <span class="token operator">=</span> <span class="token number">0</span><span class="token punctuation">;</span> pathIdx <span class="token operator">&lt;</span> actualPaths<span class="token punctuation">.</span><span class="token function">size</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span> pathIdx<span class="token operator">++</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
<span class="token class-name">Path</span> path <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Path</span><span class="token punctuation">(</span>actualPaths<span class="token punctuation">.</span><span class="token function">get</span><span class="token punctuation">(</span>pathIdx<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">// Check the data type consistency of the sensors with the same name</span>
<span class="token class-name">String</span> measurementChecked<span class="token punctuation">;</span>
<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
<span class="token class-name">TSDataType</span> columnDataType <span class="token operator">=</span> columnDataTypes<span class="token punctuation">.</span><span class="token function">get</span><span class="token punctuation">(</span>pathIdx<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">// Check data type if there is a sensor with the same name</span>
<span class="token keyword">if</span> <span class="token punctuation">(</span>columnDataTypeMap<span class="token punctuation">.</span><span class="token function">containsKey</span><span class="token punctuation">(</span>measurementChecked<span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
<span class="token comment">// The data types is inconsistent, an exception will be thrown. End</span>
<span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token operator">!</span>columnDataType<span class="token punctuation">.</span><span class="token function">equals</span><span class="token punctuation">(</span>columnDataTypeMap<span class="token punctuation">.</span><span class="token function">get</span><span class="token punctuation">(</span>measurementChecked<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
<span class="token keyword">throw</span> <span class="token keyword">new</span> <span class="token class-name">QueryProcessException</span><span class="token punctuation">(</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{</span>
<span class="token comment">// There is no such measurement, it will be recorded</span>
<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
<span class="token punctuation">}</span>
<span class="token comment">// This step indicates that the measurement exists under the device and is correct,</span>
<span class="token comment">// First, update measurementSetOfGivenSuffix which is distinct</span>
<span class="token comment">// Then if this measurement is recognized as NonExist before,update it to Exist</span>
<span class="token keyword">if</span> <span class="token punctuation">(</span>measurementSetOfGivenSuffix<span class="token punctuation">.</span><span class="token function">add</span><span class="token punctuation">(</span>measurementChecked<span class="token punctuation">)</span>
<span class="token operator">||</span> measurementTypeMap<span class="token punctuation">.</span><span class="token function">get</span><span class="token punctuation">(</span>measurementChecked<span class="token punctuation">)</span> <span class="token operator">!=</span> <span class="token class-name">MeasurementType<span class="token punctuation">.</span>Exist</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
measurementTypeMap<span class="token punctuation">.</span><span class="token function">put</span><span class="token punctuation">(</span>measurementChecked<span class="token punctuation">,</span> <span class="token class-name">MeasurementType<span class="token punctuation">.</span>Exist</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<span class="token comment">// update paths</span>
paths<span class="token punctuation">.</span><span class="token function">add</span><span class="token punctuation">(</span>path<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span> <span class="token keyword">catch</span> <span class="token punctuation">(</span><span class="token class-name">MetadataException</span> e<span class="token punctuation">)</span> <span class="token punctuation">{</span>
<span class="token keyword">throw</span> <span class="token keyword">new</span> <span class="token class-name">LogicalOptimizeException</span><span class="token punctuation">(</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<span class="token comment">// update measurements</span>
<span class="token comment">// Note that within a suffix path loop, SET is used to avoid duplicate measurements</span>
<span class="token comment">// While a LIST is used outside the loop to ensure that the output contains all measurements entered by the user</span>
<span class="token comment">// In the example,for suffix *, measurementSetOfGivenSuffix = {s1,s2}</span>
<span class="token comment">// for suffix s1, measurementSetOfGivenSuffix = {s1}</span>
<span class="token comment">// therefore the final measurements is [s1,s2,s1].</span>
measurements<span class="token punctuation">.</span><span class="token function">addAll</span><span class="token punctuation">(</span>measurementSetOfGivenSuffix<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br><span class="line-number">31</span><br><span class="line-number">32</span><br><span class="line-number">33</span><br><span class="line-number">34</span><br><span class="line-number">35</span><br><span class="line-number">36</span><br><span class="line-number">37</span><br><span class="line-number">38</span><br><span class="line-number">39</span><br><span class="line-number">40</span><br><span class="line-number">41</span><br><span class="line-number">42</span><br><span class="line-number">43</span><br><span class="line-number">44</span><br><span class="line-number">45</span><br><span class="line-number">46</span><br><span class="line-number">47</span><br><span class="line-number">48</span><br><span class="line-number">49</span><br><span class="line-number">50</span><br><span class="line-number">51</span><br><span class="line-number">52</span><br><span class="line-number">53</span><br><span class="line-number">54</span><br><span class="line-number">55</span><br><span class="line-number">56</span><br><span class="line-number">57</span><br><span class="line-number">58</span><br><span class="line-number">59</span><br><span class="line-number">60</span><br><span class="line-number">61</span><br><span class="line-number">62</span><br><span class="line-number">63</span><br><span class="line-number">64</span><br><span class="line-number">65</span><br><span class="line-number">66</span><br><span class="line-number">67</span><br><span class="line-number">68</span><br><span class="line-number">69</span><br><span class="line-number">70</span><br><span class="line-number">71</span><br><span class="line-number">72</span><br><span class="line-number">73</span><br><span class="line-number">74</span><br><span class="line-number">75</span><br><span class="line-number">76</span><br><span class="line-number">77</span><br></div></div><div class="language-java line-numbers-mode"><pre class="language-java"><code><span class="token class-name">Map</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">String</span><span class="token punctuation">,</span> <span class="token class-name">IExpression</span><span class="token punctuation">&gt;</span></span> <span class="token function">concatFilterByDevice</span><span class="token punctuation">(</span><span class="token class-name">List</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">String</span><span class="token punctuation">&gt;</span></span> devices<span class="token punctuation">,</span>
<span class="token class-name">FilterOperator</span> operator<span class="token punctuation">)</span>
<span class="token class-name">Input</span><span class="token class-name">Deduplicated</span> devices list and un<span class="token operator">-</span>stitched <span class="token class-name">FilterOperator</span>
<span class="token class-name">Input</span><span class="token class-name">The</span> deviceToFilterMap after splicing records the <span class="token class-name">Filter</span> information corresponding <span class="token keyword">to</span> <span class="token namespace">each</span> device
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br></div></div><p>The <code>concatfilterbydevice()</code> method splices the filter conditions according to the devices to get the corresponding filter conditions of each device. The main processing logic of it is in <code>concatFilterPath ()</code>:</p> <p>The <code>concatFilterPath ()</code> method traverses the unspliced FilterOperator binary tree to determine whether the node is a leaf node. If so, the path of the leaf node is taken. If the path starts with time or root, it is not processed, otherwise the device name and node are not processed. The paths are spliced and returned; if not, all children of the node are iteratively processed.</p> <p>In the example, the result of splicing the filter conditions of device 1 is <code>time = 1 AND root.sg.d1.s1 &lt;25</code>, and device 2 is<code>time = 1 AND root.sg.d2.s1 &lt;25</code>.</p> <p>The following example summarizes the variable information calculated through this stage:</p> <ul><li>measurement list <code>measurements</code><code>[s1, '1', s1, s2, s2, s5]</code></li> <li>measurement type <code>measurementTypeMap</code>
<ul><li><code>s1 -&gt; Exist</code></li> <li><code>s2 -&gt; Exist</code></li> <li><code>'1' -&gt; Constant</code></li> <li><code>s5 -&gt; NonExist</code></li></ul></li> <li>Filter condition <code>deviceToFilterMap</code> for each device:
<ul><li><code>root.sg.d1 -&gt; time = 1 AND root.sg.d1.s1 &lt; 25</code></li> <li><code>root.sg.d2 -&gt; time = 1 AND root.sg.d2.s1 &lt; 25</code></li></ul></li></ul> <h3 id="constructing-a-header-columnheader"><a href="#constructing-a-header-columnheader" class="header-anchor">#</a> Constructing a Header (ColumnHeader)</h3> <ul><li>org.apache.iotdb.db.service.TSServiceImpl</li></ul> <p>After generating the physical plan, you can execute the executeQueryStatement () method in TSServiceImpl to generate a result set and return it. The first step is to construct the header.</p> <p>Query by device alignment After calling the TSServiceImpl.getQueryColumnHeaders () method, enter TSServiceImpl.getAlignByDeviceQueryHeaders () according to the query type to construct the headers.</p> <p>The <code>getAlignByDeviceQueryHeaders ()</code> method is declared as follows:</p> <div class="language-java line-numbers-mode"><pre class="language-java"><code><span class="token keyword">private</span> <span class="token keyword">void</span> <span class="token function">getAlignByDeviceQueryHeaders</span><span class="token punctuation">(</span>
<span class="token class-name">AlignByDevicePlan</span> plan<span class="token punctuation">,</span> <span class="token class-name">List</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">String</span><span class="token punctuation">&gt;</span></span> respColumns<span class="token punctuation">,</span> <span class="token class-name">List</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">String</span><span class="token punctuation">&gt;</span></span> columnTypes<span class="token punctuation">)</span>
<span class="token class-name">Input</span><span class="token class-name">The</span> currently executing physical plan <span class="token class-name">AlignByDevicePlan</span> and the column names that need <span class="token keyword">to</span> <span class="token namespace">be</span> output respColumns and their corresponding data types columnTypes
<span class="token class-name">Input</span><span class="token class-name">Calculated</span> column name respColumns and data type columnTypes
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br></div></div><p>The specific implementation logic is as follows:</p> <ol><li>First add the <code>Device</code> column, whose data type is<code>TEXT</code>;</li> <li>Traverse the list of measurements without deduplication to determine the type of measurement currently traversed. If it is an <code>Exist</code> type, get its type from the <code>columnDataTypeMap</code>; set the other two types to <code>TEXT</code>, and then add measurement and its type to the header data structure.</li> <li>Deduplicate measurements based on the intermediate variable deduplicatedMeasurements.</li></ol> <p>The resulting header is:</p> <table><thead><tr><th>Time</th> <th>Device</th> <th>s1</th> <th>1</th> <th>s1</th> <th>s2</th> <th>s2</th> <th>s5</th></tr></thead> <tbody><tr><td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td></tr></tbody></table> <p>The deduplicated <code>measurements</code> are <code>[s1, '1', s2, s5]</code>.</p> <h3 id="result-set-generation"><a href="#result-set-generation" class="header-anchor">#</a> Result set generation</h3> <p>After the ColumnHeader is generated, the final step is to populate the result set with the results and return.</p> <h4 id="result-set-creation"><a href="#result-set-creation" class="header-anchor">#</a> Result set creation</h4> <ul><li>org.apache.iotdb.db.service.TSServiceImpl</li></ul> <p>At this stage, you need to call <code>TSServiceImpl.createQueryDataSet ()</code> to create a new result set. This part of the implementation logic is relatively simple. For AlignByDeviceQuery, you only need to create a new <code>AlignByDeviceDataSet</code>. In the constructor, the parameters in AlignByDevicePlan Assign to the newly created result set.</p> <h4 id="result-set-population"><a href="#result-set-population" class="header-anchor">#</a> Result set population</h4> <ul><li>org.apache.iotdb.db.utils.QueryDataSetUtils</li></ul> <p>Next you need to fill the results. AlignByDeviceQuery will call the <code>TSServiceImpl.fillRpcReturnData ()</code> method, and then enter the <code>QueryDataSetUtils.convertQueryDataSetByFetchSize ()</code> method according to the query type.</p> <p>The important method for getting results in the <code>convertQueryDataSetByFetchSize ()</code> method is the <code>hasNext ()</code> method of QueryDataSet.</p> <p>The main logic of the <code>hasNext ()</code> method is as follows:</p> <ol><li>Determine if there is a specified row offset <code>rowOffset</code>, if there is, skip the number of rows that need to be offset; if the total number of results is less than the specified offset, return false.</li> <li>Determines whether there is a specified limit on the number of rows <code>rowLimit</code>, if there is, it compares the current number of output rows, and returns false if the current number of output rows is greater than the limit.</li> <li>Enter <code>AlignByDeviceDataSet.hasNextWithoutConstraint ()</code> method</li></ol> <br> <ul><li>org.apache.iotdb.db.query.dataset.AlignByDeviceDataSet</li></ul> <p>First explain the meaning of the important fields in the result set:</p> <ul><li><code>deviceIterator</code>: Query by device is essentially to calculate the mapping value and filtering conditions corresponding to each device, and then the query is performed separately for each device. This field is an iterator for the device. Each query obtains a device to perform.</li> <li><code>currentDataSet</code>:This field represents the result set obtained by querying a certain device.</li></ul> <p>The work done by the <code>hasNextWithoutConstraint ()</code> method is mainly to determine whether the current result set has the next result, if not, the next device is obtained, the path, data type and filter conditions required by the device to execute the query are calculated, and then executed according to its query type The result set is obtained after a specific query plan, until no device is available for querying.</p> <p>The specific implementation logic is as follows:</p> <ol><li>First determine whether the current result set is initialized and there is a next result. If it is, it returns true directly, that is, you can call the <code>next()</code> method to get the next <code>RowRecord</code>; otherwise, the result set is not initialized and proceeds to step 2.</li> <li>Iterate <code>deviceIterator</code> to get the devices needed for this execution, and then find the device node from MManger by the device path to get all sensor nodes under it.</li> <li>Compare all measurements in the query and the sensor nodes under the current device to get the <code>executeColumns</code> which need to be queried. Then concatenate the current device name and measurements to calculate the query path, data type, and filter conditions of the current device. The corresponding fields are <code>executePaths</code>,<code>tsDataTypes</code>, and <code>expression</code>. If it is an aggregate query, you need to calculate <code>executeAggregations</code>.</li> <li>Determine whether the current subquery type is GroupByQuery, AggregationQuery, FillQuery or RawDataQuery. Perform the corresponding query and return the result set. The implementation logic <a href="/SystemDesign/DataQuery/RawDataQuery.html">Raw data query</a><a href="/SystemDesign/DataQuery/AggregationQuery.html">Aggregate query</a><a href="/SystemDesign/DataQuery/GroupByQuery.html">Downsampling query</a> can be referenced.</li></ol> <p>After initializing the result set through the <code>hasNextWithoutConstraint ()</code> method and ensuring that there is a next result, you can call <code>QueryDataSet.next ()</code> method to get the next <code>RowRecord</code>.</p> <p>The <code>next ()</code> method is mainly implemented as the <code>AlignByDeviceDataSet.nextWithoutConstraint ()</code> method.</p> <p>The work done by the <code>nextWithoutConstraint ()</code> method is to ** transform the time-aligned result set form obtained by a single device query into a device-aligned result set form **, and return the transformed <code>RowRecord</code>.</p> <p>The specific implementation logic is as follows:</p> <ol><li>First get the next time-aligned <code>originRowRecord</code> from the result set.</li> <li>Create a new <code>RowRecord</code> with timestamp, add device columns to it, and first create a Map structure<code>currentColumnMap</code> of <code>measurementName-&gt; Field</code> according to<code>executeColumns</code> and the obtained result.</li> <li>After that, you only need to traverse the deduplicated <code>measurements</code> list to determine its type. If the type is<code>Exist</code>, get the corresponding result from the <code>currentColumnMap</code> according to the measurementName. If not, set it to<code>null</code>; if it is <code>NonExist</code>Type is set to<code>null</code> directly; if it is <code>Constant</code> type,<code>measureName</code> is used as the value of this column.</li></ol> <p>After writing the output data stream according to the transformed <code>RowRecord</code>, the result set can be returned.</p></div> <div class="page-nav"><p class="inner"><span class="prev">
<a href="/SystemDesign/DataQuery/LastQuery.html" class="prev">
LastQuery
</a></span> <span class="next"><a href="/SystemDesign/DataQuery/FillFunction.html">
FillFunction
</a>
</span></p></div> <p style="text-align: center;">Copyright © 2021 The Apache Software Foundation.<br>
Apache and the Apache feather logo are trademarks of The Apache Software Foundation</p> <p style="text-align: center; margin-top: 10px; color: #444">
Contact us: Join QQ Group 659990460 | Add friend <i>tietouqiao</i> and be invited to Wechat Group<br>
see <a href="https://github.com/apache/iotdb/issues/1995">Join the community</a> for more</p></main></div><div class="global-ui"></div></div>
<script src="/assets/js/app.fe44b663.js" defer></script><script src="/assets/js/3.5626571b.js" defer></script><script src="/assets/js/31.b5e715ce.js" defer></script>
</body>
</html>