OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
test_fsi Namespace Reference

Functions

def test_init
 
def test_FSI_DDL
 

Variables

tuple root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
 

Function Documentation

def test_fsi.test_FSI_DDL ( )

Definition at line 19 of file test_fsi.py.

19 
20 def test_FSI_DDL():
21  csv_file = root + "/Tests/Import/datafiles/trips_with_headers_top1000.csv"
22 
23  r = engine.executeDDL("""CREATE TEMPORARY TABLE trips (
24 trip_id BIGINT,
25 vendor_id TEXT ENCODING NONE,
26 pickup_datetime TIMESTAMP,
27 dropoff_datetime TIMESTAMP,
28 store_and_fwd_flag TEXT ENCODING DICT,
29 rate_code_id BIGINT,
30 pickup_longitude DOUBLE,
31 pickup_latitude DOUBLE,
32 dropoff_longitude DOUBLE,
33 dropoff_latitude DOUBLE,
34 passenger_count BIGINT,
35 trip_distance DOUBLE,
36 fare_amount DOUBLE,
37 extra DOUBLE,
38 mta_tax DOUBLE,
39 tip_amount DOUBLE,
40 tolls_amount DOUBLE,
41 ehail_fee DOUBLE,
42 improvement_surcharge DOUBLE,
43 total_amount DOUBLE,
44 payment_type TEXT ENCODING DICT,
45 trip_type BIGINT,
46 pickup TEXT ENCODING DICT,
47 dropoff TEXT ENCODING NONE,
48 cab_type TEXT ENCODING DICT,
49 precipitation DOUBLE,
50 snow_depth BIGINT,
51 snowfall DOUBLE,
52 max_temperature BIGINT,
53 min_temperature BIGINT,
54 average_wind_speed DOUBLE,
55 pickup_nyct2010_gid BIGINT,
56 pickup_ctlabel DOUBLE,
57 pickup_borocode BIGINT,
58 pickup_boroname TEXT ENCODING NONE,
59 pickup_ct2010 BIGINT,
60 pickup_boroct2010 BIGINT,
61 pickup_cdeligibil TEXT ENCODING DICT,
62 pickup_ntacode TEXT ENCODING DICT,
63 pickup_ntaname TEXT ENCODING DICT,
64 pickup_puma BIGINT,
65 dropoff_nyct2010_gid BIGINT,
66 dropoff_ctlabel DOUBLE,
67 dropoff_borocode BIGINT,
68 dropoff_boroname TEXT ENCODING NONE,
69 dropoff_ct2010 BIGINT,
70 dropoff_boroct2010 BIGINT,
71 dropoff_cdeligibil TEXT ENCODING NONE,
72 dropoff_ntacode TEXT ENCODING NONE,
73 dropoff_ntaname TEXT ENCODING NONE,
74 dropoff_puma BIGINT) WITH (storage_type='CSV:""" + csv_file + """', fragment_size=100);""")
75 
76  r = engine.executeDML("select * from trips;")
77  assert r
78  assert r.colCount() == 51
79  assert r.rowCount() == 999
80 
81 
def test_FSI_DDL
Definition: test_fsi.py:19
def test_fsi.test_init ( )

Definition at line 9 of file test_fsi.py.

9 
10 def test_init():
11  global engine
12  engine = dbe.PyDbEngine(
13  enable_fsi=1,
14  calcite_port=9091,
15  )
16  assert bool(engine.closed) == False
def test_init
Definition: test_fsi.py:9

Variable Documentation

tuple test_fsi.root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

Definition at line 17 of file test_fsi.py.