тут є любителі Скали
Dec. 2nd, 2023 05:21 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
По роботі, через примху начальства, доводиться переписувати пару шматків коду з SQL на Скалу, тої Скали не знаючи зовсім. Але потрошки, потрошки... Проблема в тому, що це для внутрішнього нашого датастора, там компіляція/перевірка на помилки триває хвилину, а запуск найтривіальнішого коду займає хвилин 5-10, тому все помаленько дуже. Але, 80% уже готово...
...І раптом вперся в помилку, яку уже дві години не можу виправити. З того всього виглядає, що в dataframe.column.when() немає логічного "OR". Воно тупо ламається на значку "||"
Якщо це не баг, а фіча, поясніть мені, тупому, кому така фіча могла прийти в голову. І, основне, НАФІГА?
P.S. Цікаво, скільки з тих, хто користується Скалою, знає безсмертні рядки про
Лупайте сю скалу! Нехай ні жар, ні холод
Не спинять вас. Зносіть і труд, і спрагу, й голод
Бо вам призначено скалу сесю розбить.
...І раптом вперся в помилку, яку уже дві години не можу виправити. З того всього виглядає, що в dataframe.column.when() немає логічного "OR". Воно тупо ламається на значку "||"
Якщо це не баг, а фіча, поясніть мені, тупому, кому така фіча могла прийти в голову. І, основне, НАФІГА?
P.S. Цікаво, скільки з тих, хто користується Скалою, знає безсмертні рядки про
Лупайте сю скалу! Нехай ні жар, ні холод
Не спинять вас. Зносіть і труд, і спрагу, й голод
Бо вам призначено скалу сесю розбить.
no subject
Date: 2023-12-03 01:58 am (UTC)Не, ну надо различать скалу и всякие библиотеки, от самых дебильных до самых продвинутых. Большой разброс. 5-10 хвилин - это точно как-то многовато. Я такое видел в одной дебильной конторе, в их дебильной джаве, когда одну и ту же апликацию инициализировали шесть раз за каким-то хреном... man, can we switch to English to discuss the problem? I'm really clueless about how to talk about all this in Russian or Ukrainian.
no subject
Date: 2023-12-03 03:08 am (UTC)Scala here is one of the "allowed" languages (the other two being spark sql and pyspark) to access a big and ugly data warehouse. Really big and really-really ugly. One of the components of that ugliness is that you don't have a proper sandbox (unless you fully set one up yourself, which is beyond what I know how to do and care to do right), and accessing the actual warehouse can be done via big web-UI thing that start the batch job. Basically, they put you in a sequence of queues: first, some container job checks your dependencies, then, some other job looks for your permissions, then you actually wait for a cluster, competing with thousands if not tens of thousands of ongoing jobs... Hence the 5-10 mins -- that's what you get when trying to run stuff with lowest resource demand but without setting run priorities reserved for, well, high priority jobs.
Guess, that's the flip side of being a big company -- people have set rules that became immutable. At least, at my current employer's the most important skill here is knowing how to navigate constraints that are specific to this company and don't exist elsewhere. I once worked with a DS formerly from Facebook -- same thing, he seemed to be good at stuff that mattered at FB but didn't matter elsewhere.
no subject
Date: 2023-12-03 10:24 am (UTC)I see. Shit happens. "Immutable rules" may be a big problem, but that's life.