Open exalate-issue-sync[bot] opened 1 year ago
Arno Candel commented: R sends the wrong column types:
{code} 04-15 17:42:56.783 172.16.2.72:54321 3671 #21659-19 INFO: Method: POST , URI: /3/Parse, route: /3/Parse, parms: {number_columns=100, source_frames=["/private/var/folders/fm/9q0qk_xs0wd07zr2v6d5mfv40000gn/T/Rtmp1ExhMM/file42971424101.csv_sid_9c2f_180"], column_types=["numeric","numeric","POSIXct","numeric","numeric","numeric","POSIXct","string","numeric","numeric","enum","numeric","numeric","enum","enum","numeric","enum","string","string","numeric","string","numeric","string","enum","enum","numeric","enum","numeric","numeric","numeric","POSIXct","numeric","numeric","enum","string","POSIXct","enum","string","numeric","numeric","numeric","numeric","enum","numeric","numeric","enum","numeric","string","numeric","enum","numeric","numeric","numeric","numeric","numeric","numeric","POSIXct","numeric","numeric","numeric","POSIXct","numeric","numeric","numeric","POSIXct","numeric","enum","numeric","numeric","enum","numeric","numeric","numeric","string","numeric","enum","POSIXct","numeric","numeric","numeric","numeric","numeric","numeric","POSIXct","enum","numeric","numeric","numeric","numeric","numeric","numeric","string","numeric","enum","enum","numeric","enum","POSIXct","numeric","enum"], single_quotes=FALSE, parse_type=CSV, destination_frame=df, column_names=["C1","C2","C3","C4","C5","C6","C7","C8","C9","C10","C11","C12","C13","C14","C15","C16","C17","C18","C19","C20","C21","C22","C23","C24","C25","C26","C27","C28","C29","C30","C31","C32","C33","C34","C35","C36","C37","C38","C39","C40","C41","C42","C43","C44","C45","C46","C47","C48","C49","C50","C51","C52","C53","C54","C55","C56","C57","C58","C59","C60","C61","C62","C63","C64","C65","C66","C67","C68","C69","C70","C71","C72","C73","C74","C75","C76","C77","C78","C79","C80","C81","C82","C83","C84","C85","C86","C87","C88","C89","C90","C91","C92","C93","C94","C95","C96","C97","C98","C99","C100"], delete_on_done=TRUE, check_header=1, separator=44, blocking=TRUE, na_strings=[["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"],["NA_h2o"]], chunk_size=4194304} {code}
Arno Candel commented: That's because our as.data.frame() created it:
from frame.R: {code}
dates <- attr(x, "types") %in% "time" if (length(dates) > 0) # why do some frames come in with no attributes but many columns? for (i in 1:length(dates)) { if (dates[[i]]) class(df[[i]]) = "POSIXct" } df {code}
JIRA Issue Migration Info
Jira Issue: PUBDEV-2845 Assignee: Spencer Butt Reporter: Arno Candel State: Open Fix Version: N/A Attachments: N/A Development PRs: N/A
{code} library(h2o) h2o.init() df.hex <- h2o.createFrame(rows=1000,cols=100,seed=1234,string_fraction = 0.1,time_fraction = 0.1) df <- as.data.frame(df.hex) df2.hex <- as.h2o(df) {code}
ERROR: Unexpected HTTP Status code: 412 Precondition Failed (url = http://localhost:54321/3/Parse)
water.exceptions.H2OIllegalArgumentException [1] "water.exceptions.H2OIllegalArgumentException: Provided column type POSIXct is unknown. Cannot proceed with parse due to invalid argument." [2] " water.parser.ParseSetup.strToColumnTypes(ParseSetup.java:140)"
[3] " water.api.ParseHandler.parse(ParseHandler.java:16)"
[4] " sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)"
[5] " sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)"
[6] " java.lang.reflect.Method.invoke(Method.java:483)"
[7] " water.api.Handler.handle(Handler.java:62)"
[8] " water.api.RequestServer.handle(RequestServer.java:654)"
[9] " water.api.RequestServer.serve(RequestServer.java:595)"
[10] " water.JettyHTTPD$H2oDefaultServlet.doGeneric(JettyHTTPD.java:740)"
[11] " water.JettyHTTPD$H2oDefaultServlet.doPost(JettyHTTPD.java:676)"
[12] " javax.servlet.http.HttpServlet.service(HttpServlet.java:755)"
[13] " javax.servlet.http.HttpServlet.service(HttpServlet.java:848)"
[14] " org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)"
[15] " org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:503)"
[16] " org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)"
[17] " org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)"
[18] " org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)"
[19] " org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)"
[20] " org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:429)"
[21] " org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)"
[22] " org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)"
[23] " org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)"
[24] " org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)"
[25] " org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)"
[26] " org.eclipse.jetty.server.Server.handle(Server.java:370)"
[27] " org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)"
[28] " org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)"
[29] " org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982)"
[30] " org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043)"
[31] " org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)"
[32] " org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)"
[33] " org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)"
[34] " org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)"
[35] " org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)"
[36] " org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)"
[37] " java.lang.Thread.run(Thread.java:745)"