mirror of
				https://github.com/cldellow/sqlite-parquet-vtable.git
				synced 2025-10-31 02:19:56 +00:00 
			
		
		
		
	
			
				
					
						
					
					5559a7b5639e700c1ed34e75352821799835ab3d
				
			
			
		
	 Colin Dellow
		
	
	5559a7b563
	
	
	Fix when last rowgroup is not same size as first
			Colin Dellow
		
	
	5559a7b563
	
	
	Fix when last rowgroup is not same size as first
		
			
			...change test data to use 99 rows, so that when we have rowgroup size 10 we exercise this code.
sqlite-parquet-vtable
A SQLite virtual table extension to expose Parquet files as SQL tables.
Caveats
I'm not an experienced C/C++ programmer. This library is definitely not bombproof. It's good enough for my use case, and may be good enough for yours, too.
- I don't use sqlite3_mallocandsqlite3_freefor C++ objects- Maybe this doesn't matter, since portability isn't a goal
 
- The C -> C++ interop definitely leaks some C++ exceptions
- Obvious cases like file not found and unsupported Parquet types are OK
- Low memory conditions aren't handled gracefully.
 
Building
- Install parquet-cpp
- Run ./build-sqliteto fetch and build the SQLite dev bits
- Run ./parquet/maketo build the module
- You will need to fixup the paths in this file to point at your local parquet-cpp folder.
Use
$ sqlite/sqlite3
sqlite> .load parquet/libparquet
sqlite> CREATE VIRTUAL TABLE demo USING parquet('parquet-generator/100-rows-1.parquet');
sqlite> SELECT * FROM demo;
...if all goes well, you'll see data here!...
Supported features
Index
Only full table scans are supported.
Types
These types are supported:
- INT96 timestamps (exposed as milliseconds since the epoch)
- INT8/INT16/INT32/INT64
- UTF8 strings
- BOOLEAN
- FLOAT
- DOUBLE
- Variable- and fixed-length byte arrays
These are not supported:
- UINT8/UINT16/UINT32/UINT64
- DECIMAL
Description
				
					Languages
				
				
								
								
									C++
								
								55.8%
							
						
							
								
								
									PLpgSQL
								
								22.2%
							
						
							
								
								
									Python
								
								11.2%
							
						
							
								
								
									Shell
								
								10.8%